/* ==========================================================================
   РЦ «Горизонт» — стили сайта
   ========================================================================== */

:root {
  --navy: #12232b;
  --navy-2: #0c1a20;
  --teal: #1f6f5c;
  --teal-dark: #17594a;
  --teal-light: #2c9a80;
  --sun: #f2a53c;
  --gold: #b3873f;
  --gold-light: #d8b378;
  --bg-soft: #f5f7f6;
  --bg-soft-2: #eef2f0;
  --border: #e3e9e6;
  --text: #26312f;
  --text-muted: #5c6b67;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(18, 35, 43, 0.08);
  --shadow-sm: 0 4px 14px rgba(18, 35, 43, 0.06);
  --container: 1200px;
  --header-h: 104px;
  --font-serif: "PT Serif", Georgia, "Times New Roman", serif;
  --font-sans: "PT Sans", "Segoe UI", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  color: var(--navy);
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.35rem); text-align: center; margin-bottom: 16px; }

.section-head { text-align: center; margin-bottom: 44px; }
.section-head.align-left { text-align: left; }
.section-head h2 { margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 26px; height: 1px; background: var(--gold-light); }
.section-head.align-left .eyebrow::before { display: none; }
.eyebrow-light { color: var(--gold-light); }
.eyebrow-light::before, .eyebrow-light::after { background: rgba(216, 179, 120, 0.5); }
.eyebrow-left::before { display: none; }

.about-heading { text-align: left; font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2rem); }

p { margin: 0 0 14px; color: var(--text-muted); }

ul { list-style: none; margin: 0; padding: 0; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: 10px 18px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Icons ---------- */
.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--teal);
}
.icon-lg { width: 40px; height: 40px; }
.icon-xl { width: 48px; height: 48px; }
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-soft-2);
  flex-shrink: 0;
}
.icon-circle .icon { width: 19px; height: 19px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  padding: 16px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  white-space: normal;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--teal-dark);
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 89, 74, 0.35);
}
.btn-primary:hover { background: var(--teal); transform: translateY(-2px); }
.btn-primary .icon { color: #fff; width: 20px; height: 20px; }
.btn-lg { padding: 18px 38px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 58px; width: auto; }

.main-nav ul {
  display: flex;
  gap: 36px;
}
.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after { transform: scaleX(1); }

.header-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}
.header-phone-text { display: flex; flex-direction: column; line-height: 1.3; }
.header-phone-text strong { color: var(--navy); font-size: 1rem; }
.header-phone-text small { color: var(--text-muted); font-size: 0.78rem; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle .icon { color: var(--navy); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,22,27,0.88) 0%, rgba(10,22,27,0.62) 42%, rgba(10,22,27,0.18) 75%);
}
.hero-inner { position: relative; z-index: 1; padding-top: 60px; padding-bottom: 60px; min-width: 0; width: 100%; }
.hero-content { max-width: 640px; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 1.6rem + 2.8vw, 3.4rem);
  margin-bottom: 22px;
}
.hero-lead {
  color: #eef3f1;
  font-size: 1.15rem;
  max-width: 520px;
  margin-bottom: 30px;
}
.hero .btn-primary { margin-bottom: 26px; }
.hero-note {
  color: #d9e4e0;
  font-size: 0.95rem;
  max-width: 460px;
  margin-bottom: 0;
}

/* ---------- Feature strip ---------- */
.feature-strip {
  padding: 46px 0;
  border-bottom: 1px solid var(--border);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.feature-item span {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
  max-width: 150px;
}

/* ---------- About ---------- */
.about { padding: 90px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.about-text p { font-size: 1.05rem; color: var(--text); }
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* ---------- Card sections ---------- */
.help, .program { padding: 90px 0; background: var(--bg-soft); }
.program { background: #fff; }

.card-grid {
  display: grid;
  gap: 22px;
}
.help-grid { grid-template-columns: repeat(3, 1fr); }
.program-grid { grid-template-columns: repeat(4, 1fr); }

.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: transparent;
}
.help .info-card { background: #fff; }
.program .info-card { background: var(--bg-soft); }
.info-card p { margin: 0; color: var(--navy); font-weight: 500; font-size: 0.96rem; }

/* ---------- Approach ---------- */
.approach { padding: 90px 0; background: var(--bg-soft-2); }
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.approach h2 { text-align: left; margin-bottom: 20px; }
.approach-col p { font-size: 1.02rem; }
.approach-media { margin-top: 22px; }
.approach-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  color: var(--navy);
}
.check-list li:last-child { border-bottom: none; }
.check-list .icon { color: var(--teal); margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq { padding: 90px 0; background: #fff; }
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item:hover { border-color: var(--gold-light); }
.faq-item.is-open { border-color: var(--gold-light); box-shadow: var(--shadow-sm); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 26px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--navy);
}
.faq-question:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.faq-chevron { color: var(--gold); flex-shrink: 0; transform: rotate(180deg); transition: transform 0.3s ease; }
.faq-item.is-open .faq-chevron { transform: rotate(0deg); }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; }
.faq-answer-inner p { margin: 0; padding: 0 26px 22px; color: var(--text-muted); font-size: 0.97rem; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: 110px 0;
  color: #fff;
  overflow: hidden;
  text-align: center;
}
.cta-media { position: absolute; inset: 0; z-index: 0; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; }
.cta-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,20,25,0.82) 0%, rgba(9,20,25,0.72) 100%);
}
.cta-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.cta h2 { color: #fff; margin-bottom: 22px; }
.cta p { color: #dce7e3; font-size: 1.05rem; margin-bottom: 34px; }
.cta .btn-primary { background: var(--teal); box-shadow: 0 14px 30px rgba(0,0,0,0.35); }
.cta .btn-primary:hover { background: var(--teal-light); }
.cta-alt-phone { margin: 18px 0 0; color: #c9d6d1; font-size: 0.95rem; }
.cta-alt-phone a { text-decoration: underline; text-underline-offset: 3px; }
.cta-alt-phone a:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #cfd9d6;
  padding: 92px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
  padding-bottom: 56px;
}
.footer-logo { height: 52px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; margin-bottom: 20px; }
.footer-brand p { color: #a9b7b3; max-width: 320px; }
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: #cfd9d6;
}
.footer-social .icon { color: var(--teal-light); }
.footer-social strong { color: #fff; }

.footer-contacts h3, .footer-map h3 { color: #fff; font-size: 1.15rem; margin-bottom: 26px; }
.footer-contacts ul { display: flex; flex-direction: column; gap: 20px; }
.footer-contacts li { display: flex; align-items: flex-start; gap: 12px; }
.footer-contacts .icon { color: var(--teal-light); margin-top: 2px; }
.footer-contacts a:hover { color: #fff; text-decoration: underline; }
.footer-contacts span, .footer-contacts a { color: #cfd9d6; font-size: 0.95rem; line-height: 1.5; }

.footer-map {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  margin-bottom: 46px;
}
.footer-map-frame {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
  filter: grayscale(0.35) contrast(1.05);
}
.map-open-btn {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(12, 26, 32, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(216, 179, 120, 0.35);
  color: #fff;
  padding: 13px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.map-open-btn .icon { color: var(--gold-light); width: 19px; height: 19px; }
.map-open-btn:hover { border-color: var(--gold-light); transform: translateY(-2px); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 28px 0;
  font-size: 0.85rem;
  color: #8a9793;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom p { margin: 0; }
.footer-credit { margin: 0; }
.footer-credit a { color: var(--gold-light); font-weight: 600; }
.footer-credit a:hover { text-decoration: underline; }

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-float {
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  z-index: 450;
  opacity: 1;
  visibility: visible;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease, visibility 0.25s ease;
}
.whatsapp-float:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
.whatsapp-float.is-hidden { opacity: 0; visibility: hidden; transform: translateY(10px); pointer-events: none; }
.whatsapp-float .icon { color: #fff; width: 27px; height: 27px; position: relative; z-index: 1; }
.whatsapp-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  animation: whatsapp-pulse 2.4s ease-out infinite;
  z-index: 0;
}
@keyframes whatsapp-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-pulse { animation: none; display: none; }
}

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 34px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--teal-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  z-index: 400;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--teal); }
.scroll-top .icon { color: #fff; width: 18px; height: 18px; }

/* ==========================================================================
   Responsive — Tablet
   ========================================================================== */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-media { order: -1; }
  .help-grid { grid-template-columns: repeat(2, 1fr); }
  .program-grid { grid-template-columns: repeat(3, 1fr); }
  .program-grid .info-card:last-child { grid-column: 1 / -1; }
  .approach-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-map-frame { height: 320px; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-phone-text small { display: none; }
  .header-inner { justify-content: flex-start; }
  .header-phone { margin-left: auto; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 10px 24px 20px;
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { display: block; padding: 12px 4px; }

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

/* ==========================================================================
   Responsive — Mobile
   ========================================================================== */
@media (max-width: 640px) {
  :root { --header-h: 72px; }
  .container { padding: 0 18px; }
  .brand-logo { height: 38px; }
  .header-phone-text strong { font-size: 0.88rem; }
  .icon-circle { width: 34px; height: 34px; }

  .hero { min-height: 560px; }
  .hero-media img { object-position: 78% center; }
  .hero-overlay { background: linear-gradient(180deg, rgba(9,20,25,0.55) 0%, rgba(9,20,25,0.88) 65%, rgba(9,20,25,0.94) 100%); }
  .hero-inner { padding-top: 40px; padding-bottom: 40px; }
  .hero-content { max-width: 100%; }
  .btn { width: 100%; justify-content: center; text-align: center; }

  .feature-strip { padding: 34px 0; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 16px; }

  .about, .help, .program, .approach, .faq { padding: 60px 0; }
  .faq-question { padding: 16px 18px; font-size: 1rem; gap: 12px; }
  .faq-answer-inner p { padding: 0 18px 18px; }
  h2 { margin-bottom: 30px; }

  .help-grid, .program-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .program-grid .info-card:last-child { grid-column: 1 / -1; }
  .info-card { padding: 22px 14px; }
  .info-card p { font-size: 0.88rem; }
  .icon-lg { width: 32px; height: 32px; }

  .cta { padding: 70px 0; }
  .cta p br { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 40px; padding-bottom: 36px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .footer-map-frame { height: 260px; }
  .map-open-btn { left: 12px; right: 12px; bottom: 12px; justify-content: center; border-radius: var(--radius); }

  .whatsapp-float { left: 16px; bottom: 16px; width: 52px; height: 52px; }
  .whatsapp-float .icon { width: 24px; height: 24px; }
  .scroll-top { right: 16px; bottom: 26px; width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .header-phone-text { display: none; }
  .header-phone { gap: 0; }
}

@media (max-width: 400px) {
  .help-grid, .program-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
