/* ============================================================
   ДОБРЫЕ ИСТОРИИ — NPO «Добрые истории»
   Main Stylesheet
   Версия: 2.0
   ============================================================ */

/* ============================================================
   1. CSS Variables & Root
   ============================================================ */

:root {
  /* ---- Цветовая палитра ---- */
  --coral: #D4693E;
  --coral-dark: #B84A2A;
  --coral-light: #E8863A;
  --gold: #F5A623;
  --gold-light: #FCE38A;
  --rose: #B84A7C;
  --rose-light: #E8828A;
  --teal: #2E9E8C;
  --teal-light: #7BC463;
  --ice: #E8EEF5;
  --cream: #FCF9F5;
  --blush: #F7EDE8;
  --mint-tint: #EAF5EE;
  --gold-tint: #FEF5E8;
  --text-dark: #2D2420;
  --text-mid: #5A4A3E;
  --text-light: #7A6B5E;

  /* ---- Функциональные цвета ---- */
  --color-primary: var(--coral);
  --color-primary-hover: var(--coral-dark);
  --color-accent: var(--gold);
  --color-bg: var(--cream);
  --color-bg-alt: var(--ice);
  --color-text: var(--text-dark);
  --color-text-secondary: var(--text-mid);
  --color-text-muted: var(--text-light);
  --color-border: #DED6CE;
  --color-white: #FFFFFF;
  --color-black: #1A1410;

  /* ---- Градиенты секций ---- */
  --gradient-hero: linear-gradient(135deg, #2D2420 0%, #4A3830 30%, #6B4A3A 60%, var(--coral-dark) 100%);
  --gradient-about: linear-gradient(135deg, var(--cream) 0%, var(--blush) 50%, var(--gold-tint) 100%);
  --gradient-projects: linear-gradient(135deg, var(--ice) 0%, var(--mint-tint) 50%, #E0F0E8 100%);
  --gradient-media: linear-gradient(135deg, var(--blush) 0%, #F7EDE8 50%, var(--ice) 100%);
  --gradient-news: linear-gradient(135deg, var(--gold-tint) 0%, var(--cream) 50%, var(--blush) 100%);
  --gradient-help: linear-gradient(135deg, var(--mint-tint) 0%, var(--ice) 50%, var(--cream) 100%);
  --gradient-contacts: linear-gradient(135deg, var(--text-dark) 0%, #3D322E 50%, #5A4A3E 100%);

  /* ---- Тени ---- */
  --shadow-sm: 0 1px 3px rgba(45, 36, 32, 0.08);
  --shadow-md: 0 4px 12px rgba(45, 36, 32, 0.10);
  --shadow-lg: 0 8px 30px rgba(45, 36, 32, 0.12);
  --shadow-xl: 0 20px 60px rgba(45, 36, 32, 0.15);
  --shadow-glass: 0 8px 32px rgba(45, 36, 32, 0.08);
  --shadow-glow-coral: 0 0 20px rgba(212, 105, 62, 0.3);
  --shadow-glow-gold: 0 0 20px rgba(245, 166, 35, 0.3);

  /* ---- Шрифты ---- */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-subheading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* ---- Типографика ---- */
  --fs-xs: 0.75rem;     /* 12px */
  --fs-sm: 0.875rem;    /* 14px */
  --fs-base: 1rem;      /* 16px */
  --fs-md: 1.125rem;    /* 18px */
  --fs-lg: 1.25rem;     /* 20px */
  --fs-xl: 1.5rem;      /* 24px */
  --fs-2xl: 2rem;       /* 32px */
  --fs-3xl: 2.5rem;     /* 40px */
  --fs-4xl: 3rem;       /* 48px */
  --fs-5xl: 3.75rem;    /* 60px */
  --fs-6xl: 4.5rem;     /* 72px */

  --lh-tight: 1.1;
  --lh-heading: 1.2;
  --lh-body: 1.65;
  --lh-relaxed: 1.8;

  --ls-wide: 0.05em;
  --ls-wider: 0.1em;

  /* ---- Отступы ---- */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */
  --space-5xl: 8rem;     /* 128px */

  /* ---- Закругления ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ---- Сетка ---- */
  --container-max: 1200px;
  --container-narrow: 900px;
  --container-wide: 1400px;
  --grid-gap: var(--space-xl);

  /* ---- Переходы ---- */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ---- Z-индексы ---- */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-particle: 10;

  /* ---- Разное ---- */
  --header-height: 72px;
  --section-padding: var(--space-4xl) 0;
  --card-border-width: 4px;
}


/* ============================================================
   2. Reset & Base Styles
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

a:hover {
  color: var(--color-primary-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--lh-heading);
  color: var(--color-text);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); }

::selection {
  background-color: var(--coral);
  color: var(--color-white);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ice);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-mid);
}

/* ---- Контейнер ---- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* ---- Вспомогательные классы ---- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}


/* ============================================================
   3. Header & Navigation
   ============================================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  height: var(--header-height);
  background: rgba(252, 249, 245, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(222, 214, 206, 0.5);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.header--scrolled {
  background: rgba(252, 249, 245, 0.97);
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ---- Логотип ---- */

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.header__logo:hover {
  opacity: 0.85;
  color: var(--color-text);
}

.header__logo img,
.header__logo svg {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

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

.header__logo-text span:first-child {
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--coral);
}

.header__logo-text span:last-child {
  font-size: var(--fs-base);
  font-weight: 700;
}

/* ---- Навигация ---- */

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-mid);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: var(--space-md);
  right: var(--space-md);
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-base);
  border-radius: var(--radius-full);
}

.nav__link:hover {
  color: var(--coral);
  background: rgba(212, 105, 62, 0.06);
}

.nav__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__link--active {
  color: var(--coral);
}

.nav__link--active::after {
  transform: scaleX(1);
}

/* ---- Кнопка пожертвования в хедере ---- */

.header__donate-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-light) 100%);
  color: var(--color-white);
  font-weight: 700;
  font-size: var(--fs-sm);
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
  margin-left: var(--space-sm);
}

.header__donate-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-coral);
  color: var(--color-white);
}

/* ---- Бургер-кнопка ---- */

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: none;
  cursor: pointer;
  z-index: calc(var(--z-fixed) + 1);
}

.burger__line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.burger__line + .burger__line {
  margin-top: 6px;
}

/* Анимация открытого бургера */
.burger--active .burger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger--active .burger__line:nth-child(2) {
  opacity: 0;
}

.burger--active .burger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---- Навигация на мобильных ---- */

@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 340px;
    height: 100dvh;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: calc(var(--header-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
    background: var(--color-white);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    z-index: var(--z-fixed);
    overflow-y: auto;
    gap: var(--space-sm);
  }

  .nav--open {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: var(--space-xs);
  }

  .nav__link {
    width: 100%;
    padding: var(--space-md);
    font-size: var(--fs-base);
    border-radius: var(--radius-md);
  }

  .nav__link::after {
    display: none;
  }

  .nav__link--active {
    background: rgba(212, 105, 62, 0.1);
  }

  /* Оверлей при открытом меню */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 36, 32, 0.5);
    z-index: calc(var(--z-fixed) - 1);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
  }

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


/* ============================================================
   4. Hero Section
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: var(--header-height);
}

/* ---- Частицы ---- */

.hero__particles {
  position: absolute;
  inset: 0;
  z-index: var(--z-particle);
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-light);
  opacity: 0.15;
  animation: particle-drift linear infinite;
}

.particle:nth-child(1) { width: 4px; height: 4px; left: 10%; top: 20%; animation-duration: 18s; animation-delay: 0s; }
.particle:nth-child(2) { width: 8px; height: 8px; left: 25%; top: 60%; animation-duration: 22s; animation-delay: 1s; background: var(--coral-light); }
.particle:nth-child(3) { width: 5px; height: 5px; left: 40%; top: 30%; animation-duration: 16s; animation-delay: 2s; }
.particle:nth-child(4) { width: 10px; height: 10px; left: 55%; top: 70%; animation-duration: 25s; animation-delay: 0.5s; background: var(--teal-light); }
.particle:nth-child(5) { width: 6px; height: 6px; left: 70%; top: 25%; animation-duration: 20s; animation-delay: 1.5s; }
.particle:nth-child(6) { width: 7px; height: 7px; left: 85%; top: 55%; animation-duration: 19s; animation-delay: 3s; background: var(--rose-light); }
.particle:nth-child(7) { width: 4px; height: 4px; left: 50%; top: 85%; animation-duration: 15s; animation-delay: 2.5s; }
.particle:nth-child(8) { width: 9px; height: 9px; left: 15%; top: 45%; animation-duration: 24s; animation-delay: 4s; background: var(--gold); }
.particle:nth-child(9) { width: 5px; height: 5px; left: 90%; top: 15%; animation-duration: 17s; animation-delay: 3.5s; }
.particle:nth-child(10) { width: 6px; height: 6px; left: 35%; top: 10%; animation-duration: 21s; animation-delay: 5s; }

/* ---- Hero контент ---- */

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  max-width: 800px;
}

.hero__logo {
  display: inline-block;
  width: 140px;
  height: 140px;
  margin-bottom: var(--space-xl);
  animation: hero-logo-float 4s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.2));
}

.hero__logo img,
.hero__logo svg {
  width: 100%;
  height: 100%;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--fs-5xl);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero__title span {
  display: block;
}

.hero__title .highlight {
  background: linear-gradient(135deg, var(--gold) 0%, var(--coral-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-family: var(--font-subheading);
  font-size: var(--fs-xl);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-2xl);
  font-style: italic;
  line-height: var(--lh-relaxed);
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero__actions .btn {
  min-width: 200px;
}

/* ---- Счётчики Hero ---- */

.hero__counters {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  flex-wrap: wrap;
}

.hero__counter-item {
  text-align: center;
  color: var(--color-white);
}

.hero__counter-number {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: 700;
  display: block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__counter-label {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--space-xs);
  display: block;
}

/* ---- Scroll Indicator ---- */

.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  animation: scroll-hint 2.5s ease-in-out infinite;
}

.hero__scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  position: relative;
}

.hero__scroll-mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--gold);
  border-radius: var(--radius-full);
  animation: scroll-mouse-wheel 1.8s ease-in-out infinite;
}

@media (max-width: 768px) {
  .hero__title {
    font-size: var(--fs-3xl);
  }

  .hero__subtitle {
    font-size: var(--fs-base);
  }

  .hero__logo {
    width: 100px;
    height: 100px;
  }

  .hero__counter-number {
    font-size: var(--fs-2xl);
  }

  .hero__actions .btn {
    min-width: 160px;
  }

  .hero__counters {
    gap: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: var(--fs-2xl);
  }

  .hero__subtitle {
    font-size: var(--fs-sm);
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    min-width: 0;
  }

  .hero__counters {
    gap: var(--space-md);
  }

  .hero__counter-item {
    min-width: 80px;
  }

  .hero__counter-number {
    font-size: var(--fs-xl);
  }
}


/* ============================================================
   5. Sections — Общие стили
   ============================================================ */

.section {
  padding: var(--section-padding);
  position: relative;
  overflow: hidden;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section__label {
  display: inline-block;
  font-family: var(--font-subheading);
  font-size: var(--fs-lg);
  color: var(--coral);
  font-style: italic;
  margin-bottom: var(--space-sm);
  letter-spacing: var(--ls-wide);
}

.section__title {
  font-family: var(--font-heading);
  font-size: var(--fs-4xl);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.section__description {
  font-size: var(--fs-md);
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: var(--lh-relaxed);
}

/* ---- About ---- */

.section--about {
  background: var(--gradient-about);
}

/* ---- Projects ---- */

.section--projects {
  background: var(--gradient-projects);
}

/* ---- Media ---- */

.section--media {
  background: var(--gradient-media);
}

/* ---- News ---- */

.section--news {
  background: var(--gradient-news);
}

/* ---- Help (Как помочь) ---- */

.section--help {
  background: var(--gradient-help);
}

/* ---- Contacts ---- */

.section--contacts {
  background: var(--gradient-contacts);
  color: var(--color-white);
}

.section--contacts .section__title {
  color: var(--color-white);
}

.section--contacts .section__description {
  color: rgba(255, 255, 255, 0.75);
}

.section--contacts .section__label {
  color: var(--gold-light);
}

@media (max-width: 768px) {
  .section__title {
    font-size: var(--fs-2xl);
  }

  .section__description {
    font-size: var(--fs-base);
  }
}

@media (max-width: 480px) {
  .section__title {
    font-size: var(--fs-xl);
  }
}


/* ============================================================
   6. Divider — Волновые разделители
   ============================================================ */

.divider {
  position: relative;
  width: 100%;
  height: 80px;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
}

.divider svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.divider--flip svg {
  transform: rotate(180deg);
  bottom: auto;
  top: 0;
}

.divider--coral svg path { fill: var(--coral); }
.divider--coral-light svg path { fill: var(--coral-light); }
.divider--gold svg path { fill: var(--gold); }
.divider--rose svg path { fill: var(--rose); }
.divider--teal svg path { fill: var(--teal); }
.divider--cream svg path { fill: var(--cream); }
.divider--ice svg path { fill: var(--ice); }
.divider--blush svg path { fill: var(--blush); }
.divider--dark svg path { fill: var(--text-dark); }

@media (max-width: 768px) {
  .divider {
    height: 50px;
  }
}

@media (max-width: 480px) {
  .divider {
    height: 35px;
  }
}


/* ============================================================
   7. Cards — Проекты, Новости и др.
   ============================================================ */

.card {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

/* Цветная верхняя полоса */
.card__bar {
  height: var(--card-border-width);
  width: 100%;
  flex-shrink: 0;
}

/* data-color теминг для карт */
.card[data-color="coral"] .card__bar { background: var(--coral); }
.card[data-color="gold"] .card__bar { background: var(--gold); }
.card[data-color="rose"] .card__bar { background: var(--rose); }
.card[data-color="teal"] .card__bar { background: var(--teal); }
.card[data-color="coral-light"] .card__bar { background: var(--coral-light); }
.card[data-color="teal-light"] .card__bar { background: var(--teal-light); }
.card[data-color="rose-light"] .card__bar { background: var(--rose-light); }

.card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.card__body {
  padding: var(--space-lg);
}

.card__tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.card__tag[data-color="coral"] { background: rgba(212, 105, 62, 0.12); color: var(--coral); }
.card__tag[data-color="gold"] { background: rgba(245, 166, 35, 0.12); color: var(--gold); }
.card__tag[data-color="rose"] { background: rgba(184, 74, 124, 0.12); color: var(--rose); }
.card__tag[data-color="teal"] { background: rgba(46, 158, 140, 0.12); color: var(--teal); }

.card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: var(--lh-heading);
}

.card__text {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-md);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--coral);
  transition: gap var(--transition-fast);
}

.card__link:hover {
  gap: var(--space-sm);
  color: var(--coral-dark);
}

/* Сетка карт */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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


/* ============================================================
   8. Glassmorphism Cards
   ============================================================ */

.glass-card {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-glass);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.glass-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  font-size: var(--fs-xl);
}

.glass-card__icon[data-color="coral"] { background: rgba(212, 105, 62, 0.2); color: var(--coral); }
.glass-card__icon[data-color="gold"] { background: rgba(245, 166, 35, 0.2); color: var(--gold); }
.glass-card__icon[data-color="rose"] { background: rgba(184, 74, 124, 0.2); color: var(--rose); }
.glass-card__icon[data-color="teal"] { background: rgba(46, 158, 140, 0.2); color: var(--teal); }

.glass-card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.glass-card__text {
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  opacity: 0.85;
}

/* Для тёмного фона */
.glass-card--light {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.15);
}

.glass-card--light .glass-card__title {
  color: var(--color-white);
}

.glass-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

@media (max-width: 768px) {
  .glass-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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


/* ============================================================
   9. Media Tabs
   ============================================================ */

.tabs {
  width: 100%;
}

.tabs__nav {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--space-sm);
}

.tabs__btn {
  position: relative;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.tabs__btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: var(--space-lg);
  right: var(--space-lg);
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.tabs__btn:hover {
  color: var(--coral);
  background: rgba(212, 105, 62, 0.06);
}

.tabs__btn--active {
  color: var(--coral);
}

.tabs__btn--active::after {
  transform: scaleX(1);
}

.tabs__content {
  display: none;
  animation: fade-in 0.4s ease forwards;
}

.tabs__content--active {
  display: block;
}

@media (max-width: 768px) {
  .tabs__nav {
    gap: var(--space-xs);
  }

  .tabs__btn {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--fs-xs);
  }
}


/* ============================================================
   10. Masonry Gallery
   ============================================================ */

.masonry {
  column-count: 3;
  column-gap: var(--space-md);
  width: 100%;
}

.masonry__item {
  break-inside: avoid;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.masonry__item:hover {
  transform: scale(1.02);
}

.masonry__item img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-slow);
}

.masonry__item:hover img {
  transform: scale(1.05);
}

.masonry__item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45, 36, 32, 0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
  opacity: 0;
  transition: opacity var(--transition-base);
  border-radius: var(--radius-lg);
}

.masonry__item:hover .masonry__item-overlay {
  opacity: 1;
}

.masonry__item-caption {
  color: var(--color-white);
  font-size: var(--fs-sm);
  font-weight: 600;
}

@media (max-width: 768px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  .masonry {
    column-count: 1;
  }
}


/* ============================================================
   11. Badges — Бейджи новостей
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 3px 12px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.4;
}

.badge--coral {
  background: rgba(212, 105, 62, 0.12);
  color: var(--coral);
}

.badge--gold {
  background: rgba(245, 166, 35, 0.12);
  color: var(--gold);
}

.badge--rose {
  background: rgba(184, 74, 124, 0.12);
  color: var(--rose);
}

.badge--teal {
  background: rgba(46, 158, 140, 0.12);
  color: var(--teal);
}

.badge--coral-light {
  background: rgba(232, 134, 58, 0.12);
  color: var(--coral-light);
}

.badge--teal-light {
  background: rgba(123, 196, 99, 0.12);
  color: var(--teal-light);
}

.badge--rose-light {
  background: rgba(232, 130, 138, 0.12);
  color: var(--rose-light);
}

.badge--outline {
  background: transparent;
  border: 1px solid currentColor;
}

.badge--white {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
}


/* ============================================================
   12. Floating & Particle Animations
   ============================================================ */

@keyframes hero-logo-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.floating-element {
  animation: floating var(--transition-slow) ease-in-out infinite;
}

.floating-element--slow {
  animation-duration: 6s;
}

.floating-element--fast {
  animation-duration: 3s;
}

.floating-element--delay {
  animation-delay: 1.5s;
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes particle-drift {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.25;
  }
  90% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(-100vh) translateX(50px);
    opacity: 0;
  }
}

@keyframes scroll-mouse-wheel {
  0%, 100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.3;
    transform: translateX(-50%) translateY(6px);
  }
}

@keyframes scroll-hint {
  0%, 100% {
    opacity: 0.6;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(4px);
  }
}


/* ============================================================
   13. Animations — Pulse-ring, Shimmer, Fade-in, Reveal
   ============================================================ */

/* ---- Pulse Ring ---- */

.btn--pulse {
  position: relative;
}

.btn--pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--coral);
  animation: pulse-ring 2s ease-out infinite;
}

.btn--pulse:hover::before {
  animation: none;
  opacity: 0;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* ---- Shimmer на hover ---- */

.btn--shimmer {
  position: relative;
  overflow: hidden;
}

.btn--shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-20deg);
  transition: left var(--transition-slow);
}

.btn--shimmer:hover::after {
  left: 120%;
}

.card--shimmer {
  position: relative;
  overflow: hidden;
}

.card--shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  z-index: 1;
  pointer-events: none;
}

.card--shimmer:hover::before {
  left: 125%;
}

/* ---- Fade-in на скролле (reveal) ---- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  transform: translateX(-30px);
}

.reveal--left.reveal--visible {
  transform: translateX(0);
}

.reveal--right {
  transform: translateX(30px);
}

.reveal--right.reveal--visible {
  transform: translateX(0);
}

.reveal--scale {
  transform: scale(0.9);
}

.reveal--scale.reveal--visible {
  transform: scale(1);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---- Keyframes general ---- */

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

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

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


/* ============================================================
   14. Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.2;
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-light) 100%);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(212, 105, 62, 0.35);
}

.btn--primary:hover {
  box-shadow: var(--shadow-glow-coral);
  color: var(--color-white);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-white);
}

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

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

.btn--gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--coral-light) 100%);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.35);
}

.btn--gold:hover {
  box-shadow: var(--shadow-glow-gold);
  color: var(--color-white);
}

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

.btn--white:hover {
  background: var(--ice);
  color: var(--coral-dark);
}

.btn--dark {
  background: var(--text-dark);
  color: var(--color-white);
  border: 2px solid var(--text-dark);
}

.btn--dark:hover {
  background: transparent;
  color: var(--text-dark);
}

.btn--sm {
  padding: 8px 16px;
  font-size: var(--fs-xs);
}

.btn--lg {
  padding: 16px 36px;
  font-size: var(--fs-base);
}

.btn--block {
  width: 100%;
}


/* ============================================================
   15. Форма обратной связи
   ============================================================ */

.form {
  max-width: 640px;
  margin: 0 auto;
}

.form__group {
  margin-bottom: var(--space-lg);
}

.form__label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--color-text);
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(212, 105, 62, 0.12);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--color-text-muted);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

.form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235A4A3E' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form__error {
  font-size: var(--fs-xs);
  color: #D53F3F;
  margin-top: var(--space-xs);
}

.form__success {
  text-align: center;
  padding: var(--space-xl);
  background: rgba(46, 158, 140, 0.08);
  border-radius: var(--radius-lg);
  border: 1px solid var(--teal-light);
  color: var(--teal);
  display: none;
}

.form__success--visible {
  display: block;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.form__checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--coral);
}

.form__checkbox label {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
}

/* Форма на тёмном фоне */
.form--light .form__label {
  color: rgba(255, 255, 255, 0.8);
}

.form--light .form__input,
.form--light .form__textarea,
.form--light .form__select {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
}

.form--light .form__input:focus,
.form--light .form__textarea:focus,
.form--light .form__select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.form--light .form__input::placeholder,
.form--light .form__textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form--light .form__checkbox label {
  color: rgba(255, 255, 255, 0.75);
}

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


/* ============================================================
   16. Footer — 4 колонки
   ============================================================ */

.footer {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-4xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand {
  max-width: 320px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.footer__logo img,
.footer__logo svg {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
}

.footer__logo-text {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.1;
}

.footer__logo-text span:first-child {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--coral);
  display: block;
}

.footer__description {
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-lg);
  color: rgba(255, 255, 255, 0.6);
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-md);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.footer__social-link:hover {
  background: var(--coral);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer__heading {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__link {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--coral-light);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.6);
}

.footer__contact-icon {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  color: var(--coral-light);
  margin-top: 2px;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copyright {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.4);
}

.footer__legal-links {
  display: flex;
  gap: var(--space-lg);
}

.footer__legal-link {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.4);
  transition: color var(--transition-fast);
}

.footer__legal-link:hover {
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer__brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

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


/* ============================================================
   17. Responsive — Адаптивность
   ============================================================ */

/* ---- 768px ---- */
@media (max-width: 768px) {
  :root {
    --section-padding: var(--space-3xl) 0;
    --grid-gap: var(--space-lg);
  }

  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  h3 { font-size: var(--fs-xl); }

  .container {
    padding: 0 var(--space-lg);
  }

  .section__header {
    margin-bottom: var(--space-2xl);
  }
}

/* ---- 480px ---- */
@media (max-width: 480px) {
  :root {
    --section-padding: var(--space-2xl) 0;
    --grid-gap: var(--space-md);
    --header-height: 64px;
  }

  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
  h3 { font-size: var(--fs-lg); }

  .container {
    padding: 0 var(--space-md);
  }

  .section__header {
    margin-bottom: var(--space-lg);
  }
}


/* ============================================================
   18. @media print
   ============================================================ */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #000 !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .header,
  .footer,
  .burger,
  .hero__scroll-indicator,
  .hero__particles,
  .divider,
  .btn,
  .nav-overlay,
  .form {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero__title {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
  }

  .hero__subtitle {
    color: #333 !important;
  }

  .hero__counters {
    display: none !important;
  }

  .section {
    padding: 1.5rem 0 !important;
    page-break-inside: avoid;
  }

  .card,
  .glass-card {
    border: 1px solid #ddd !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .card__bar {
    height: 2px !important;
    background: #ccc !important;
  }

  .masonry {
    column-count: 2;
  }

  .masonry__item {
    break-inside: avoid;
  }

  .masonry__item-overlay {
    display: none !important;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666 !important;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after {
    content: '';
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .tabs__content {
    display: block !important;
  }

  .tabs__btn--active {
    font-weight: bold;
  }

  @page {
    margin: 2cm;
  }
}


/* ============================================================
   19. data-color Selectors — Глобальный теминг
   ============================================================ */

/* ---- Текстовые цвета ---- */

[data-color="coral"] { color: var(--coral); }
[data-color="gold"] { color: var(--gold); }
[data-color="rose"] { color: var(--rose); }
[data-color="teal"] { color: var(--teal); }
[data-color="coral-light"] { color: var(--coral-light); }
[data-color="teal-light"] { color: var(--teal-light); }
[data-color="rose-light"] { color: var(--rose-light); }

/* ---- Фоновые цвета ---- */

[data-color-bg="coral"] { background: var(--coral); }
[data-color-bg="gold"] { background: var(--gold); }
[data-color-bg="rose"] { background: var(--rose); }
[data-color-bg="teal"] { background: var(--teal); }
[data-color-bg="coral-light"] { background: var(--coral-light); }
[data-color-bg="teal-light"] { background: var(--teal-light); }
[data-color-bg="rose-light"] { background: var(--rose-light); }
[data-color-bg="cream"] { background: var(--cream); }
[data-color-bg="ice"] { background: var(--ice); }
[data-color-bg="blush"] { background: var(--blush); }
[data-color-bg="mint-tint"] { background: var(--mint-tint); }
[data-color-bg="gold-tint"] { background: var(--gold-tint); }
[data-color-bg="dark"] { background: var(--text-dark); }

/* ---- Градиенты ---- */

[data-gradient="hero"] { background: var(--gradient-hero); }
[data-gradient="about"] { background: var(--gradient-about); }
[data-gradient="projects"] { background: var(--gradient-projects); }
[data-gradient="media"] { background: var(--gradient-media); }
[data-gradient="news"] { background: var(--gradient-news); }
[data-gradient="help"] { background: var(--gradient-help); }
[data-gradient="contacts"] { background: var(--gradient-contacts); }

/* ---- data-color на фоне карточек и иконок ---- */

.card[data-color="coral"] { border-top-color: var(--coral); }
.card[data-color="gold"] { border-top-color: var(--gold); }
.card[data-color="rose"] { border-top-color: var(--rose); }
.card[data-color="teal"] { border-top-color: var(--teal); }

/* ---- Границы ---- */

[data-color-border="coral"] { border-color: var(--coral); }
[data-color-border="gold"] { border-color: var(--gold); }
[data-color-border="rose"] { border-color: var(--rose); }
[data-color-border="teal"] { border-color: var(--teal); }

/* ---- data-color для тёмного фона (инвертированные цвета) ---- */

[data-color="coral"][data-theme="dark"] { color: var(--coral-light); }
[data-color="gold"][data-theme="dark"] { color: var(--gold-light); }

/* ---- data-color для акцентных подчёркиваний ---- */

.has-underline[data-color="coral"] { text-decoration-color: var(--coral); }
.has-underline[data-color="gold"] { text-decoration-color: var(--gold); }
.has-underline[data-color="rose"] { text-decoration-color: var(--rose); }
.has-underline[data-color="teal"] { text-decoration-color: var(--teal); }


/* ============================================================
   20. Utility Classes
   ============================================================ */

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--grid-gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); }

.w-full { width: 100%; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 800px; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.text-sm { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }

.text-mid { color: var(--color-text-secondary); }
.text-light { color: var(--color-text-muted); }
.text-coral { color: var(--coral); }
.text-white { color: var(--color-white); }

.font-heading { font-family: var(--font-heading); }
.font-subheading { font-family: var(--font-subheading); }
.font-body { font-family: var(--font-body); }
.font-bold { font-weight: 700; }
.font-italic { font-style: italic; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hide-mobile { display: none; }
}

@media (max-width: 480px) {
  .hide-phone { display: none; }
}
