/* ═══════════════════════════════════════════
   COMPONENTS — nav, кнопки, карточки, аккордеон
═══════════════════════════════════════════ */

/* ─── НАВИГАЦИЯ ─── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(245, 239, 230, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-nav.scrolled {
  border-color: var(--beige);
  box-shadow: 0 2px 28px rgba(46, 39, 35, .07);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; height: 100%;
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem; font-weight: 600;
  color: var(--espresso); text-decoration: none;
  letter-spacing: .05em; white-space: nowrap;
}
.nav-logo span { color: var(--terracotta); }

.nav-links {
  display: flex; gap: 2rem; list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: .7rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--terracotta); }

/* Гамбургер */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 6px;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--espresso);
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Мобильное меню */
.mobile-nav {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 999;
  background: var(--ivory);
  border-bottom: 1px solid var(--beige);
  padding: 1.5rem 5% 2rem;
  box-shadow: 0 8px 30px rgba(46,39,35,.1);
  /* visibility вместо display — позволяет CSS-переходу работать */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: transform .3s ease, opacity .3s ease, visibility 0s .3s;
}
.mobile-nav.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: transform .3s ease, opacity .3s ease, visibility 0s 0s;
}
.mobile-nav ul {
  list-style: none; display: flex; flex-direction: column;
  gap: 1.1rem; margin-bottom: 1.75rem;
}
.mobile-nav ul a {
  font-size: .88rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color var(--transition);
}
.mobile-nav ul a:hover { color: var(--terracotta); }

/* Стрелка «назад» на странице курса */
.nav-back {
  font-size: .7rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  display: flex; align-items: center; gap: .4rem;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-back::before { content: '←'; }
.nav-back:hover { color: var(--terracotta); }

/* ─── КНОПКИ ─── */
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  border: 2px solid var(--terracotta);
  background: var(--terracotta); color: var(--ivory);
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform .2s;
}
.btn:hover {
  background: var(--terra-dark); border-color: var(--terra-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent; color: var(--terracotta);
}
.btn-outline:hover {
  background: var(--terracotta); color: var(--ivory);
}

.btn-gold {
  border-color: var(--gold); background: var(--gold); color: var(--ivory);
}
.btn-gold:hover {
  background: var(--gold-dark); border-color: var(--gold-dark);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(245,239,230,.35);
  color: rgba(245,239,230,.8);
}
.btn-ghost:hover {
  background: var(--terracotta); border-color: var(--terracotta);
  color: var(--ivory);
}

.btn-block { display: block; width: 100%; text-align: center; }

/* ─── АККОРДЕОН ─── */
.accordion-item { border-bottom: 1px solid var(--beige); }

.accordion-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.5rem 0; cursor: pointer;
  user-select: none;
}
.accordion-header:hover .accordion-title { color: var(--terracotta); }

.accordion-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem; color: var(--terracotta);
  min-width: 3rem; flex-shrink: 0;
}

.accordion-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem; font-weight: 500;
  color: var(--espresso); flex: 1;
  transition: color var(--transition);
}

.accordion-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  border: 1.5px solid var(--beige);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--muted);
  transition: transform .3s, background var(--transition),
              border-color var(--transition), color var(--transition);
}
.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
  background: var(--terracotta); border-color: var(--terracotta);
  color: var(--ivory);
}

.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height .45s ease;
}
.accordion-inner {
  padding: 0 0 2rem 4rem;
}
.accordion-inner ul {
  list-style: none; display: flex; flex-direction: column; gap: .6rem;
}
.accordion-inner ul li {
  font-size: .87rem; color: var(--muted);
  padding-left: 1.2rem; position: relative; line-height: 1.65;
}
.accordion-inner ul li::before {
  content: '—'; position: absolute; left: 0; color: var(--terracotta);
}

/* FAQ-вариант аккордеона */
.faq-accordion .accordion-num { display: none; }
.faq-accordion .accordion-title { font-size: 1.1rem; }
.faq-accordion .accordion-item:first-child { border-top: 1px solid var(--beige); }
.faq-accordion .accordion-inner {
  padding-left: 0; padding-top: .2rem;
}
.faq-accordion .accordion-inner p {
  font-size: .88rem; color: var(--muted); line-height: 1.8;
}
.faq-accordion .accordion-inner a { color: var(--terracotta); }

/* ─── КАРТОЧКА КУРСА (главная) ─── */
.course-card {
  background: var(--ivory);
  border: 1px solid var(--beige);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  text-decoration: none;
  color: var(--espresso);
  display: flex; flex-direction: column;
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(168, 104, 64, .12);
}
.course-card-img {
  aspect-ratio: 16/9;
  background: var(--beige);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; overflow: hidden;
  position: relative;
}
.course-card-img .glow-layer {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 80% at 30% 60%, rgba(200,154,161,.35) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 75% 40%, rgba(168,104,64,.18) 0%, transparent 50%);
}
.course-card-body {
  padding: 2rem 1.75rem;
  flex: 1; display: flex; flex-direction: column;
}
.course-card-body .course-card-meta {
  margin-bottom: auto;
}
.course-card-body .btn {
  margin-top: 1.5rem; width: 100%;
  text-align: center; display: block;
}
.course-card-label {
  font-size: .62rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--terracotta); margin-bottom: .6rem;
}
.course-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; font-weight: 500;
  color: var(--espresso); margin-bottom: .75rem; line-height: 1.15;
}
.course-card-desc {
  font-size: .83rem; color: var(--muted);
  line-height: 1.7; margin-bottom: 1.5rem;
}
.course-card-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  font-size: .72rem; color: var(--muted-lt);
  letter-spacing: .06em; margin-bottom: 1.5rem;
}
.course-card-meta span::before {
  content: '◦ '; color: var(--terracotta);
}

/* ─── СОЦСЕТИ ─── */
.social-row {
  display: flex; justify-content: center; gap: 1rem;
}
.social-link {
  width: 48px; height: 48px;
  border: 1px solid var(--beige);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .05em;
  transition: border-color var(--transition), color var(--transition),
              background var(--transition);
}
.social-link:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
  background: rgba(168,104,64,.06);
}

/* Вариант на тёмном фоне */
.social-link.light {
  border-color: rgba(245,239,230,.2);
  color: rgba(245,239,230,.5);
}
.social-link.light:hover {
  border-color: var(--terracotta); color: var(--terracotta);
  background: rgba(168,104,64,.1);
}

/* ─── СТАТИСТИКА-ПОЛОСКА ─── */
.stats-bar {
  padding: 2.5rem 5%;
  background: var(--terracotta);
}
.stats-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1rem; text-align: center; align-items: center;
}
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.2rem; font-weight: 500;
  color: var(--ivory); line-height: 1;
}
.stat-label {
  font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(245,239,230,.72);
  margin-top: .4rem;
}
.stat-divider {
  width: 1px; height: 48px;
  background: rgba(245,239,230,.25);
}

/* ─── ДОСТИЖЕНИЯ ─── */
.achievements {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .75rem; margin-top: 1.5rem;
}
.achievement {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .9rem 1rem;
  background: var(--cream);
}
.achievement-icon { font-size: 1rem; flex-shrink: 0; margin-top: .1rem; }
.achievement p { font-size: .78rem; color: var(--muted); line-height: 1.5; }

/* ─── ОТЗЫВЫ ─── */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  gap: 1.25rem; margin-top: 3rem;
}
.review-card {
  background: var(--ivory);
  padding: 2rem 1.75rem;
  border-left: 3px solid var(--rose);
  position: relative;
}
.review-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem; line-height: .8;
  color: var(--rose); margin-bottom: .75rem;
  display: block;
}
.review-text {
  font-size: .87rem; color: var(--muted);
  line-height: 1.75; margin-bottom: 1.25rem;
}
.review-author {
  font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; color: var(--terracotta);
  text-transform: uppercase;
}
.review-role {
  font-size: .72rem; color: var(--muted-lt);
  margin-top: .15rem;
}

/* ─── ЛАЙТБОКС ─── */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(46,39,35,.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility 0s .3s;
  cursor: zoom-out;
}
.lightbox-overlay.open {
  opacity: 1; visibility: visible;
  transition: opacity .3s ease, visibility 0s 0s;
}
.lightbox-overlay img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain; border-radius: 2px;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  transform: scale(.96);
  transition: transform .3s ease;
}
.lightbox-overlay.open img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 44px; height: 44px;
  background: rgba(245,239,230,.12); border: none; cursor: pointer;
  color: var(--ivory); font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background .2s; z-index: 1;
}
.lightbox-close:hover { background: rgba(245,239,230,.28); }

/* ─── ОТЗЫВ-СКРИНШОТ ─── */
.review-card-screenshot {
  background: var(--ivory);
  border-left: 3px solid var(--rose);
  overflow: hidden;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
  cursor: zoom-in;
}
.review-card-screenshot:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(168,104,64,.1);
}
.review-card-screenshot::after {
  content: '⤢';
  position: absolute; bottom: .75rem; right: .75rem;
  background: rgba(46,39,35,.55); color: var(--ivory);
  width: 32px; height: 32px; border-radius: 50%;
  font-size: .85rem; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.review-card-screenshot:hover::after { opacity: 1; }
.review-card-screenshot img {
  width: 100%; height: 280px;
  object-fit: cover; object-position: 50% 0%;
  display: block;
}

/* ─── ТАРИФЫ ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 1.5rem; margin-top: 3.5rem;
}
.price-card {
  background: var(--ivory);
  padding: 2.5rem 2rem;
  border: 1px solid var(--beige);
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
}
.price-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 56px rgba(168,104,64,.1);
}
.price-card.featured {
  background: var(--espresso);
  border-color: var(--espresso);
}
.featured-badge {
  position: absolute; top: -1px; right: 2rem;
  background: var(--terracotta); color: var(--ivory);
  font-size: .6rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .35rem 1rem;
}
.price-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 500;
  color: var(--espresso); margin-bottom: .3rem;
}
.price-card.featured .price-name { color: var(--ivory); }

.price-desc {
  font-size: .78rem; color: var(--muted);
  margin-bottom: 1.5rem;
}
.price-card.featured .price-desc { color: rgba(245,239,230,.45); }

.price-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem; font-weight: 600;
  color: var(--espresso); line-height: 1;
}
.price-card.featured .price-amount { color: var(--ivory); }
.price-cur { font-size: 1.3rem; }

.price-hr {
  border: none; border-top: 1px solid var(--beige);
  margin: 1.5rem 0;
}
.price-card.featured .price-hr { border-color: rgba(245,239,230,.12); }

.price-features {
  list-style: none; display: flex;
  flex-direction: column; gap: .65rem; margin-bottom: 2rem;
}
.price-feature {
  font-size: .83rem; color: var(--muted);
  display: flex; align-items: flex-start; gap: .65rem;
  line-height: 1.5;
}
.price-card.featured .price-feature { color: rgba(245,239,230,.65); }
.price-feature::before {
  content: '✓'; color: var(--terracotta);
  font-weight: 700; flex-shrink: 0;
}

.price-note {
  text-align: center; font-size: .75rem; color: var(--muted);
  margin-top: 2.5rem; padding-top: 2rem;
  border-top: 1px solid var(--beige);
}

/* ─── АДАПТИВ КОМПОНЕНТОВ ─── */
@media (max-width: 900px) {
  .achievements { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-inner .btn { display: none; }
  .nav-toggle { display: flex; }
  .stats-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .stat-divider { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .review-grid  { grid-template-columns: 1fr; }
}
