/* ============================================
   АВТОШКОЛА «ГУД» — Основные стили
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Основной цвет сайта */
  --color-primary: #73BF43;
  --color-primary-dark: #5BA32E;
  --color-primary-light: #E8F5DA;

  /* Старые имена-алиасы (для обратной совместимости со всем существующим CSS) */
  --color-red: #73BF43;
  --color-red-dark: #5BA32E;
  --color-red-light: #8DD15F;

  --color-black: #0E0E0E;
  --color-dark: #1A1A1A;
  --color-gray-900: #2A2A2A;
  --color-gray-700: #4A4A4A;
  --color-gray-500: #8A8A8A;
  --color-gray-300: #D9D9D9;
  --color-gray-100: #F4F4F4;
  --color-white: #FFFFFF;
  --color-gold: #F5C518;

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1280px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(115, 191, 67, 0.15);
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-black);
  background: var(--color-white);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.section-title {
  font-size: clamp(32px, 4.5vw, 56px);
  margin-bottom: 16px;
  color: var(--color-black);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--color-gray-700);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 48px;
  max-width: 640px;
}

.section-header {
  text-align: center;
  margin: 0 auto 56px;
}

.section-header .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

section {
  padding: 80px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(115, 191, 67, 0.4);
}

.btn-secondary {
  background: var(--color-black);
  color: var(--color-white);
}

.btn-secondary:hover {
  background: var(--color-gray-900);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-black);
  border: 2px solid var(--color-black);
}

.btn-outline:hover {
  background: var(--color-black);
  color: var(--color-white);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-black);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.btn-large {
  padding: 20px 44px;
  font-size: 18px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header-top {
  background: var(--color-black);
  color: var(--color-white);
  padding: 8px 0;
  font-size: 13px;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.header-top-left {
  display: flex;
  gap: 24px;
  align-items: center;
}

.header-top-left span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.city-selector {
  color: var(--color-white);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.city-selector:hover {
  color: var(--color-red-light);
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 30px;
}

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

.logo-mark {
  width: 56px;
  height: 56px;
  background: var(--color-red);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-white);
  letter-spacing: -0.02em;
  position: relative;
  box-shadow: 0 4px 16px rgba(115, 191, 67, 0.3);
}

.logo-mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 9px;
  pointer-events: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--color-black);
  letter-spacing: 0.02em;
}

.logo-tagline {
  font-size: 11px;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.nav a {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-black);
  position: relative;
  padding: 6px 0;
}

.nav a:hover {
  color: var(--color-red);
}

.nav a.has-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav a.has-dropdown::after {
  content: '▾';
  font-size: 10px;
  line-height: 1;
  display: inline-block;
  position: relative;
  top: 1px;
}

.nav-item {
  position: relative;
}

.nav-item .dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 16px;
  min-width: 240px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 10;
}

.nav-item:hover .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-item .dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.nav-item .dropdown a:hover {
  background: var(--color-gray-100);
  color: var(--color-red);
}

.header-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.header-phone {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--color-black);
}

.header-phone:hover {
  color: var(--color-red);
}

.header-hours {
  font-size: 12px;
  color: var(--color-gray-500);
  margin-top: 2px;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-black);
  transition: var(--transition);
}

/* Mobile nav */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 90vw;
  height: 100vh;
  background: var(--color-white);
  z-index: 200;
  transition: right 0.4s ease;
  overflow-y: auto;
  padding: 60px 28px 40px;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  background: none;
  color: var(--color-black);
}

.mobile-nav a {
  display: block;
  padding: 14px 0;
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid var(--color-gray-100);
}

.mobile-nav a:hover {
  color: var(--color-red);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 640px;
  background: var(--color-black);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 60px 0;
  color: var(--color-white);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(115, 191, 67, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(115, 191, 67, 0.2) 0%, transparent 50%),
    linear-gradient(135deg, #0E0E0E 0%, #1A1A1A 100%);
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-badge::before {
  content: '★';
  color: var(--color-gold);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.95;
  margin-bottom: 24px;
  color: var(--color-white);
}

.hero h1 .accent {
  color: var(--color-red);
  position: relative;
  display: inline-block;
}

.hero h1 .accent::after {
  display: none;
}

.hero-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 36px;
  max-width: 540px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 560px;
}

.hero-stat {
  border-left: 3px solid var(--color-red);
  padding-left: 16px;
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-white);
}

.hero-stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
}

/* Hero form card */
.hero-form {
  background: var(--color-white);
  color: var(--color-black);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(115, 191, 67, 0.25);
  position: relative;
}

.hero-form h3 {
  font-size: 26px;
  margin-bottom: 8px;
}

.hero-form p {
  color: var(--color-gray-700);
  margin-bottom: 24px;
  font-size: 15px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--color-white);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-red);
}

.form-agreement {
  font-size: 12px;
  color: var(--color-gray-500);
  margin-top: 12px;
  line-height: 1.5;
}

.form-agreement a {
  color: var(--color-red);
  text-decoration: underline;
}

.hero-form .btn {
  width: 100%;
  margin-top: 8px;
}

/* Countdown / urgency */
.hero-countdown {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(115, 191, 67, 0.1);
  color: var(--color-red);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  border-left: 3px solid var(--color-red);
}

/* ============================================
   CATEGORIES
   ============================================ */
.categories {
  background: var(--color-gray-100);
  position: relative;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

.cat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-red);
}

.cat-card.featured {
  background: linear-gradient(145deg, var(--color-black) 0%, var(--color-gray-900) 100%);
  color: var(--color-white);
}

.cat-card.featured .cat-price-from,
.cat-card.featured .cat-duration {
  color: rgba(255, 255, 255, 0.7);
}

.cat-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--color-red);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 100px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cat-icon {
  width: 80px;
  height: 80px;
  background: var(--color-red);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  color: var(--color-white);
  box-shadow: 0 10px 30px rgba(115, 191, 67, 0.3);
}

.cat-card.featured .cat-icon {
  background: var(--color-red);
}

.cat-title {
  font-size: 28px;
  margin-bottom: 8px;
}

.cat-description {
  color: var(--color-gray-700);
  font-size: 15px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.cat-card.featured .cat-description {
  color: rgba(255, 255, 255, 0.7);
}

.cat-price {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-red);
  margin-bottom: 4px;
}

.cat-card.featured .cat-price {
  color: var(--color-red-light);
}

.cat-price-from {
  font-size: 13px;
  color: var(--color-gray-500);
  font-weight: 400;
}

.cat-duration {
  font-size: 14px;
  color: var(--color-gray-700);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-duration::before {
  content: '⏱';
  font-size: 16px;
}

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--color-black);
  color: var(--color-white);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  align-self: flex-start;
  transition: var(--transition);
}

.cat-card.featured .cat-btn {
  background: var(--color-red);
}

.cat-btn:hover {
  background: var(--color-red);
  transform: translateX(4px);
}

.cat-btn::after {
  content: '→';
  transition: transform 0.3s;
}

.cat-btn:hover::after {
  transform: translateX(4px);
}

/* ============================================
   ADVANTAGES (Tabs)
   ============================================ */
.advantages {
  background: var(--color-white);
}

.stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--color-black);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.stats-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top left, rgba(115, 191, 67, 0.3) 0%, transparent 60%);
  z-index: 1;
}

.stat-item {
  text-align: center;
  padding: 0 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 2;
}

.stat-item:last-child {
  border-right: none;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1;
  color: var(--color-white);
  margin-bottom: 6px;
}

.stat-value .accent {
  color: var(--color-red-light);
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--color-gray-100);
  padding: 32px 28px;
  border-radius: var(--radius);
  transition: var(--transition);
  border-left: 4px solid var(--color-red);
}

.feature-card:hover {
  background: var(--color-black);
  color: var(--color-white);
  transform: translateY(-4px);
}

.feature-card:hover .feature-title {
  color: var(--color-white);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--color-red);
  color: var(--color-white);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--color-black);
}

.feature-text {
  font-size: 15px;
  line-height: 1.65;
  color: inherit;
  opacity: 0.9;
}

/* ============================================
   AUTOPARK
   ============================================ */
.autopark {
  background: var(--color-black);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.autopark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center bottom, rgba(115, 191, 67, 0.2) 0%, transparent 70%);
}

.autopark .container {
  position: relative;
}

.autopark .section-title {
  color: var(--color-white);
}

.autopark .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.car-card {
  background: var(--color-gray-900);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.car-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.car-card:hover {
  transform: translateY(-6px);
  background: #1f1f1f;
  border-color: rgba(115, 191, 67, 0.3);
}

.car-card:hover::before {
  transform: scaleX(1);
}

.car-illustration {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -24px -20px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background: #1a1a1a;
  color: var(--color-red);
}
.car-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.car-illustration svg {
  width: 100%;
  height: 100%;
  max-width: 200px;
}

.car-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.car-type {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.car-link {
  color: var(--color-red-light);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.car-link::after {
  content: '→';
  transition: transform 0.3s;
}

.car-link:hover::after {
  transform: translateX(4px);
}

/* ============================================
   INSTRUCTORS
   ============================================ */
.instructors {
  background: var(--color-gray-100);
}

.instructors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.instructor-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.instructor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.instructor-photo {
  height: 320px;
  background: linear-gradient(135deg, var(--color-gray-300), var(--color-gray-500));
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.instructor-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
  z-index: 2;
}

.instructor-photo .placeholder-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, #4a4a4a, #2a2a2a);
}

.instructor-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--color-red);
  color: var(--color-white);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 3;
}

.instructor-info {
  padding: 20px;
  position: relative;
  z-index: 3;
}

.instructor-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-black);
  text-transform: uppercase;
}

.instructor-experience {
  color: var(--color-gray-700);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.instructor-experience::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-red);
  border-radius: 50%;
}

/* ============================================
   REVIEWS
   ============================================ */
.reviews {
  background: var(--color-white);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--color-gray-100);
  padding: 28px;
  border-radius: var(--radius-lg);
  position: relative;
  transition: var(--transition);
}

.review-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-family: 'Georgia', serif;
  font-size: 80px;
  color: var(--color-red);
  line-height: 1;
  font-weight: 700;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.review-stars {
  color: var(--color-gold);
  font-size: 16px;
  margin-bottom: 14px;
  letter-spacing: 2px;
}

.review-text {
  color: var(--color-gray-900);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 20px;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--color-gray-300);
  padding-top: 16px;
}

.review-author > div:last-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}
.review-author .review-name {
  margin: 0;
}
.review-author .review-date {
  margin: 0;
}

.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-red);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.review-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-black);
}

.review-date {
  font-size: 12px;
  color: var(--color-gray-500);
}

/* ============================================
   PROCESS / STEPS
   ============================================ */
.process {
  background: var(--color-gray-100);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.step-card {
  background: var(--color-white);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.step-number {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  color: var(--color-red);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.9;
}

.step-title {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  color: var(--color-black);
}

.step-text {
  color: var(--color-gray-700);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  background: var(--color-white);
}

.faq-wrapper {
  max-width: 880px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 2px solid var(--color-gray-100);
  transition: var(--transition);
}

.faq-question {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-black);
  gap: 20px;
}

.faq-question:hover {
  color: var(--color-red);
}

.faq-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 300;
  flex-shrink: 0;
  transition: var(--transition);
}

.faq-item.active .faq-toggle {
  background: var(--color-red);
  color: var(--color-white);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 0 24px;
  color: var(--color-gray-700);
  font-size: 16px;
  line-height: 1.7;
}

/* ============================================
   CTA
   ============================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  color: var(--color-white);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.cta-content h2 {
  font-size: clamp(28px, 4vw, 48px);
  color: var(--color-white);
  margin-bottom: 12px;
  line-height: 1.1;
}

.cta-content p {
  font-size: 18px;
  opacity: 0.95;
}

/* ============================================
   CONTACTS
   ============================================ */
.contacts {
  background: var(--color-gray-100);
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: stretch;
}

.contacts-info {
  background: var(--color-black);
  color: var(--color-white);
  padding: 48px;
  border-radius: var(--radius-lg);
}

.contacts-info h3 {
  font-size: 32px;
  margin-bottom: 28px;
  color: var(--color-white);
}

.contact-item {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.contact-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.contact-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.contact-value a {
  color: var(--color-white);
}

.contact-value a:hover {
  color: var(--color-red-light);
}

.contacts-map {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 480px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    linear-gradient(45deg, var(--color-gray-300) 25%, transparent 25%),
    linear-gradient(-45deg, var(--color-gray-300) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--color-gray-300) 75%),
    linear-gradient(-45deg, transparent 75%, var(--color-gray-300) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0;
  background-color: var(--color-gray-100);
}

.map-placeholder {
  text-align: center;
  padding: 40px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map-placeholder-icon {
  font-size: 56px;
  color: var(--color-red);
  margin-bottom: 16px;
}

.map-placeholder h4 {
  font-size: 22px;
  margin-bottom: 8px;
}

.map-placeholder p {
  color: var(--color-gray-700);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: 72px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-about .logo {
  margin-bottom: 20px;
}

.footer-about .logo-name {
  color: var(--color-white);
}

.footer-about p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.6;
  max-width: 340px;
}

.social {
  display: flex;
  gap: 10px;
}

.social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social a:hover {
  background: var(--color-red);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--color-white);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-col ul a:hover {
  color: var(--color-red-light);
}

.footer-col .phone {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-white);
  display: block;
  margin-bottom: 8px;
}

.footer-col .phone:hover {
  color: var(--color-red-light);
}

.footer-col .email,
.footer-col .address {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a:hover {
  color: var(--color-red-light);
}

/* ============================================
   PAGE HEADER (inner pages)
   ============================================ */
.page-header {
  background: var(--color-black);
  color: var(--color-white);
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(115, 191, 67, 0.3) 0%, transparent 60%);
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumbs a:hover {
  color: var(--color-red-light);
}

.breadcrumbs .separator {
  opacity: 0.5;
}

.page-header h1 {
  font-size: clamp(36px, 5vw, 64px);
  color: var(--color-white);
  margin-bottom: 16px;
}

.page-header .lead {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 640px;
}

/* Price table */
.price-table {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.price-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 20px 28px;
  align-items: center;
  border-bottom: 1px solid var(--color-gray-100);
  transition: var(--transition);
}

.price-row:last-child {
  border-bottom: none;
}

.price-row.head {
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.05em;
}

.price-row:not(.head):hover {
  background: var(--color-gray-100);
}

.price-row .cat-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
}

.price-row .price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-red);
}

/* Promo cards */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.promo-card {
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  color: var(--color-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.promo-card.dark {
  background: linear-gradient(135deg, var(--color-black) 0%, var(--color-gray-900) 100%);
}

.promo-card::before {
  content: '%';
  position: absolute;
  top: -20px;
  right: -20px;
  font-family: var(--font-display);
  font-size: 260px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.promo-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  width: fit-content;
}

.promo-card h3 {
  font-size: 30px;
  color: var(--color-white);
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.promo-card p {
  opacity: 0.9;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.promo-card .btn-white {
  align-self: flex-start;
  position: relative;
  z-index: 2;
}

/* Document / info page content */
.content-page {
  background: var(--color-white);
}

.content-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

.content-wrapper h2 {
  font-size: 32px;
  margin: 40px 0 20px;
}

.content-wrapper h3 {
  font-size: 22px;
  margin: 28px 0 12px;
}

.content-wrapper p {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-gray-900);
}

.content-wrapper ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.content-wrapper li {
  margin-bottom: 8px;
  line-height: 1.7;
  color: var(--color-gray-900);
}

.info-box {
  background: var(--color-gray-100);
  border-left: 4px solid var(--color-red);
  padding: 24px 28px;
  border-radius: 8px;
  margin: 24px 0;
}

.info-box-title {
  font-family: var(--font-display);
  font-size: 18px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--color-red);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .categories-grid,
  .features-grid,
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cars-grid,
  .instructors-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 10px;
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .price-row {
    grid-template-columns: 1.5fr 1fr 1fr;
    font-size: 14px;
  }

  .price-row .col-hide-tablet {
    display: none;
  }
}

@media (max-width: 640px) {
  section {
    padding: 56px 0;
  }

  .categories-grid,
  .features-grid,
  .reviews-grid,
  .cars-grid,
  .instructors-grid,
  .steps-grid,
  .promo-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 48px 0;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-form {
    padding: 28px 20px;
  }

  .cta-banner .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .header-top-left {
    display: none;
  }

  .logo-tagline {
    display: none;
  }

  .price-row {
    grid-template-columns: 1fr 1fr;
    padding: 14px 16px;
  }

  .price-row .col-hide-mobile {
    display: none;
  }

  .contacts-info {
    padding: 28px;
  }
}

/* Utilities */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-auto { margin-top: auto; }

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }
.animate-in:nth-child(6) { animation-delay: 0.6s; }

/* Pulse for CTA */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(115, 191, 67, 0.4); }
  50% { box-shadow: 0 0 0 16px rgba(115, 191, 67, 0); }
}

.pulse {
  animation: pulse 2s infinite;
}


.form-success {
  margin-top: 12px;
  padding: 12px 16px;
  background: #e7f7ec;
  color: #1a7f3a;
  border-radius: 8px;
  font-size: 14px;
}
.form-error {
  margin-top: 12px;
  padding: 12px 16px;
  background: #fdecec;
  color: #b3261e;
  border-radius: 8px;
  font-size: 14px;
}

.branches-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.branch-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid transparent;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.branch-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.branch-card.main { border-color: var(--color-red); }
.branch-photo { height: 180px; overflow: hidden; background: var(--color-gray-100); }
.branch-photo img { width: 100%; height: 100%; object-fit: cover; }
.branch-body { padding: 24px; }
.branch-badge {
  display: inline-block; background: var(--color-red); color: #fff;
  padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px;
}
.branch-address { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.branch-postal { font-size: 13px; color: var(--color-gray-500); margin-bottom: 12px; }
.branch-phone { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--color-red); }
.branch-phone:hover { color: var(--color-red-dark); }
@media (max-width: 1024px) { .branches-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .branches-grid { grid-template-columns: 1fr; } }

/* === Branch selector === */
.branch-selector {
  position: relative;
}

.branch-selector-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--color-white);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: var(--transition);
}

.branch-selector-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-red-light);
}

.branch-selector-arrow {
  font-size: 10px;
  transition: transform 0.2s;
  margin-left: 2px;
}

.branch-selector.open .branch-selector-arrow {
  transform: rotate(180deg);
}

.branch-selector-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--color-white);
  color: var(--color-black);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  min-width: 340px;
  padding: 14px;
  z-index: 200;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.branch-selector-title {
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gray-500);
  margin-bottom: 10px;
  padding: 0 4px;
}

.branch-selector-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 4px;
  transition: var(--transition);
  cursor: pointer;
  background: transparent;
  border: 2px solid transparent;
}

.branch-selector-option:hover {
  background: var(--color-gray-100);
}

.branch-selector-option.active {
  background: var(--color-gray-100);
  border-color: var(--color-red);
}

.branch-selector-option-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-black);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.branch-selector-option-addr {
  font-size: 12px;
  color: var(--color-gray-700);
  margin-bottom: 2px;
}

.branch-selector-option-phone {
  font-size: 12px;
  color: var(--color-red);
  font-weight: 600;
}

/* Выделение выбранной карточки в секции филиалов */
.branch-card.current {
  border-color: var(--color-red);
  box-shadow: 0 10px 40px rgba(115, 191, 67, 0.2);
  transform: translateY(-4px);
}

@media (max-width: 640px) {
  .branch-selector-dropdown {
    position: fixed;
    right: 12px;
    left: 12px;
    top: auto;
    min-width: 0;
    width: auto;
    max-width: calc(100vw - 24px);
    margin-top: 8px;
  }
}

/* === Category detail page === */
.cat-page-head {
  display: flex;
  align-items: center;
  gap: 28px;
}
.cat-page-icon {
  width: 110px;
  height: 110px;
  background: var(--color-red);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  color: #fff;
  box-shadow: 0 10px 40px rgba(115, 191, 67, 0.4);
  flex-shrink: 0;
}

.cat-summary {
  background: var(--color-gray-100);
  padding: 40px 0;
}
.cat-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 30px;
  align-items: center;
  background: #fff;
  padding: 32px 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.cat-summary-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gray-500);
  margin-bottom: 6px;
}
.cat-summary-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-red);
  line-height: 1;
}
.cat-summary-hint {
  font-size: 12px;
  color: var(--color-gray-500);
  margin-top: 4px;
}

@media (max-width: 1024px) {
  .cat-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-summary-cta {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .cat-page-head {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .cat-summary-grid {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

/* === Карта филиала на главной === */
.contacts-map[data-branch-map] {
  padding: 0;
  background: var(--color-black);
  background-image: none;
  display: block;
  overflow: hidden;
}

.branch-map-frame {
  width: 100%;
  height: 100%;
  min-height: 480px;
  position: relative;
}

.branch-map-frame iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 480px;
  border: 0 !important;
  display: block;
}

.contacts-map > iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 520px;
  border: 0 !important;
  display: block;
}

.instructor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.instructors-grid-full {
  gap: 28px;
}
@media (max-width: 1024px) {
  .instructors-grid-full { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 720px) {
  .instructors-grid-full { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .instructors-grid-full { grid-template-columns: 1fr !important; }
}

/* === Документы /sveden/ === */
.docs-toc {
  background: var(--color-gray-100);
  border-left: 4px solid var(--color-red);
  padding: 24px 28px;
  border-radius: 8px;
  margin-bottom: 40px;
}
.docs-toc h3 {
  font-size: 18px;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--color-red);
}
.docs-toc ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}
.docs-toc a {
  color: var(--color-gray-900);
  font-weight: 500;
  font-size: 15px;
}
.docs-toc a:hover { color: var(--color-red); }

.docs-block {
  margin-bottom: 48px;
  scroll-margin-top: 120px;
}
.docs-block h2 {
  font-size: 28px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.docs-block-desc {
  color: var(--color-gray-700);
  margin-bottom: 20px;
  font-size: 15px;
}

.docs-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.doc-card {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-white);
  border: 2px solid var(--color-gray-100);
  border-radius: var(--radius);
  transition: var(--transition);
}
.doc-card:hover {
  border-color: var(--color-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.doc-icon {
  flex-shrink: 0;
  width: 48px;
  height: 56px;
  background: var(--color-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.doc-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-black);
  margin-bottom: 4px;
  line-height: 1.4;
}
.doc-desc {
  font-size: 13px;
  color: var(--color-gray-700);
  margin-bottom: 6px;
}
.doc-meta {
  font-size: 12px;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.docs-empty {
  color: var(--color-gray-500);
  font-style: italic;
}

@media (max-width: 720px) {
  .docs-toc ul,
  .docs-list { grid-template-columns: 1fr; }
}

.reviews-grid-full {
  gap: 24px;
}
@media (max-width: 1024px) {
  .reviews-grid-full { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px) {
  .reviews-grid-full { grid-template-columns: 1fr !important; }
}

/* === Staff в /sveden/ === */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 32px 0;
}
.staff-grid-compact {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.staff-card {
  background: var(--color-white);
  border: 2px solid var(--color-gray-100);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.staff-card-compact {
  flex-direction: column;
  text-align: center;
  align-items: center;
  padding: 18px;
}

.staff-photo {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-gray-100);
  position: relative;
}
.staff-card-compact .staff-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
}
.staff-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.staff-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  color: rgba(255, 255, 255, 0.6);
  background: linear-gradient(135deg, var(--color-gray-500), var(--color-gray-700));
}

.staff-body { flex: 1; }
.staff-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-black);
  margin-bottom: 4px;
}
.staff-card-compact .staff-name { font-size: 15px; }
.staff-position {
  color: var(--color-red);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.staff-meta {
  font-size: 13px;
  color: var(--color-gray-700);
  margin-bottom: 4px;
  line-height: 1.5;
}
.staff-quote {
  margin-top: 14px;
  padding: 14px 18px;
  border-left: 3px solid var(--color-red);
  background: var(--color-gray-100);
  border-radius: 8px;
  font-style: italic;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-gray-900);
}

.staff-section-title {
  font-size: 20px;
  text-transform: uppercase;
  color: var(--color-black);
  margin: 32px 0 16px;
  letter-spacing: 0.02em;
}

@media (max-width: 1024px) {
  .staff-grid { grid-template-columns: 1fr; }
  .staff-grid-compact { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .staff-grid-compact { grid-template-columns: 1fr; }
  .staff-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

.logo-mark-image {
  width: 55px;
  height: 55px;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 0;
  object-fit: contain;
}
.logo-mark-image::after {
  display: none !important;
}

.dropdown.dropdown-wide {
  min-width: 360px;
}
.dropdown.dropdown-wide a {
  white-space: normal;
  line-height: 1.35;
  padding: 10px 14px;
}

/* ============ Сведения об образовательной организации ============ */
.sveden-on-home {
  padding: 80px 0;
  background: #f7f9f5;
}

.sveden-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.sveden-card {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid #e6ece2;
  border-radius: 12px;
  padding: 20px 24px;
  text-decoration: none;
  color: #1f2a1c;
  transition: all 0.2s;
}

.sveden-card:hover {
  border-color: var(--color-primary, #73BF43);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(115, 191, 67, 0.12);
}

.sveden-card-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 6px;
  padding-right: 24px;
}

.sveden-card-desc {
  font-size: 13px;
  color: #6b7568;
  line-height: 1.45;
}

.sveden-card-arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 18px;
  color: var(--color-primary, #73BF43);
}

/* Layout страницы одного раздела */
.sveden-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .sveden-layout { grid-template-columns: 1fr; }
  .sveden-toc { order: 2; }
}

.sveden-toc {
  position: sticky;
  top: 90px;
  background: #f7f9f5;
  border-radius: 12px;
  padding: 20px;
}
.sveden-toc h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6b7568;
  margin: 0 0 12px;
}
.sveden-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sveden-toc li {
  margin-bottom: 4px;
}
.sveden-toc li a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: #1f2a1c;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.3;
  transition: background 0.15s;
}
.sveden-toc li a:hover {
  background: rgba(115, 191, 67, 0.08);
}
.sveden-toc li.active a {
  background: var(--color-primary, #73BF43);
  color: #fff;
}

/* Таблицы внутри content (любые, не только с классом sv-table) */
.sveden-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}
.sveden-content table th,
.sveden-content table td {
  border: 1px solid #e0e6dd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.sveden-content table thead th {
  background: #f0f5ea;
  font-weight: 600;
  color: #1f2a1c;
}
.sveden-content table tbody tr:nth-child(even) {
  background: #fafdf7;
}

/* Заголовки внутри content */
.sveden-content h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 20px;
  color: #1f2a1c;
}

.hero h1 .accent,
.accent {
  text-decoration: none !important;
}

.page-header {
  padding-top: 48px !important;
  padding-bottom: 48px !important;
}
.page-header h1 {
  font-size: clamp(36px, 5vw, 64px) !important;
  margin-bottom: 12px !important;
}

.sveden-content .content-wrapper {
  overflow-x: auto;
}
.sveden-content table {
  min-width: 700px;
}

/* === Блок «Финансовое обеспечение» в /sveden/9-finansy/ === */
.fin-overview {
  background: linear-gradient(135deg, #f7f9f5 0%, #e8f5da 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
}

.fin-overview-title {
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #1f2a1c;
  margin: 0 0 24px;
  line-height: 1.4;
}

.fin-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.fin-source {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 110px;
  border-left: 4px solid #d9e3cf;
}

.fin-source.fin-source-active {
  border-left-color: var(--color-primary);
  background: #fff;
}

.fin-source-label {
  font-size: 13px;
  line-height: 1.4;
  color: #4a5547;
  text-transform: none;
  letter-spacing: 0;
}

.fin-source-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #c4cebd;
  line-height: 1;
}

.fin-source.fin-source-active .fin-source-value {
  color: var(--color-primary);
}

@media (max-width: 640px) {
  .fin-overview { padding: 20px; }
  .fin-overview-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fin-source { padding: 14px 16px; min-height: 90px; }
  .fin-source-value { font-size: 26px; }
}

/* === Кнопка "Дистанционное обучение" в Hero === */
.hero-distant {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 16px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(115, 191, 67, 0.3);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-white);
  max-width: 100%;
  width: fit-content;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.hero-distant::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(115, 191, 67, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.hero-distant:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(115, 191, 67, 0.25);
}

.hero-distant:hover::before {
  opacity: 1;
}

.hero-distant-img {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-distant-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-distant-text {
  flex: 1;
  position: relative;
  z-index: 1;
}

.hero-distant-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 4px;
}

.hero-distant-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.35;
}

.hero-distant-arrow {
  flex-shrink: 0;
  font-size: 24px;
  color: var(--color-primary);
  font-weight: 300;
  transition: transform 0.3s;
  position: relative;
  z-index: 1;
}

.hero-distant:hover .hero-distant-arrow {
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .hero-distant {
    padding: 12px 16px 12px 12px;
    gap: 12px;
  }
  .hero-distant-img {
    width: 52px;
    height: 52px;
  }
  .hero-distant-title {
    font-size: 18px;
  }
  .hero-distant-sub {
    font-size: 12px;
  }
}

/* === Плавающие кнопки мессенджеров === */
.floating-messengers {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 90;
}

.fm-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  animation: fm-appear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.fm-btn:nth-child(1) { animation-delay: 0.3s; }
.fm-btn:nth-child(2) { animation-delay: 0.4s; }

@keyframes fm-appear {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

.fm-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.fm-btn svg,
.fm-btn img {
  width: 32px;
  height: 32px;
  display: block;
}

.fm-btn img {
  border-radius: 8px;
}

.fm-max {
  background: #fff;
  padding: 0;
}
.fm-max img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.fm-vk {
  background: linear-gradient(135deg, #0077FF 0%, #0056cc 100%);
}

/* Пульсирующий эффект для привлечения внимания */
.fm-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  z-index: -1;
  animation: fm-pulse 2s infinite;
  opacity: 0;
}

@keyframes fm-pulse {
  0% {
    opacity: 0.4;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

@media (max-width: 640px) {
  .floating-messengers {
    right: 16px;
    bottom: 16px;
    gap: 10px;
  }
  .fm-btn {
    width: 48px;
    height: 48px;
  }
  .fm-btn svg {
    width: 24px;
    height: 24px;
  }
  .fm-max img {
    width: 48px;
    height: 48px;
  }
}

/* === Универсальная модалка с формой заявки === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 14, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.modal-overlay.open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--color-gray-700);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.modal-close:hover {
  background: var(--color-primary);
  color: #fff;
  transform: rotate(90deg);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-black);
  margin: 0 0 8px;
  line-height: 1.1;
}

.modal-sub {
  color: var(--color-gray-700);
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.5;
}

.modal-box .form-group {
  margin-bottom: 14px;
}

.modal-box .form-group input,
.modal-box .form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  background: #fff;
  transition: var(--transition);
}

.modal-box .form-group input:focus,
.modal-box .form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.modal-box button[type="submit"] {
  width: 100%;
  margin-top: 8px;
}

.modal-box .form-agreement {
  font-size: 12px;
  color: var(--color-gray-500);
  margin-top: 12px;
  line-height: 1.5;
  text-align: center;
}

.modal-box .form-agreement a {
  color: var(--color-primary);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .modal-box {
    padding: 28px 20px;
  }
  .modal-title {
    font-size: 22px;
  }
}

body.modal-open {
  overflow: hidden;
}

/* === Страница спецпредложения === */
.offer-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.offer-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: transparent;
}

.offer-image img {
  width: 100%;
  height: auto;
  display: block;
}

.offer-body-full {
  grid-column: 1 / -1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.offer-body-full .offer-content ul {
  text-align: left;
}

.offer-body-full .offer-actions {
  justify-content: center;
}

.offer-intro {
  font-size: 19px;
  line-height: 1.6;
  color: var(--color-gray-900);
  margin-bottom: 24px;
}

.offer-content {
  margin-bottom: 28px;
}

.offer-content p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 14px;
  color: var(--color-gray-900);
}

.offer-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.offer-content ul li {
  position: relative;
  padding: 12px 0 12px 44px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-gray-900);
  border-bottom: 1px solid var(--color-gray-100);
}

.offer-content ul li:last-child {
  border-bottom: none;
}

.offer-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
}

.offer-content ul li::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 19px;
  width: 12px;
  height: 6px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg);
}

.offer-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 2px solid var(--color-gray-100);
}

.offer-price {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

@media (max-width: 900px) {
  .offer-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .offer-image {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* === Картинка администратора в модалке === */
.modal-box {
  display: flex;
  gap: 24px;
  align-items: center;
  max-width: 640px;
}

.modal-avatar {
  flex-shrink: 0;
  width: 160px;
  height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #F5FBEC;
}

.modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-content {
  flex: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  .modal-box {
    flex-direction: column;
    align-items: stretch;
    padding: 28px 20px;
    gap: 12px;
    max-width: 100%;
  }
  /* Убираем декоративного человечка на мобильном */
  .modal-avatar {
    display: none;
  }
  .modal-content {
    width: 100%;
  }
  .modal-title {
    font-size: 22px;
  }
  .modal-box .form-group input,
  .modal-box .form-group select {
    width: 100%;
    box-sizing: border-box;
  }
}

/* === Бейдж "Хорошее место" Яндекс === */
.yandex-badge {
  display: inline-block;
  width: 72px;
  vertical-align: middle;
  margin-left: 14px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.3));
}

.yandex-badge img {
  width: 100%;
  height: auto;
  display: block;
}

.yandex-badge:hover {
  transform: translateY(-4px) rotate(-2deg);
}

@media (max-width: 1024px) {
  .yandex-badge {
    width: 60px;
  }
}

@media (max-width: 640px) {
  .yandex-badge {
    width: 52px;
    margin-left: 10px;
  }
}

.hero-badges-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 8px;
}

/* Кликабельные карточки филиалов */
.branch-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.branch-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* Активная (выбранная) карточка */
.branch-card.current {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.bvi-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: inherit;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.bvi-trigger:hover {
  background: rgba(255,255,255,0.1);
}

/* === Блок "Оплата онлайн" в Hero === */
.hero-pay {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.hero-pay-head h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-black);
  margin: 0 0 6px;
  line-height: 1.1;
}

.hero-pay-head p {
  color: var(--color-gray-700);
  font-size: 15px;
  margin: 0 0 24px;
}

.hero-pay-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-pay-list li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-pay-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-primary-light, #E8F5DA);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-display);
}

.hero-pay-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--color-black);
  margin-bottom: 2px;
}

.hero-pay-desc {
  font-size: 13px;
  color: var(--color-gray-700);
  line-height: 1.4;
}

.hero-pay-btn {
  width: 100%;
}

.hero-pay-note {
  font-size: 12px;
  color: var(--color-gray-500);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.5;
}

.hero-pay-note a {
  color: var(--color-primary);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .hero-pay {
    padding: 28px 20px;
  }
  .hero-pay-head h3 {
    font-size: 22px;
  }
}

/* === Кнопка "Обратный звонок" сбоку === */
.callback-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 89;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 18px 10px;
  border-radius: 8px 0 0 8px;
  box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.callback-tab-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transform: rotate(180deg);
  display: inline-block;
}

.callback-tab:hover {
  padding-right: 16px;
  background: var(--color-primary-dark, #5BA32E);
}

@media (max-width: 640px) {
  .callback-tab {
    padding: 14px 8px;
  }
  .callback-tab-text {
    font-size: 12px;
  }
}

/* =========================================================
   ОНЛАЙН-ОПЛАТА (страница /oplata/)
   ========================================================= */
.pay-wrapper {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

.pay-form {
  background: #fff;
  border: 1px solid var(--color-gray-200, #e5e7eb);
  border-radius: var(--radius-lg, 20px);
  padding: 36px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.pay-field {
  margin-bottom: 20px;
}

.pay-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-black);
  margin-bottom: 8px;
}

.pay-field label span {
  color: var(--color-primary);
}

.pay-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-gray-200, #e5e7eb);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.pay-field input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.pay-field small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-gray-500, #6b7280);
}

.pay-submit {
  width: 100%;
  margin-top: 4px;
}

.pay-agreement {
  font-size: 12px;
  color: var(--color-gray-500, #6b7280);
  text-align: center;
  margin: 16px 0 0;
  line-height: 1.5;
}

.pay-agreement a {
  color: var(--color-primary);
  text-decoration: underline;
}

.pay-errors {
  margin-bottom: 20px;
}

.pay-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 8px;
}

/* Правая колонка с информацией */
.pay-info-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pay-info-card {
  background: var(--color-gray-50, #f9fafb);
  border: 1px solid var(--color-gray-200, #e5e7eb);
  border-radius: 16px;
  padding: 24px;
}

.pay-info-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-black);
  margin: 0 0 14px;
}

.pay-info-card p {
  font-size: 14px;
  color: var(--color-gray-700, #374151);
  line-height: 1.5;
  margin: 0;
}

.pay-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-steps li {
  font-size: 14px;
  color: var(--color-gray-700, #374151);
  line-height: 1.4;
}

.pay-info-secure {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--color-primary-light, #E8F5DA);
  border-color: transparent;
}

.pay-secure-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.pay-info-secure strong {
  display: block;
  margin-bottom: 4px;
  color: var(--color-black);
}

.pay-phone-link {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
}

/* Страница успешной оплаты */
.pay-result {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 0;
}

.pay-result-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-result h1 {
  margin-bottom: 16px;
}

.pay-result-note {
  margin: 20px 0 28px;
  color: var(--color-gray-700, #374151);
}

.pay-result-note a {
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .pay-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .pay-form {
    padding: 24px;
  }
}

/* =========================================================
   ЗАКЛЮЧЕНИЕ ДОГОВОРА ОНЛАЙН (страница /dogovor/)
   Использует общие классы pay-* со страницы оплаты
   ========================================================= */
.dogovor-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}

.dogovor-form {
  background: #fff;
  border: 1px solid var(--color-gray-200, #e5e7eb);
  border-radius: var(--radius-lg, 20px);
  padding: 36px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.dogovor-section {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-gray-200, #e5e7eb);
}

.dogovor-section:last-of-type {
  border-bottom: none;
  margin-bottom: 20px;
  padding-bottom: 0;
}

.dogovor-section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-black);
  margin: 0 0 18px;
}

.dogovor-hint {
  font-size: 13px;
  color: var(--color-gray-500, #6b7280);
  margin: -8px 0 18px;
}

/* Радио-кнопки в ряд */
.dogovor-radio-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 10px;
}

.dogovor-radio {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1.5px solid var(--color-gray-300, #d9d9d9);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  margin: 0 !important;
  background: #fff;
  width: auto !important;
}

.dogovor-radio span {
  color: var(--color-black) !important;
  text-decoration: none !important;
  font-weight: 500;
  display: inline !important;
}

.dogovor-radio:hover {
  border-color: var(--color-primary);
}

.dogovor-radio input[type="radio"] {
  appearance: auto !important;
  -webkit-appearance: radio !important;
  accent-color: var(--color-primary);
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  opacity: 1 !important;
  flex-shrink: 0;
  border: initial !important;
}

.dogovor-radio input[type="radio"]:checked + span {
  color: var(--color-primary) !important;
  font-weight: 600;
}

.dogovor-radio:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light, #E8F5DA);
}

/* Поля ввода (наследуют стиль pay-field) */
.dogovor-form select,
.dogovor-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-gray-200, #e5e7eb);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  box-sizing: border-box;
  background: #fff;
}

.dogovor-form select:focus,
.dogovor-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Поля загрузки файлов */
.dogovor-file {
  margin-bottom: 18px;
}

.dogovor-file label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-black);
  margin-bottom: 8px;
}

.dogovor-file label span {
  color: var(--color-primary);
}

.dogovor-file label span.opt {
  color: var(--color-gray-500, #6b7280);
  font-weight: 400;
}

.dogovor-file input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 1.5px dashed var(--color-gray-300, #d1d5db);
  border-radius: 12px;
  font-size: 14px;
  background: var(--color-gray-50, #f9fafb);
  cursor: pointer;
  box-sizing: border-box;
}

.dogovor-file input[type="file"]:hover {
  border-color: var(--color-primary);
}

.dogovor-file small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-gray-500, #6b7280);
}

.dogovor-file small a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Согласие */
.dogovor-agree {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--color-gray-700, #374151);
  line-height: 1.5;
  cursor: pointer;
}

.dogovor-agree input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.dogovor-agree a {
  color: var(--color-primary);
  text-decoration: underline;
}

.dogovor-submit {
  width: 100%;
}

.dogovor-info-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 860px) {
  .dogovor-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .dogovor-form {
    padding: 24px;
  }
}

/* Усиление формы договора против глобальных стилей */
.dogovor-form .dogovor-section { display: block; width: 100%; }
.dogovor-file { display: block; width: 100%; }
.dogovor-file input[type="file"] { display: block; }
.dogovor-agree { display: flex !important; flex-direction: row !important; }
.dogovor-agree input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}
.dogovor-submit { display: inline-flex; width: 100%; margin-top: 8px; }

/* Обрезка отзывов на главной (6 строк + многоточие) */
.reviews-grid .review-text {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* На странице всех отзывов /otzyvy/ — показываем полностью */
.reviews-grid-full .review-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* ============================================
   ФИКС ГОРИЗОНТАЛЬНОГО ЛЮФТА НА МОБИЛЬНЫХ
   ============================================ */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

* {
  /* предотвращаем выход за границы из-за длинных слов/ссылок */
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  /* Ничто не должно быть шире экрана */
  .container {
    overflow-x: hidden;
  }

  /* Длинные заголовки переносим, чтобы не растягивали страницу */
  .hero h1 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Боковая кнопка "Обратный звонок" не должна давать люфт */
  .callback-tab {
    right: 0;
    max-width: 44px;
    overflow: hidden;
  }
  .callback-tab:hover {
    padding-right: 8px; /* убираем расширение по hover на тач-устройствах */
  }

  /* Плавающие кнопки — прижать к краю аккуратно */
  .floating-messengers {
    right: 12px;
  }

  /* Карта и iframe не вылезают */
  iframe,
  .contacts-map,
  .branch-map-frame {
    max-width: 100%;
  }

  /* Таблицы сведений со скроллом внутри, а не наружу */
  .sveden-content {
    max-width: 100%;
    overflow-x: auto;
  }
}

/* ============================================
   УБИРАЕМ СИНЕЕ ВЫДЕЛЕНИЕ ПРИ ТАПЕ (мобильные)
   ============================================ */
* {
  -webkit-tap-highlight-color: transparent;
}

a,
button,
.btn,
.callback-tab,
.fm-btn,
.faq-question,
.cat-card,
.branch-card,
.modal-close,
.bvi-trigger,
.dogovor-radio,
.review-card,
[role="button"],
[onclick] {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Отступ бургера от правого края на мобильном */
@media (max-width: 1024px) {
  .burger {
    margin-right: 10px !important;
    transform: translateX(-4px);
  }
}

/* ============================================
   БЛОКИРОВКА СКРОЛЛА ПРИ ОТКРЫТОМ БУРГЕР-МЕНЮ
   ============================================ */
body.menu-open {
  overflow: hidden;
}

/* Overlay на всю реальную высоту экрана (включая зону под адресной строкой) */
.overlay {
  height: 100vh;
  height: 100dvh; /* динамическая высота вьюпорта — учитывает пропадание адресной строки */
}

/* Мобильное меню тоже на полную динамическую высоту */
.mobile-nav {
  height: 100vh;
  height: 100dvh;
}

/* Лица инструкторов — кадрировать по верхней части (чтобы не срезало головы) */
.instructor-photo img {
  object-position: top center;
}
@media (max-width: 640px) {
  .instructor-photo {
    height: 380px;
  }
}