/* ============================================================
   AcademHelp — стили главной страницы
   Подключай через: Внешний вид → Настроить → Дополнительный CSS
   или добавь @import / <link> в header.php темы
   ============================================================ */

/* ── Шрифты ────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=PT+Sans:wght@400;700&display=swap');

/* ── CSS-переменные (цвета и базовые токены) ───────────────── */
:root {
  --ah-blue:        #1a56db;
  --ah-blue-dark:   #1341b0;
  --ah-blue-light:  #e8f0fe;
  --ah-accent:      #f97316;    /* оранжевый акцент */
  --ah-green:       #16a34a;
  --ah-text:        #1e293b;
  --ah-text-muted:  #64748b;
  --ah-bg:          #f8fafc;
  --ah-white:       #ffffff;
  --ah-border:      #e2e8f0;
  --ah-radius:      12px;
  --ah-shadow:      0 4px 24px rgba(26,86,219,.10);
  --ah-shadow-lg:   0 8px 40px rgba(26,86,219,.16);
  --ff-head:        'Montserrat', sans-serif;
  --ff-body:        'PT Sans', sans-serif;
  --max-w:          1180px;
  --gap:            2rem;
}

/* ── Базовый сброс для блоков страницы ──────────────────────── */
.ah-hero, .ah-services, .ah-steps,
.ah-guarantees, .ah-stats,
.ah-services + h2,
.ah-services + h2 + p,
.faq-block {
  font-family: var(--ff-body);
  color: var(--ah-text);
  box-sizing: border-box;
}

h1, h2, h3, h4 {
  font-family: var(--ff-head);
  line-height: 1.25;
}

/* ============================================================
   HERO
   ============================================================ */
.ah-hero {
  background: linear-gradient(135deg, #0f2460 0%, #1a56db 60%, #2563eb 100%);
  padding: 80px 20px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ah-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.ah-hero__content {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}

.ah-hero__title {
  font-family: var(--ff-head);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.ah-hero__sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  margin: 0 auto 1.75rem;
  max-width: 640px;
  line-height: 1.6;
}

.ah-hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem 1.2rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2.25rem;
}

.ah-hero__badges li {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 50px;
  padding: .35rem .9rem;
  font-size: .9rem;
  font-family: var(--ff-head);
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* ── Кнопки ────────────────────────────────────────────────── */
.ah-btn {
  display: inline-block;
  padding: .75rem 2rem;
  border-radius: 50px;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, background .18s;
  border: 2px solid transparent;
}

.ah-btn--primary {
  background: var(--ah-accent);
  color: #fff;
  border-color: var(--ah-accent);
  box-shadow: 0 4px 18px rgba(249,115,22,.4);
}
.ah-btn--primary:hover {
  background: #ea6a0b;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(249,115,22,.5);
  color: #fff;
  text-decoration: none;
}

.ah-btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
  margin-left: .75rem;
}
.ah-btn--outline:hover {
  background: rgba(255,255,255,.12);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

.ah-btn--sm {
  padding: .45rem 1.1rem;
  font-size: .82rem;
  background: var(--ah-blue);
  color: #fff;
  border-color: var(--ah-blue);
  border-radius: 8px;
}
.ah-btn--sm:hover {
  background: var(--ah-blue-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ============================================================
   СЕКЦИЯ: УСЛУГИ
   ============================================================ */
.ah-services {
  background: var(--ah-bg);
  padding: 72px 20px;
}

.ah-services h2 {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--ah-text);
  margin: 0 auto .75rem;
  max-width: var(--max-w);
}

.ah-services > p {
  text-align: center;
  color: var(--ah-text-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: 1rem;
  line-height: 1.65;
}

.ah-services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.ah-service-card {
  background: var(--ah-white);
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius);
  padding: 1.4rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  box-shadow: var(--ah-shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ah-service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ah-shadow-lg);
  border-color: var(--ah-blue);
}

.ah-service-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.ah-service-card__title a {
  color: var(--ah-text);
  text-decoration: none;
}
.ah-service-card__title a:hover {
  color: var(--ah-blue);
}

.ah-service-card__price {
  font-family: var(--ff-head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ah-blue);
  margin: 0;
}

.ah-service-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.ah-service-card ul li {
  font-size: .82rem;
  color: var(--ah-text-muted);
  padding: .2rem 0;
}
.ah-service-card ul li::before {
  content: '✓ ';
  color: var(--ah-green);
  font-weight: 700;
}

.ah-service-card--more {
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--ah-blue-light);
  border-style: dashed;
  border-color: var(--ah-blue);
  gap: 1rem;
}
.ah-service-card--more p {
  font-size: .9rem;
  color: var(--ah-blue-dark);
  font-weight: 600;
  margin: 0;
}
.ah-service-card--more .ah-btn--outline {
  color: var(--ah-blue);
  border-color: var(--ah-blue);
}
.ah-service-card--more .ah-btn--outline:hover {
  background: var(--ah-blue);
  color: #fff;
}

/* ============================================================
   СЕКЦИЯ: КАК МЫ РАБОТАЕМ (3 ШАГА)
   ============================================================ */
.ah-steps {
  background: var(--ah-white);
  padding: 72px 20px;
}

.ah-steps h2 {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 auto .75rem;
  max-width: var(--max-w);
}

.ah-steps > p {
  text-align: center;
  color: var(--ah-text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.ah-steps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

/* соединительная линия между шагами */
.ah-steps__grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, var(--ah-blue-light), var(--ah-blue), var(--ah-blue-light));
  z-index: 0;
}

.ah-steps__item {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 1rem;
}

.ah-steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ah-blue);
  color: #fff;
  font-family: var(--ff-head);
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 16px rgba(26,86,219,.3);
}

.ah-steps__item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 .6rem;
}

.ah-steps__item p {
  font-size: .9rem;
  color: var(--ah-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   СЕКЦИЯ: ГАРАНТИИ
   ============================================================ */
.ah-guarantees {
  background: linear-gradient(160deg, #f0f7ff 0%, #e8f0fe 100%);
  padding: 72px 20px;
}

.ah-guarantees h2 {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 auto .75rem;
  max-width: var(--max-w);
}

.ah-guarantees > p {
  text-align: center;
  color: var(--ah-text-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.ah-guarantees__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.ah-guarantee-item {
  background: var(--ah-white);
  border-radius: var(--ah-radius);
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  border-left: 4px solid var(--ah-blue);
  box-shadow: var(--ah-shadow);
  transition: transform .2s, box-shadow .2s;
}
.ah-guarantee-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--ah-shadow-lg);
}

.ah-guarantee-item h3 {
  font-size: .98rem;
  font-weight: 700;
  margin: 0 0 .6rem;
  color: var(--ah-blue-dark);
}

.ah-guarantee-item p {
  font-size: .88rem;
  color: var(--ah-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   СЕКЦИЯ: СТАТИСТИКА
   ============================================================ */
.ah-stats {
  background: var(--ah-blue);
  padding: 64px 20px;
  color: #fff;
}

.ah-stats h2 {
  text-align: center;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: #fff;
  margin: 0 auto .75rem;
  max-width: var(--max-w);
}

.ah-stats > p {
  text-align: center;
  color: rgba(255,255,255,.75);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.ah-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}

.ah-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}

.ah-stats__num {
  font-family: var(--ff-head);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.ah-stats__label {
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}

/* ============================================================
   SEO-ТЕКСТ (h2/h3 под контентными блоками)
   ============================================================ */
.entry-content h2,
.page-content h2,
.post-content h2 {
  font-family: var(--ff-head);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 800;
  color: var(--ah-text);
  margin: 2.5rem 0 .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--ah-blue-light);
}

.entry-content h3,
.page-content h3,
.post-content h3 {
  font-family: var(--ff-head);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--ah-blue-dark);
  margin: 1.75rem 0 .5rem;
}

.entry-content p,
.page-content p,
.post-content p {
  font-family: var(--ff-body);
  font-size: .97rem;
  line-height: 1.75;
  color: var(--ah-text);
  margin: 0 0 1rem;
}

.entry-content ul,
.page-content ul,
.post-content ul {
  padding-left: 1.2rem;
}

.entry-content ul li,
.page-content ul li,
.post-content ul li {
  font-size: .95rem;
  line-height: 1.65;
  margin-bottom: .4rem;
  color: var(--ah-text);
}

/* Таблица цен */
.entry-content table,
.page-content table,
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: .9rem;
  box-shadow: var(--ah-shadow);
  border-radius: var(--ah-radius);
  overflow: hidden;
}

.entry-content table thead,
.page-content table thead,
.post-content table thead {
  background: var(--ah-blue);
  color: #fff;
}

.entry-content table th,
.page-content table th,
.post-content table th {
  padding: .8rem 1rem;
  font-family: var(--ff-head);
  font-weight: 700;
  text-align: left;
}

.entry-content table td,
.page-content table td,
.post-content table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--ah-border);
}

.entry-content table tr:last-child td,
.page-content table tr:last-child td,
.post-content table tr:last-child td {
  border-bottom: none;
}

.entry-content table tr:nth-child(even) td,
.page-content table tr:nth-child(even) td,
.post-content table tr:nth-child(even) td {
  background: var(--ah-bg);
}

/* ============================================================
   FAQ БЛОК
   ============================================================ */
.faq-block {
  background: var(--ah-bg);
  border-radius: var(--ah-radius);
  padding: 2rem;
  margin: 2.5rem 0;
  border: 1px solid var(--ah-border);
}

.faq-block h2 {
  font-size: clamp(1.15rem, 2vw, 1.45rem) !important;
  border-bottom: none !important;
  margin-bottom: 1.25rem !important;
}

.faq-block h3 {
  position: relative;
  padding-left: 1.5rem;
  cursor: pointer;
}

.faq-block h3::before {
  content: '❓';
  position: absolute;
  left: 0;
  font-size: .85rem;
  top: 3px;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 768px) {
  .ah-hero {
    padding: 52px 16px 60px;
  }

  .ah-hero__badges {
    gap: .4rem .6rem;
  }
  .ah-hero__badges li {
    font-size: .78rem;
    padding: .28rem .65rem;
  }

  .ah-btn--outline {
    margin-left: 0;
    margin-top: .6rem;
  }

  .ah-services,
  .ah-steps,
  .ah-guarantees {
    padding: 48px 16px;
  }

  .ah-stats {
    padding: 44px 16px;
  }

  .ah-services__grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .9rem;
  }

  .ah-steps__grid::before {
    display: none;
  }

  .ah-steps__grid {
    gap: 2rem;
  }

  .ah-stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ah-guarantees__grid {
    grid-template-columns: 1fr;
  }

  .faq-block {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .ah-services__grid {
    grid-template-columns: 1fr 1fr;
  }

  .ah-stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .ah-btn {
    padding: .65rem 1.4rem;
    font-size: .88rem;
  }
}
