/*
Theme Name: EPOCOACH Framer
Author: Hermes Agent
Description: Dark cinematic theme for EPOCOACH - carbon fiber education academy. Framer-style design system: pure black, emerald accent, motion-first.
Version: 1.5.0
License: MIT
Text Domain: epocoach
*/

:root {
  /* Colors - Framer Design System */
  --color-bg: #000000;
  --color-surface: #090909;
  --color-text: #ffffff;
  --color-text-muted: #a6a6a6;
  --color-text-dim: rgba(255, 255, 255, 0.6);
  --color-accent: #10b981;
  --color-accent-glow: rgba(16, 185, 129, 0.15);
  --color-frosted: rgba(255, 255, 255, 0.1);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-control-border: #6b7280;

  /* Typography */
  --font-display: 'IBM Plex Mono', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Mono', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-ring: 0 0 0 1px var(--color-accent-glow);
  --shadow-card: 0 0.5px 0 rgba(255,255,255,0.1), 0 10px 30px rgba(0,0,0,0.25);

  /* Layout */
  --container-max: 1200px;
  --section-pad: 100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Form controls inherit site font (UA default is Arial) */
button,
input,
select,
textarea {
  font-family: inherit;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { opacity: 0.85; }

img { max-width: 100%; height: auto; display: block; }

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: #000;
  padding: 8px 16px;
  z-index: 10000;
  transition: top 0.3s;
}
.skip-link:focus { top: 0; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: padding 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container-max);
  margin: 0 auto;
  gap: 20px;
  flex-wrap: nowrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--color-text);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.partner-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.partner-logo-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--color-text);
}
.partner-logo-tech {
  color: var(--color-accent);
  font-weight: 800;
}
.partner-logo-sub {
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.logo-mark {
  width: 34px;
  height: 38px;
  flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-size: 20px; font-weight: 700; letter-spacing: -0.8px; }
.logo-sub { font-size: 10px; color: var(--color-text-muted); letter-spacing: 0.5px; text-transform: uppercase; }

.main-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-link {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.15px;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.nav-link:hover { opacity: 0.7; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--color-frosted);
  color: var(--color-text);
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.2); }

/* Pulsing CTA button */
.cta-pulse {
  position: relative;
  padding: 12px 28px;
  background: var(--color-accent);
  color: #000;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  animation: pulse-glow 2.4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45), 0 0 20px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(16, 185, 129, 0), 0 0 30px rgba(16, 185, 129, 0.4);
  }
}

.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  position: relative;
  z-index: 1001;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}
.burger span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-video-wrap {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}

.hero-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-pulse 4s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes hero-title-glow {
  0%, 100% { text-shadow: 0 0 20px rgba(16, 185, 129, 0.3), 0 0 40px rgba(16, 185, 129, 0.1); }
  50% { text-shadow: 0 0 40px rgba(16, 185, 129, 0.8), 0 0 80px rgba(16, 185, 129, 0.4), 0 0 120px rgba(16, 185, 129, 0.2); }
}

@keyframes hero-badge-glow {
  0%, 100% { 
    border-color: rgba(16, 185, 129, 0.15);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1), inset 0 0 10px rgba(16, 185, 129, 0.05);
  }
  50% { 
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4), 0 0 50px rgba(16, 185, 129, 0.2), inset 0 0 20px rgba(16, 185, 129, 0.1);
  }
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.95) 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-frosted);
  border: 1px solid var(--color-accent-glow);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--color-text);
  margin-bottom: 24px;
  animation: fade-in-up 0.8s ease 0.2s both;
}

.hero-title {
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: 24px;
  animation: fade-in-up 0.8s ease 0.4s both, hero-title-glow 2.5s ease-in-out 1.4s infinite;
}

.hero-title .accent {
  color: var(--color-accent);
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.3), 0 0 40px rgba(16, 185, 129, 0.1);
  animation: hero-title-glow 2.5s ease-in-out 1.4s infinite;
}

.hero-subtitle {
  font-size: 20px;
  line-height: 1.4;
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: 40px;
  animation: fade-in-up 0.8s ease 0.6s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fade-in-up 0.8s ease 0.8s both;
}

.btn-primary {
  padding: 16px 32px;
  background: var(--color-accent);
  color: #000;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  animation: pulse-glow 2.4s ease-in-out infinite;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:focus-visible { outline: 2px solid #10b981; outline-offset: 2px; }

.btn-secondary {
  padding: 16px 32px;
  background: var(--color-frosted);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); }

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Floating messenger buttons */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #10b981;
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(16,185,129,0.4);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
  position: relative;
  z-index: 2;
}
.fab-main:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 24px rgba(16,185,129,0.6); }
.fab-main:active { transform: scale(0.97); }
.fab-main.active { transform: rotate(180deg); background: #059669; }
.fab-icon-default, .fab-icon-close { transition: opacity 0.2s, transform 0.3s; }
.fab-main.active .fab-icon-default { opacity: 0; transform: scale(0); display: none; }
.fab-main.active .fab-icon-close { opacity: 1; transform: scale(1); display: block; }

.fab-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  position: absolute;
  bottom: 64px;
  right: 0;
  pointer-events: none;
}
.fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 30px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  transition: background 0.2s, border-color 0.2s;
  opacity: 0;
  transform: translateY(20px) scale(0.6);
  pointer-events: none;
}
.fab-item svg { color: #10b981; flex-shrink: 0; }
.fab-item:hover { background: #222; border-color: rgba(16,185,129,0.3); }

/* "Вытекание" - каждая иконка появляется с задержкой, выезжая снизу из-под главной кнопки */
.fab-menu.open { pointer-events: auto; }
.fab-menu.open .fab-item { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.fab-menu.open .fab-item-1 { transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.05s, opacity 0.25s ease 0.05s; }
.fab-menu.open .fab-item-2 { transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.10s, opacity 0.25s ease 0.10s; }
.fab-menu.open .fab-item-3 { transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.15s, opacity 0.25s ease 0.15s; }
.fab-menu.open .fab-item-4 { transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.20s, opacity 0.25s ease 0.20s; }
.fab-menu.open .fab-item-5 { transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.25s, opacity 0.25s ease 0.25s; }

/* Закрытие - иконки "втекают" обратно с другой кривой */
.fab-menu:not(.open) .fab-item-4 { transition: transform 0.25s ease-in 0s, opacity 0.15s ease 0s; }
.fab-menu:not(.open) .fab-item-3 { transition: transform 0.25s ease-in 0.04s, opacity 0.15s ease 0.04s; }
.fab-menu:not(.open) .fab-item-2 { transition: transform 0.25s ease-in 0.08s, opacity 0.15s ease 0.08s; }
.fab-menu:not(.open) .fab-item-1 { transition: transform 0.25s ease-in 0.12s, opacity 0.15s ease 0.12s; }
.fab-menu:not(.open) .fab-item-5 { transition: transform 0.25s ease-in 0s, opacity 0.15s ease 0s; }

@media (max-width:600px) {
    .fab-container { bottom: 16px; right: 16px; }
    .fab-main { width: 48px; height: 48px; }
    .fab-menu { bottom: 54px; }
    .fab-item { padding: 10px 14px; font-size: 13px; }
}

/* ============ SECTIONS ============ */
section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--color-accent-glow);
  border: 1px solid var(--color-accent-glow);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 62px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -3px;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 700px;
  margin-bottom: 60px;
  line-height: 1.5;
}

/* ============ COURSES GRID ============ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.course-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: border-color 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  border-color: var(--color-accent-glow);
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-4px) rotate(-1deg); }
  20% { transform: translateX(4px) rotate(1deg); }
  30% { transform: translateX(-4px) rotate(-1deg); }
  40% { transform: translateX(4px) rotate(1deg); }
  50% { transform: translateX(-3px) rotate(-0.5deg); }
  60% { transform: translateX(3px) rotate(0.5deg); }
  70% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
  90% { transform: translateX(-1px); }
}

@media (max-width: 768px) {
  .course-card:active {
    animation: shake 0.4s ease-in-out;
  }
}

.course-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.course-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-card h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.course-card p {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 12px;
  flex: 1;
}

.course-card .course-link,
.course-card .cta-pulse {
  margin-top: auto;
}

.course-card .course-link {
  color: var(--color-accent);
  font-size: 15px;
  font-weight: 500;
}

/* ============ FEATURES ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--color-border);
}

.feature-card .feature-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ============ PROCESS ============ */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.process-step {
  position: relative;
}

.process-step .step-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -2px;
}

.process-step h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.process-step p {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ============ STUDIO GALLERY ============ */
.studio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item .gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
  color: white;
}

.gallery-item .gallery-overlay h4 {
  font-size: 13px;
  font-weight: 600;
}

/* ============ BLOG ============ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.blog-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: border-color 0.3s, transform 0.3s;
}
.blog-card:hover {
  border-color: var(--color-accent-glow);
  transform: translateY(-4px);
}

.blog-card .blog-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.blog-card-body { padding: 14px; }

.blog-card .blog-category {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.blog-card h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.blog-card .blog-excerpt {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ============ CONTACT / FORM ============ */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  font-size: 16px;
}

.contact-list a:hover { color: var(--color-accent); }

.contact-list svg { width: 20px; height: 20px; flex-shrink: 0; }

.lead-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group textarea { min-height: 100px; resize: vertical; }

.form-submit {
  width: 100%;
  padding: 16px;
  background: var(--color-accent);
  color: #000;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}
.form-submit:hover { transform: translateY(-2px) scale(1.02); }
.form-submit:active { transform: scale(0.97); }
.form-submit:focus-visible { outline: 2px solid #10b981; outline-offset: 2px; }

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 60px 0 40px;
  background: var(--color-bg);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h4,
.footer-brand .footer-brand-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 300px;
}

.footer-col h5,
.footer-col-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: var(--color-text-muted);
  font-size: 14px;
}
.footer-col ul li a:hover { color: var(--color-text); }

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 13px;
}

/* ============ CARBON WEAVE ANIMATION ============ */
.carbon-weave-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.05;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(16,185,129,0.3) 10px, rgba(16,185,129,0.3) 11px),
    repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(255,255,255,0.2) 10px, rgba(255,255,255,0.2) 11px);
  animation: weave-move 20s linear infinite;
}

@keyframes weave-move {
  from { background-position: 0 0; }
  to { background-position: 100px 100px; }
}

/* ============ RESPONSIVE ============ */

/* Article content typography */
article h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  color: #fff;
}
article h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
  color: #fff;
}
article h2:first-child, article h3:first-child { margin-top: 0; }
article p { margin-bottom: 16px; }
article ul, article ol { margin-bottom: 16px; padding-left: 24px; }
article li { margin-bottom: 8px; }
article a { color: #10b981; text-decoration: none; }
article a:hover { text-decoration: underline; }
article img { border-radius: 12px; margin: 20px 0; }
article table { width: 100%; border-collapse: collapse; margin: 20px 0; }
article th, article td { border: 1px solid rgba(255,255,255,0.1); padding: 10px 14px; text-align: left; }
article th { background: rgba(16,185,129,0.08); font-weight: 600; }
article blockquote { border-left: 3px solid #10b981; padding-left: 20px; margin: 20px 0; color: #c0c0c0; font-style: italic; }

@media (max-width: 968px) {
  .main-nav { display: none; }
  .burger { display: flex; }
  .header-actions .header-phone { display: none; }
  .header-actions .icon-btn { display: none; }
  .header-actions { gap: 8px; }
  .header-actions .cta-pulse { padding: 8px 14px; font-size: 13px; }
  .logo-sub { display: none; }
  .brand-group { gap: 0; }
  .logo-name { font-size: 18px; }
  .header-inner { flex-wrap: nowrap; }
  .contact-section { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hero-title { letter-spacing: -1.5px; }
  .section-title { letter-spacing: -1.5px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: 1; }
  section { padding: 60px 0; }
  .hero { min-height: 90vh; }
}

@media (max-width: 480px) {
  .header-actions .cta-pulse { display: none; }
  .header-actions { gap: 0; }
}

/* Mobile menu open state */
.main-nav.open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  padding: 20px;
  gap: 16px;
  border-bottom: 1px solid var(--color-border);
  z-index: 1001;
}

.main-nav.open .nav-link {
  padding: 12px 0;
  font-size: 17px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Burger animation when open */
.burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* WordPress core */
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption { max-width: 100%; }
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  overflow: hidden;
  height: 1px; width: 1px;
}

/* ============ LEAD MODAL ANIMATIONS ============ */

/* Pulsing glow on modal while user is filling form */
#leadModalInner.modal-pulse-active {
  animation: modal-pulse-glow 2s ease-in-out infinite;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

@keyframes modal-pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2), 0 0 30px rgba(16, 185, 129, 0.15);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0), 0 0 50px rgba(16, 185, 129, 0.35);
  }
}

/* Shake animation on modal when consent checkbox is clicked */
#leadModalInner.modal-shake {
  animation: modal-shake 0.5s ease-in-out;
}

@keyframes modal-shake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-6px) rotate(-1deg); }
  20% { transform: translateX(6px) rotate(1deg); }
  30% { transform: translateX(-5px) rotate(-0.5deg); }
  40% { transform: translateX(5px) rotate(0.5deg); }
  50% { transform: translateX(-3px); }
  60% { transform: translateX(3px); }
  70% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
  90% { transform: translateX(-1px); }
}

/* ============ CONSENT CHECKBOX STYLING ============ */

/* Custom checkbox - checked state */
.consent-checkbox-label input:checked ~ .consent-checkmark {
  background: #10b981 !important;
  border-color: #10b981 !important;
}

.consent-checkbox-label input:checked ~ .consent-checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Hover state */
.consent-checkbox-label:hover .consent-checkmark {
  border-color: rgba(16, 185, 129, 0.5) !important;
}

/* Focus state */
.consent-checkbox-label input:focus-visible ~ .consent-checkmark {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* ============ PRIVACY POLICY MODAL ============ */

.privacy-modal-overlay {
  animation: privacy-fade-in 0.3s ease-out;
}

@keyframes privacy-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

#privacyModalInner {
  animation: privacy-slide-up 0.3s ease-out;
}

@keyframes privacy-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Privacy modal scrollbar */
#privacyModalInner::-webkit-scrollbar {
  width: 6px;
}

#privacyModalInner::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}

#privacyModalInner::-webkit-scrollbar-thumb {
  background: rgba(16,185,129,0.3);
  border-radius: 3px;
}

#privacyModalInner::-webkit-scrollbar-thumb:hover {
  background: rgba(16,185,129,0.5);
}

/* ============ LEAD MODAL OVERLAY FADE ============ */

.lead-modal-overlay {
  animation: lead-fade-in 0.25s ease-out;
}

@keyframes lead-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Form input focus glow */
#leadForm input:focus,
#leadForm textarea:focus,
#leadForm select:focus {
  border-color: rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Submit button hover */
#leadSubmitBtn:hover {
  background: #34d399 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* Mobile adjustments for modals */
@media (max-width: 640px) {
  #leadModalInner {
    padding: 28px 20px !important;
  }
  #privacyModalInner {
    padding: 28px 20px !important;
    margin: 20px 10px !important;
  }
}

/* ============ FOCUS-VISIBLE OUTLINES ============ */
.nav-link:focus-visible,
.icon-btn:focus-visible,
.burger:focus-visible,
.btn-secondary:focus-visible,
.fab-main:focus-visible,
.fab-item:focus-visible,
.course-link:focus-visible,
.gallery-item:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .cta-pulse, .btn-primary, .hero-title .accent, .fab-main {
    animation-duration: 2.4s !important;
  }
}

/* ============ COURSE PRICES (2026-09) ============ */
.price-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 700;
  color: var(--color-accent, #10b981);
  letter-spacing: -0.5px;
}
.price-badge .price-from { font-size: 14px; font-weight: 500; color: #a6a6a6; }
.price-badge .price-value { font-size: 22px; }
.price-pulse {
  animation: price-strong-pulse 1.6s ease-in-out infinite;
  will-change: transform, text-shadow;
}
@keyframes price-strong-pulse {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(16,185,129,0);
  }
  50% {
    transform: scale(1.12);
    text-shadow: 0 0 24px rgba(16,185,129,0.75);
  }
}
.course-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
  margin-bottom: 14px;
}
.course-price-row .price-badge .price-value { font-size: 26px; }
.hero-price-note {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 22px;
  border: 1px solid rgba(16,185,129,0.35);
  border-radius: 980px;
  background: rgba(16,185,129,0.07);
  font-size: 15px;
  color: #d1d5db;
}
.hero-price-note .price-badge .price-value { font-size: 19px; }
@media (prefers-reduced-motion: reduce) {
  .price-pulse { animation-duration: 2.4s !important; }
}

/* ============ MOBILE FIXES (2026-09-08): stacks, price nowrap, CTA centering ============ */
@media (max-width: 768px) {
  /* Inline two-column grids -> single column stack (B2B, kontakty, o-studii, course days) */
  div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  /* Two-column lists -> single column */
  ul[style*="columns:2"] { columns: 1 !important; }

  /* Price value never breaks across lines ("100 000 ₽" stays one line) */
  .price-badge .price-value { white-space: nowrap; flex-shrink: 0; }

  /* Course price rows: label above price, button full-width below, all centered */
  .course-price-row { flex-wrap: wrap; justify-content: center; row-gap: 12px; }
  .course-price-row .price-badge { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
  .course-price-row .btn-primary,
  .course-price-row .cta-pulse { flex-basis: 100%; white-space: normal; }

  /* CTA buttons inside text-align:center cards: block, centered, never overflow the card */
  div[style*="text-align:center"] .btn-primary,
  div[style*="text-align: center"] .btn-primary,
  section[style*="text-align:center"] .cta-pulse {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 12px auto 0;
    white-space: normal;
  }
}
@media (max-width: 768px) and (min-width: 481px) {
  /* Keep long CTA labels on one line on tablets */
  div[style*="text-align:center"] .btn-primary,
  section[style*="text-align:center"] .cta-pulse { max-width: 480px; }
}

/* ============ LEAD MODAL v2 (restored 2026-09-26) ============ */

.lead-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lead-modal[style*="flex"] { display: flex; }

.lead-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.lead-modal-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  margin: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: lead-fade-in 0.25s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

.lead-modal-card > h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin: 0 0 8px;
  color: var(--color-text);
}

.lead-modal-sub {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0 0 24px;
}

.lead-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lead-modal-close:hover {
  background: var(--color-frosted);
  color: var(--color-text);
}

/* Honeypot — всегда скрыт */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  height: 1px;
  width: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Форма внутри модалки — БЕЗ фона/рамки (не как .lead-form на контактах) */
#leadModal .lead-form {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

/* Поля формы */
#leadModal .lead-form label {
  display: block;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--color-text-muted);
}
#leadModal .lead-form label span {
  display: block;
  margin-bottom: 8px;
}
#leadModal .lead-form input[type="text"],
#leadModal .lead-form input[type="tel"],
#leadModal .lead-form select,
#leadModal .lead-form textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
#leadModal .lead-form input:focus,
#leadModal .lead-form select:focus,
#leadModal .lead-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Keep keyboard focus visible above the generic modal focus reset. */
#leadModal .lead-form input:focus-visible,
#leadModal .lead-form select:focus-visible,
#leadModal .lead-form textarea:focus-visible {
  outline: 3px solid #b8e4ff;
  outline-offset: 3px;
}

/* Чекбокс согласия */
#leadModal .consent-label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
}
#leadModal .consent-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

/* Кнопка отправки */
#leadModal .lead-submit {
  width: 100%;
  margin-top: 8px;
  font-size: 16px;
  padding: 16px;
}

/* Статус отправки */
#leadModal .form-status {
  display: none;
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
}

/* Прямые контакты под формой */
.lead-alt {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}
.lead-alt a {
  display: inline-block;
  margin: 0 10px 0 0;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s, border-color 0.2s;
}
.lead-alt a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* Мобильная модалка */
@media (max-width: 640px) {
  .lead-modal-card {
    padding: 28px 20px;
    margin: 10px;
    max-height: 94vh;
  }

  /* Таблицы в статьях — горизонтальный скролл, чтобы не рвали вёрстку */
  article table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* Увеличиваем тап-таргеты ссылок и пагинации */
  .course-link {
    display: inline-block;
    padding: 6px 0;
  }

  .page-numbers {
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

#leadModal .consent-label a { color: #6ee7b7; text-decoration: underline; text-underline-offset: 3px; }
#leadModal .consent-label a:focus-visible { outline: 2px solid #b8e4ff; outline-offset: 3px; }
