/*
Theme Name: Nerosport Blog
Theme URI: https://blog.nerosport.ru
Author: Nerosport
Description: Редакционная тема блога под бренд nerosport.ru. CTA только на форму Tilda и Telegram.
Version: 1.2.2
Requires at least: 6.4
Tested up to: 6.8
Text Domain: nerosport-blog
*/

:root {
  --nero-blue: #0439e7;
  --nero-blue-deep: #0330c4;
  --nero-blue-soft: #cad5fc;
  --nero-orange: #fc620f;
  --nero-ink: #1c1c1c;
  --nero-muted: #5a5a5a;
  --nero-line: #e6e6e6;
  --nero-bg: #f2f2f2;
  --nero-white: #ffffff;
  --nero-radius: 28px;
  --nero-font: "TikTok Sans", "SF Pro Text", "SF Pro Display", Arial, sans-serif;
  --nero-max: 1180px;
  --nero-read: 760px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.nero {
  margin: 0;
  background: var(--nero-bg);
  color: var(--nero-ink);
  font-family: var(--nero-font);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--nero-blue); }

.nero-skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.nero-skip:focus {
  left: 12px;
  top: 12px;
  z-index: 9999;
  background: #fff;
  padding: 8px 12px;
}

/* Header */
.nero-top {
  background: #ececec;
  border-bottom: 3px solid var(--nero-orange);
}
.nero-top-inner {
  max-width: var(--nero-max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nero-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nero-logo img { height: 22px; width: auto; display: block; }
.nero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  flex: 1;
}
.nero-nav a {
  color: var(--nero-ink);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}
.nero-nav a:hover,
.nero-nav a[aria-current="page"] { color: var(--nero-blue); }
.nero-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-shrink: 0;
}
.nero-phone {
  color: var(--nero-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.nero-phone:hover { color: var(--nero-blue); }

.nero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease;
}
.nero-btn:hover { transform: translateY(-1px); }
.nero-btn .arr {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.nero-btn .arr svg { width: 16px; height: 16px; display: block; }

.nero-btn-orange {
  background: var(--nero-white);
  color: #0e1805;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.nero-btn-orange .arr { background: var(--nero-orange); color: #fff; }

.nero-btn-blue {
  background: var(--nero-blue-soft);
  color: var(--nero-ink);
}
.nero-btn-blue .arr { background: var(--nero-blue); color: #fff; }

.nero-btn-solid {
  background: var(--nero-white);
  color: var(--nero-ink);
}
.nero-btn-solid .arr { background: var(--nero-orange); color: #fff; }

.nero-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  padding: 10px 18px;
}
.nero-btn-ghost:hover { background: rgba(255,255,255,.08); }

/* Hero */
.nero-hero {
  max-width: var(--nero-max);
  margin: 22px auto 0;
  padding: 0 24px;
}
.nero-hero-card {
  background: var(--nero-blue);
  color: #fff;
  border-radius: 36px;
  padding: 48px 56px 44px;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.nero-hero-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: 20px;
  width: 340px;
  height: 340px;
  background: url("assets/logo-white.svg") no-repeat center / contain;
  opacity: .12;
  pointer-events: none;
}
.nero-kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 12px;
}
.nero-hero h1 {
  font-family: "SF Pro Display", var(--nero-font);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 12px;
  max-width: 16ch;
}
.nero-hero p {
  margin: 0 0 28px;
  max-width: 40ch;
  font-size: 18px;
  opacity: .92;
}
.nero-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }

/* Cards */
.nero-wrap {
  max-width: var(--nero-max);
  margin: 0 auto;
  padding: 36px 24px 80px;
}
.nero-section-title {
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 22px;
}
.nero-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.nero-card {
  background: var(--nero-white);
  border-radius: var(--nero-radius);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
  transition: transform .18s ease, box-shadow .18s ease;
}
.nero-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(4,57,231,.08);
}
.nero-tag {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--nero-blue);
  font-weight: 600;
  margin-bottom: 10px;
}
.nero-card h2 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 12px;
}
.nero-card p {
  margin: 0 0 18px;
  color: var(--nero-muted);
  font-size: 16px;
  flex: 1;
}
.nero-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--nero-muted);
  font-size: 13px;
}
.nero-more {
  color: var(--nero-blue);
  font-weight: 600;
  font-size: 14px;
}

/* Article */
.nero-article {
  max-width: var(--nero-read);
  margin: 28px auto 40px;
  padding: 0 24px 80px;
}
.nero-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--nero-muted);
  line-height: 1.3;
}
.nero-crumbs a {
  color: var(--nero-muted);
  text-decoration: none;
}
.nero-crumbs a:hover { color: var(--nero-blue); }
.nero-crumbs-sep { opacity: .55; }
.nero-crumbs [aria-current="page"] { color: var(--nero-ink); }
.nero-article-head {
  margin-bottom: 28px;
}
.nero-article-head .nero-tag { margin-bottom: 8px; }
.nero-article h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.18;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.nero-lede {
  font-size: 18px;
  color: var(--nero-muted);
  margin: 0;
}
.nero-featured {
  margin: 22px 0 0;
}
.nero-featured-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: #121214;
}
.nero-content {
  background: var(--nero-white);
  border-radius: 32px;
  padding: 40px 44px 48px;
}
.nero-content > *:first-child { margin-top: 0; }
.nero-content h2 {
  font-size: 24px;
  font-weight: 500;
  margin: 36px 0 12px;
  letter-spacing: -0.02em;
}
.nero-content p { margin: 0 0 16px; }
.nero-content ul, .nero-content ol { margin: 0 0 16px; padding-left: 1.2em; }
.nero-content li { margin: 0 0 6px; }
.nero-content blockquote {
  margin: 20px 0;
  padding: 18px 20px;
  background: #eef1ff;
  border-left: 4px solid var(--nero-blue);
  border-radius: 0 16px 16px 0;
  font-size: 16.5px;
}
.nero-content .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px -20px 24px;
  padding: 0 20px;
}
.nero-content .table-scroll table { min-width: 560px; }
.nero-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 15px;
}
.nero-content th {
  text-align: left;
  background: var(--nero-blue);
  color: #fff;
  padding: 10px 12px;
  font-weight: 500;
}
.nero-content td {
  border-bottom: 1px solid var(--nero-line);
  padding: 10px 12px;
  vertical-align: top;
}
.nero-content a { font-weight: 600; text-underline-offset: 3px; }
.nero-content a[href*="nerosport.ru"],
.nero-content a[href*="t.me/nerosport"] {
  text-decoration-color: var(--nero-orange);
}

.nero-related {
  margin-top: 28px;
}
.nero-related h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 14px;
}
.nero-related-list {
  display: grid;
  gap: 10px;
}
.nero-related a {
  display: block;
  background: #fff;
  border-radius: 18px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--nero-ink);
  font-weight: 500;
}
.nero-related a:hover { color: var(--nero-blue); }

/* Footer */
.nero-footer {
  background: #1c1c1c;
  color: #d0d0d0;
  padding: 48px 24px 32px;
}
.nero-footer-inner {
  max-width: var(--nero-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}
.nero-footer a { color: #fff; text-decoration: none; }
.nero-footer a:hover { color: var(--nero-blue-soft); }
.nero-footer h3 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 14px;
  font-weight: 600;
}
.nero-footer ul { list-style: none; margin: 0; padding: 0; }
.nero-footer li { margin: 0 0 8px; }
.nero-copy {
  max-width: var(--nero-max);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid #333;
  font-size: 13px;
  color: #888;
}

/* Sticky CTA */
.nero-sticky {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  max-width: 720px;
  margin: 0 auto 20px;
  padding: 0 24px;
}
.nero-sticky-inner {
  background: #0e1805;
  color: #fff;
  border-radius: 999px;
  padding: 8px 10px 8px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.nero-sticky p { margin: 0; font-size: 14px; }

.nero-404 { text-align: center; padding: 80px 24px; }
.nero-404 h1 { font-size: 42px; margin: 0 0 12px; }

@media (max-width: 900px) {
  .nero-top-inner {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px 16px;
  }
  .nero-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0 16px;
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    padding: 4px 0 2px;
    scrollbar-width: thin;
  }
  .nero-nav a {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0 2px;
  }
  .nero-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: var(--nero-white);
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
    text-decoration: none;
  }
  .nero-phone-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .nero-phone::before {
    content: "";
    width: 20px;
    height: 20px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.2 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.2 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .nero-hero-card { padding: 32px 24px; border-radius: 24px; }
  .nero-grid { grid-template-columns: 1fr; }
  .nero-footer-inner { grid-template-columns: 1fr; }
  .nero-content { padding: 24px 20px 32px; }
  .nero-sticky-inner { flex-direction: column; border-radius: 20px; padding: 14px; text-align: center; }
}

/* 1.2.0: направление «Кейсы» - карточки с обложкой, страница рубрики, блоки на главной и в кейсе */
.nero-hero .nero-crumbs,
.nero-hero .nero-crumbs a,
.nero-hero .nero-crumbs [aria-current="page"] { color: rgba(255,255,255,.82); }
.nero-hero .nero-crumbs a:hover { color: #fff; }
.nero-hero p.nero-hero-sub { margin-bottom: 12px; }
.nero-case-card { padding: 0; overflow: hidden; min-height: 0; }
.nero-case-img { display: block; aspect-ratio: 16 / 10; background: var(--nero-bg); overflow: hidden; }
.nero-case-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nero-case-body { display: flex; flex-direction: column; flex: 1; padding: 22px 26px 22px; }
.nero-case-card h2,
.nero-case-card h3 { font-size: 22px; font-weight: 500; line-height: 1.25; margin: 0 0 12px; }
.nero-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 18px; margin: 0 0 22px; }
.nero-section-head .nero-section-title { margin: 0; }
.nero-all-link { color: var(--nero-blue); font-weight: 600; text-decoration: none; font-size: 15px; }
.nero-all-link:hover { text-decoration: underline; }
.nero-home-cases { margin-bottom: 44px; }
.nero-cases-cta { margin-top: 28px; background: var(--nero-white); border-radius: var(--nero-radius); padding: 32px 36px; }
.nero-cases-cta h2 { font-size: 24px; font-weight: 500; line-height: 1.25; margin: 0 0 10px; }
.nero-cases-cta p { margin: 0 0 20px; color: var(--nero-muted); max-width: 60ch; }
.nero-cases-cta .nero-btn-orange { background: var(--nero-blue); color: #fff; }
.nero-more-cases { margin-top: 28px; }
.nero-more-cases .nero-section-head h2 { font-size: 20px; font-weight: 500; margin: 0; }
.nero-more-cases .nero-case-card h3 { font-size: 18px; }
.nero-more-cases .nero-case-body { padding: 18px 20px; }
@media (max-width: 900px) {
  .nero-cases-cta { padding: 24px 20px; border-radius: 24px; }
  .nero-case-body { padding: 18px 20px; }
}

/* 1.2.2: ссылка с кейса блога на страницу кейса на nerosport.ru */
.nero-case-site { margin-top: 28px; background: var(--nero-blue); color: #fff; border-radius: var(--nero-radius); padding: 26px 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.nero-case-site h2 { font-size: 22px; font-weight: 500; margin: 0 0 6px; color: #fff; }
.nero-case-site p { margin: 0; opacity: .9; max-width: 52ch; }
@media (max-width: 900px) { .nero-case-site { padding: 22px 20px; border-radius: 24px; } }

