/* ============================================================
   Ясли-сад «Жақсылық» — Design System
   По макетам Desktop + Mobile
   ============================================================ */

:root {
  /* Brand */
  --color-navy: #203B5B;
  --color-navy-soft: #2A4A6E;
  --color-cream: #FFF8EA;
  --color-cream-deep: #F7EED9;
  --color-white: #FFFFFF;
  --color-text: #203B5B;
  --color-text-muted: #5A6F86;
  --color-text-soft: #7A8FA3;

  /* Pastels (по макету) */
  --pastel-pink: #FFE0E8;
  --pastel-pink-icon: #E85A7A;
  --pastel-yellow: #FFF0C2;
  --pastel-yellow-icon: #E8A800;
  --pastel-blue: #D9ECFA;
  --pastel-blue-icon: #4A90D9;
  --pastel-green: #D8F0DC;
  --pastel-green-icon: #4CAF6A;
  --pastel-coral: #FFD6D6;
  --pastel-coral-icon: #E85A5A;
  --pastel-lavender: #EDE0F5;
  --pastel-lavender-icon: #9B6BC7;
  --pastel-mint: #D4F0E8;
  --badge-green: #C8E8C8;
  --nav-active: #D4E8F7;
  --hero-bg: #D8EEF8;
  --hero-bg-end: #E4F5E8;
  --hill-green: #A8D4A0;

  /* UI */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 24px rgba(32, 59, 91, 0.08);
  --shadow-card: 0 6px 20px rgba(32, 59, 91, 0.06);
  --shadow-hover: 0 12px 28px rgba(32, 59, 91, 0.12);
  --header-border: rgba(32, 59, 91, 0.06);

  /* Type */
  --font: "Nunito", "Montserrat", system-ui, -apple-system, sans-serif;
  --container: 1180px;
  --header-pad: 20px;
  --section-gap: 48px;

  --transition: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background-color: #FEF9E9;
  background-image: url("../images/bg-pattern.jpg");
  background-repeat: repeat;
  background-position: 0 0;
  background-size: 512px auto;
  color: var(--color-text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

@media (min-width: 768px) {
  .container { width: min(100% - 48px, var(--container)); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-navy);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(32, 59, 91, 0.22);
}

.btn-primary:hover {
  background: var(--color-navy-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-contacts {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-navy);
  color: #fff;
  padding: 11px 22px;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(32, 59, 91, 0.18);
}

.btn-contacts:hover {
  background: var(--color-navy-soft);
  transform: translateY(-1px);
}

.btn-contacts-icon {
  width: 1.35em;
  height: 1.35em;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.btn-contacts-icon-fallback {
  color: #FFD666;
  display: inline-flex;
  width: 1.35em;
  height: 1.35em;
  align-items: center;
  justify-content: center;
}

.btn-contacts-icon-fallback svg,
.btn-contacts .btn-contacts-icon-fallback svg {
  width: 1.35em;
  height: 1.35em;
  max-width: none !important;
  max-height: none !important;
  fill: #FFD666;
}

.btn-soft {
  background: var(--pastel-mint);
  color: var(--color-navy);
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 700;
}

.btn-soft:hover { filter: brightness(0.97); transform: translateY(-1px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 234, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-border);
}

.header-top {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand actions"
    "contacts contacts";
  gap: 8px 14px;
  align-items: center;
  padding: 12px 0 8px;
}

.header-top > .brand { grid-area: brand; }
.header-top > .header-actions { grid-area: actions; }
.header-top > .header-contacts { grid-area: contacts; }

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

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--color-white);
  box-shadow: 0 2px 10px rgba(32, 59, 91, 0.12);
}

.brand-logo-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #FFE0E8, #D9ECFA 45%, #FFF0C2);
  color: var(--color-navy);
  font-weight: 800;
  font-size: 0.7rem;
  text-align: center;
  line-height: 1.1;
  border: 2px solid #fff;
}

.brand-text { min-width: 0; }

.brand-title {
  margin: 0;
  font-size: clamp(0.95rem, 2.8vw, 1.25rem);
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-tagline {
  margin: 2px 0 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4CAF6A;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.burger {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--color-navy);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  line-height: 0;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header-contacts {
  display: grid;
  gap: 4px;
  padding: 0 0 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.header-contacts-main {
  display: grid;
  gap: 6px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.contact-item-address span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--pastel-blue-icon);
}

/* Глобальный лимит SVG в UI — без «раздувания» меню */
.site-header svg,
.section-title svg,
.btn svg {
  max-width: 1.4em;
  max-height: 1.4em;
}

.contact-item a:hover { color: var(--color-navy); }

.header-actions .btn-contacts {
  display: none;
}

/* Desktop header: brand | contacts | lang + CTA */
@media (min-width: 1024px) {
  .header-top {
    grid-template-columns: minmax(240px, 0.95fr) minmax(260px, 1.2fr) auto;
    grid-template-areas: "brand contacts actions";
    padding: 16px 0 12px;
    align-items: center;
    column-gap: 28px;
  }
  .brand-logo { width: 64px; height: 64px; }
  .brand-title { font-size: 1.28rem; white-space: normal; }
  .brand-tagline { font-size: 0.7rem; }
  .burger { display: none; }
  .header-contacts {
    padding: 0;
    font-size: 0.84rem;
  }
  .header-actions {
    gap: 10px;
  }
  .header-actions .btn-contacts {
    display: inline-flex;
  }
  .contact-row {
    gap: 14px 18px;
  }
}

/* ---------- Nav ---------- */
.main-nav {
  padding: 4px 0 12px;
}

.nav-list {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-navy);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--nav-active);
}

.nav-link .chevron {
  width: 10px;
  height: 10px;
  opacity: 0.55;
  transition: transform var(--transition);
}

.nav-item.has-mega:hover .nav-link .chevron,
.nav-item.has-mega:focus-within .nav-link .chevron {
  transform: rotate(180deg);
}

@media (max-width: 1023px) {
  .main-nav {
    display: none;
  }
}

@media (min-width: 1024px) {
  .nav-list {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px 8px;
  }
}

/* Mega menu — без «дыры» между пунктом и панелью (иначе hover пропадает) */
.mega {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(4px);
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  padding: 8px 0 0;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 120;
}

.nav-item {
  position: relative;
}

/* Правые пункты меню — выравнивание вправо, чтобы не уезжать за край */
.nav-item.has-mega:nth-last-child(-n+2) .mega {
  left: auto;
  right: 0;
}

.nav-item.has-mega:hover .mega,
.nav-item.has-mega:focus-within .mega,
.nav-item.has-mega.is-open .mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 230px));
  gap: 4px;
  background: var(--color-cream);
  border: 1.5px solid #B8D8F0;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(32, 59, 91, 0.12);
  padding: 10px;
}

.mega-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  transition: background var(--transition);
  min-width: 0;
  position: relative;
}

.mega-link:hover,
.mega-link:focus-visible {
  background: rgba(212, 232, 247, 0.55);
  outline: none;
}

.mega-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--pastel-blue);
  color: var(--pastel-blue-icon);
  overflow: hidden;
}

.mega-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.mega-title {
  display: block;
  font-weight: 800;
  font-size: 0.84rem;
  line-height: 1.25;
  color: var(--color-navy);
}

.mega-desc {
  display: block;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Mobile drawer — Karlygash-style */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.mobile-drawer.is-open { pointer-events: auto; }

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 28, 44, 0.42);
  opacity: 0;
  transition: opacity var(--transition);
}

.mobile-drawer.is-open .mobile-drawer-backdrop { opacity: 1; }

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(360px, 92vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #EAF4FA;
  box-shadow: 8px 0 32px rgba(16, 28, 44, 0.18);
  transform: translateX(-104%);
  transition: transform var(--transition);
  overflow: hidden;
}

.mobile-drawer.is-open .mobile-drawer-panel { transform: translateX(0); }

.md-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: max(14px, env(safe-area-inset-top, 0px)) 14px 14px 16px;
  background: var(--color-navy);
  color: #fff;
}

.md-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.md-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.md-brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.md-brand-text strong {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.md-brand-text span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.82;
}

.md-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
}

.md-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.md-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 12px 16px;
  -webkit-overflow-scrolling: touch;
}

.md-nav {
  display: grid;
  gap: 12px;
}

.md-card {
  background: #FFFEFB;
  border-radius: 16px;
  padding: 6px 4px;
  box-shadow: 0 3px 14px rgba(32, 59, 91, 0.07);
}

.md-card-single {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--color-navy);
  font-weight: 800;
  font-size: 0.95rem;
}

.md-card-single.is-active,
.md-link.is-active {
  background: #D6EAF8;
}

.md-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 10px 2px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--md-section, #5A7A9A);
}

.md-section-ico {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--md-section, #5A7A9A);
  flex-shrink: 0;
  background: transparent;
}

.md-section-ico svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
}

.md-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--color-navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.3;
  transition: background 0.2s ease;
}

.md-link:hover {
  background: rgba(217, 236, 250, 0.55);
}

.md-link-text {
  flex: 1;
  min-width: 0;
}

.md-link-ext {
  width: 16px;
  height: 16px;
  color: #8AA0B5;
  flex-shrink: 0;
  opacity: 0.85;
}

.md-link-ext svg {
  width: 14px !important;
  height: 14px !important;
}

.md-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: transparent;
  color: var(--md-ico, #4A90D9);
}

.md-ico svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}

.md-foot {
  flex-shrink: 0;
  padding: 10px 14px max(12px, env(safe-area-inset-bottom, 0px));
  background: #EAF4FA;
  border-top: 1px solid rgba(32, 59, 91, 0.06);
  display: grid;
  gap: 8px;
}

.md-contacts {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 14px;
  background: var(--color-navy);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(32, 59, 91, 0.2);
}

.md-contacts-ico {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(77%) sepia(64%) saturate(650%) hue-rotate(359deg) brightness(102%) contrast(101%);
}

.md-contacts-ico-svg {
  display: grid;
  place-items: center;
  color: #F0C040;
  filter: none;
}

.md-contacts-ico-svg svg {
  width: 18px !important;
  height: 18px !important;
}

.md-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
}

.md-lang-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #5A6F85;
}

.md-lang-pills {
  display: inline-flex;
  gap: 8px;
}

.md-lang-pill {
  min-width: 48px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  background: #fff;
  color: var(--color-navy);
  border: 1.5px solid rgba(32, 59, 91, 0.14);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(32, 59, 91, 0.06);
}

.md-lang-pill.is-active {
  background: #43A047;
  border-color: #43A047;
  color: #fff;
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.28);
}

.lang-dropdown {
  position: relative;
  z-index: 40;
}

.lang-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 12px 8px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(32, 59, 91, 0.12);
  color: var(--color-navy);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(32, 59, 91, 0.06);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.lang-dropdown-btn:hover,
.lang-dropdown.is-open .lang-dropdown-btn {
  border-color: rgba(32, 59, 91, 0.22);
  box-shadow: 0 4px 14px rgba(32, 59, 91, 0.1);
}

.lang-dropdown-chevron {
  display: inline-flex;
  transition: transform var(--transition);
}

.lang-dropdown-chevron svg {
  width: 14px;
  height: 14px;
}

.lang-dropdown.is-open .lang-dropdown-chevron {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(32, 59, 91, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(32, 59, 91, 0.12);
}

.lang-dropdown-menu[hidden] {
  display: none;
}

.lang-dropdown-option {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-navy);
  white-space: nowrap;
}

.lang-dropdown-option:hover {
  background: rgba(212, 232, 247, 0.55);
}

.lang-dropdown-option.is-active {
  background: var(--color-navy);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  padding: 8px 0 28px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1024 / 341;
  border-radius: clamp(20px, 2.4vw, 36px);
  isolation: isolate;
  border: 0;
  box-shadow: 0 8px 24px rgba(40, 80, 120, 0.08);
  background: #C5E8F6;
}

.hero-bg-img {
  position: absolute;
  /* slight overscale hides any leftover edge artifacts under radius */
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  max-width: none;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(48%, 460px);
  height: 100%;
  box-sizing: border-box;
  padding: clamp(16px, 2.6vw, 34px) clamp(14px, 2vw, 22px) clamp(40px, 7vw, 68px) clamp(18px, 3.2vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #C8E8B4;
  color: #2F6B3A;
  font-weight: 800;
  font-size: clamp(0.7rem, 1.05vw, 0.84rem);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: clamp(8px, 1.2vw, 14px);
  border: 1px solid rgba(70, 140, 70, 0.18);
}

.hero-badge-heart {
  flex-shrink: 0;
  color: #3F8F4A;
}

.hero-sun,
.hero-cloud {
  display: none;
  position: absolute;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  height: auto;
  transform: translate(-50%, -50%);
}

@media (min-width: 900px) {
  .hero-sun,
  .hero-cloud {
    display: block;
  }

  .hero-cloud {
    top: 13%;
    left: 31%;
    width: clamp(48px, 5.2vw, 70px);
  }

  .hero-sun {
    top: 14.5%;
    left: 37.5%;
    width: clamp(64px, 7.5vw, 96px);
    animation: heroSunSpin 18s linear infinite;
  }
}

@keyframes heroSunSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-sun {
    animation: none;
  }
}

.hero-title {
  margin: 0 0 clamp(6px, 1vw, 12px);
  font-size: clamp(1.35rem, 3vw, 2.45rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--color-navy);
}

.hero-title-line {
  display: block;
}

.hero-text {
  margin: 0 0 clamp(12px, 1.8vw, 20px);
  color: #3D5870;
  font-size: clamp(0.82rem, 1.2vw, 1.02rem);
  font-weight: 600;
  line-height: 1.35;
  max-width: 28ch;
}

.hero-text-line {
  display: block;
}

.hero-cta {
  padding: clamp(10px, 1.25vw, 14px) clamp(18px, 2.2vw, 26px);
  font-size: clamp(0.86rem, 1.15vw, 1rem);
  font-weight: 700;
  border-radius: var(--radius-pill);
  gap: 10px;
}

.hero-cta svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 699px) {
  .hero {
    padding: 4px 0 20px;
  }
  .hero-card {
    aspect-ratio: auto;
    min-height: 300px;
    height: auto;
  }
  .hero-content {
    width: 100%;
    max-width: none;
    min-height: 300px;
    padding: 22px 18px 56px;
    justify-content: flex-start;
    background: linear-gradient(
      90deg,
      rgba(197, 232, 246, 0.94) 0%,
      rgba(197, 232, 246, 0.82) 46%,
      rgba(197, 232, 246, 0.18) 78%,
      rgba(197, 232, 246, 0) 100%
    );
  }
  .hero-badge {
    margin-bottom: 10px;
  }
  .hero-title {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
    margin-bottom: 8px;
  }
  .hero-text {
    font-size: 0.92rem;
    max-width: 22ch;
    margin-bottom: 16px;
  }
  .hero-text-line {
    display: inline;
  }
  .hero-cta {
    margin-top: auto;
  }
  .hero-bg-img {
    object-position: 78% center;
  }
}

@media (max-width: 1023px) {
  .header-top {
    gap: 10px 10px;
    padding: 10px 0 8px;
    align-items: center;
  }
  .brand {
    gap: 10px;
  }
  .brand-logo {
    width: 48px;
    height: 48px;
  }
  .brand-title {
    font-size: 0.92rem;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .header-actions {
    gap: 6px;
    align-self: start;
    padding-top: 2px;
  }
  .lang-dropdown-btn {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }
  .header-contacts {
    font-size: 0.76rem;
  }
}

/* ---------- Quick links (по макету) ---------- */
.quick-links {
  padding: 8px 0 36px;
}

.ql-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (min-width: 900px) {
  .ql-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
  }
}

.ql-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 14px 14px;
  border-radius: 20px;
  min-height: 110px;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(32, 59, 91, 0.05);
  position: relative;
}

.ql-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(32, 59, 91, 0.1);
}

.ql-card[data-color="pink"] { background: var(--pastel-pink); color: var(--pastel-pink-icon); }
.ql-card[data-color="yellow"] { background: var(--pastel-yellow); color: var(--pastel-yellow-icon); }
.ql-card[data-color="blue"] { background: var(--pastel-blue); color: var(--pastel-blue-icon); }
.ql-card[data-color="green"] { background: var(--pastel-green); color: var(--pastel-green-icon); }
.ql-card[data-color="coral"] { background: var(--pastel-coral); color: var(--pastel-coral-icon); }
.ql-card[data-color="lavender"] { background: var(--pastel-lavender); color: var(--pastel-lavender-icon); }

.ql-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
}

.ql-icon svg {
  width: 30px;
  height: 30px;
  max-width: none;
  max-height: none;
}

.ql-foot {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.ql-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.25;
}

.ql-arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: inherit;
  transition: transform var(--transition);
}

.ql-card:hover .ql-arrow { transform: translateX(4px); }

/* ---------- Sections ---------- */
.section {
  padding: 28px 0 var(--section-gap);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-weight: 800;
  color: var(--color-navy);
}

.section-title svg {
  width: 26px;
  height: 26px;
  color: var(--pastel-blue-icon);
}

/* News cards */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (min-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

.news-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

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

.news-card-img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  background: var(--pastel-blue);
}

.news-card-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.news-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-soft);
}

.news-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-navy);
}

.news-excerpt {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-empty {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
  background: rgba(255,255,255,0.55);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  font-weight: 600;
}

/* About banner: фон PNG + текст/кнопка как на макете */
.about-banner-section {
  padding-top: 8px;
}

.about-banner {
  position: relative;
  display: block;
  border: none;
  background: transparent;
  box-shadow: none;
}

.about-banner-bg {
  width: 100%;
  height: auto;
  display: block;
  border: none;
  background: transparent;
  vertical-align: top;
}

.about-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.about-banner-copy {
  position: absolute;
  left: 47%;
  top: 9%;
  width: min(46%, 520px);
  pointer-events: auto;
}

.about-banner-title {
  margin: 0 0 8px;
  font-family: var(--font);
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #1E3A5C;
}

.about-banner-text {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(0.8rem, 1.15vw, 0.95rem);
  font-weight: 600;
  line-height: 1.4;
  color: #355571;
}

/* Кнопка под иконками, слева в правой колонке — как на макете */
.about-banner-cta {
  position: absolute;
  left: 47.5%;
  top: 70%;
  pointer-events: auto;
  min-height: 48px;
  padding: 14px 26px;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  gap: 10px;
}

@media (max-width: 899px) {
  .about-banner-copy,
  .about-banner-cta {
    position: static;
    left: auto;
    right: auto;
    top: auto;
  }
  .about-banner-overlay {
    position: static;
    display: grid;
    gap: 14px;
    padding: 16px 4px 0;
    pointer-events: auto;
  }
  .about-banner-copy {
    width: auto;
  }
  .about-banner-title {
    font-size: 1.35rem;
    color: #1E3A5C;
  }
  .about-banner-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: #355571;
  }
  .about-banner-cta {
    justify-self: start;
  }
}

/* legacy about block (внутренние страницы, если останется) */
.about-block {
  display: grid;
  gap: 24px;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
}

@media (min-width: 900px) {
  .about-block {
    grid-template-columns: 1.2fr 0.8fr;
    padding: 36px;
    align-items: center;
  }
}

.about-block h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  font-weight: 800;
}

.about-block p {
  margin: 0 0 18px;
  color: var(--color-text-muted);
  font-weight: 600;
}

.contacts-grid {
  display: grid;
  gap: 18px;
}

.contacts-grid--info {
  grid-template-columns: 1fr;
  max-width: 640px;
}

.contact-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.contact-card h3 {
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 800;
}

.contact-card p {
  margin: 0 0 10px;
  color: var(--color-text-muted);
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.map-placeholder {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-top: 22px;
  border-radius: 24px;
  background: #FFF8EC;
  border: 1px solid #D6E8F8;
  color: var(--color-text-muted);
  font-weight: 700;
  padding: 24px;
  text-align: center;
}

/* Location map card (contacts) */
.kg-map {
  margin-top: 22px;
  padding: 22px;
  border-radius: 24px;
  background: #FFF8EC;
  border: 1.5px solid #D6E8F8;
  box-shadow: 0 10px 28px rgba(32, 59, 91, 0.06);
}

@media (min-width: 768px) {
  .kg-map { padding: 28px; }
}

.kg-map-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 900px) {
  .kg-map-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
}

.kg-map-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.kg-map-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #6FA06A;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(111, 160, 106, 0.28);
}

.kg-map-badge svg {
  width: 20px !important;
  height: 20px !important;
}

.kg-map-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.25;
}

.kg-map-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #7A8A9C;
}

.kg-map-address {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  background: #F3F8FC;
  border: 1px solid #D6E8F8;
  color: #44566B;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.kg-map-address-ico {
  color: #6FA06A;
  flex-shrink: 0;
  margin-top: 1px;
  display: grid;
  place-items: center;
}

.kg-map-address-ico svg {
  width: 14px !important;
  height: 14px !important;
}

.kg-map-divider {
  height: 1px;
  margin: 18px 0;
  background: rgba(32, 59, 91, 0.1);
}

.kg-map-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(32, 59, 91, 0.08);
  background: #E8EEF3;
}

.kg-map-canvas {
  width: 100%;
  height: min(52vh, 420px);
  min-height: 280px;
  z-index: 0;
}

.kg-map-btn {
  margin-top: 16px;
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #6FA06A;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(111, 160, 106, 0.28);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.kg-map-btn:hover {
  background: #5F8F5A;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(111, 160, 106, 0.34);
}

.kg-map-btn-ico {
  display: grid;
  place-items: center;
}

.kg-marker-wrap {
  background: transparent !important;
  border: 0 !important;
}

.kg-marker {
  position: relative;
  width: 220px;
  height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.kg-marker-label {
  max-width: 210px;
  margin-bottom: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  background: #203B5B;
  border: 1.5px solid #F0C040;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 18px rgba(16, 28, 44, 0.22);
}

.kg-marker-pin {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #203B5B;
  border: 2.5px solid #F0C040;
  box-shadow: 0 6px 14px rgba(16, 28, 44, 0.28);
}

.kg-marker-pin::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #F0C040;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 28px;
  background: #1A3352;
  color: rgba(255, 255, 255, 0.82);
  padding: 42px 0 22px;
}

.footer-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 1.35fr 1fr 1.15fr 1.2fr;
    gap: 28px 36px;
    align-items: start;
  }
}

.footer-brand-col {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

@media (min-width: 900px) {
  .footer-brand-col {
    justify-items: start;
    text-align: left;
  }
}

.footer-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.footer-brand-name {
  margin: 2px 0 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: #F0C040;
  letter-spacing: 0.01em;
}

.footer-about {
  margin: 0;
  max-width: 34ch;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.footer-social {
  display: inline-flex;
  gap: 10px;
  margin-top: 4px;
}

.footer-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.footer-social-btn svg {
  width: 16px !important;
  height: 16px !important;
}

.footer-social-btn:hover {
  background: rgba(240, 192, 64, 0.16);
  border-color: #F0C040;
  color: #F0C040;
}

.footer-social-btn.is-static {
  opacity: 0.55;
  pointer-events: none;
}

.footer-col {
  min-width: 0;
}

.footer-title {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  display: block;
  font-size: 0.9rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-links--icons a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.footer-ico {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--ft-ico, #F0C040);
  background: color-mix(in srgb, var(--ft-ico, #F0C040) 18%, transparent);
}

.footer-ico svg {
  width: 13px !important;
  height: 13px !important;
}

.footer-contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.footer-contacts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.footer-contact-ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #7EB6E8;
  display: grid;
  place-items: center;
}

.footer-contact-ico svg {
  width: 16px !important;
  height: 16px !important;
}

.footer-contacts a {
  color: rgba(255, 255, 255, 0.82);
  word-break: break-word;
}

.footer-contacts a:hover {
  color: #fff;
}

.footer-phone {
  color: #F0C040 !important;
  font-weight: 800;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-copy {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.48);
  text-align: center;
}

@media (min-width: 900px) {
  .footer-copy {
    text-align: left;
    max-width: 70%;
  }
}

/* ---------- Inner pages ---------- */
.page-hero {
  padding: 28px 0 10px;
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
}

.page-hero p {
  margin: 0;
  color: var(--color-text-muted);
  font-weight: 600;
  max-width: 60ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-soft);
  margin-bottom: 12px;
}

.breadcrumb a:hover { color: var(--color-navy); }

.content-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
}

.content-card .prose :where(p, ul, ol) {
  color: var(--color-text-muted);
  font-weight: 600;
}

.content-card .prose img {
  border-radius: var(--radius-md);
  margin: 12px 0;
}

.content-card .prose table,
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  overflow: hidden;
  border-radius: 16px;
  border: 1.5px solid rgba(32, 59, 91, 0.1);
}

.content-card .prose th,
.content-card .prose td,
.prose th,
.prose td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(32, 59, 91, 0.08);
  font-weight: 600;
}

.content-card .prose th,
.prose th {
  background: #F3F8FF;
  color: var(--color-navy);
  font-weight: 800;
}

.content-card .prose tr:last-child td,
.prose tr:last-child td {
  border-bottom: 0;
}

.content-card .prose td:first-child,
.prose td:first-child {
  white-space: nowrap;
  font-weight: 800;
  color: var(--color-navy);
}

/* Staff / groups grids */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

.person-card, .group-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.person-card:hover, .group-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.person-photo, .group-photo {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  background: var(--pastel-lavender);
}

.person-body, .group-body { padding: 16px; }

.person-name, .group-name {
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 1.05rem;
}

.person-role {
  margin: 0;
  color: var(--pastel-pink-icon);
  font-weight: 700;
  font-size: 0.88rem;
}

/* Documents */
.doc-list { display: grid; gap: 10px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition);
}
.doc-item:hover { transform: translateX(3px); }
.doc-ext {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.72rem;
  background: var(--pastel-blue);
  color: var(--pastel-blue-icon);
  flex-shrink: 0;
}
.doc-meta { flex: 1; min-width: 0; }
.doc-title { margin: 0; font-weight: 800; font-size: 0.95rem; }
.doc-sub { margin: 2px 0 0; font-size: 0.78rem; color: var(--color-text-soft); font-weight: 600; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(16, 28, 44, 0.88);
  display: none;
  place-items: center;
  padding: 24px;
}
.lightbox.is-open { display: grid; }
.lightbox img {
  max-width: min(960px, 100%);
  max-height: 85vh;
  border-radius: 12px;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--color-navy);
  font-size: 1.4rem;
  font-weight: 800;
}

/* Scroll top */
.scroll-top {
  position: fixed;
  right: 16px;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 120;
  min-height: 44px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1.5px solid #F0C040;
  background: #1A3352;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(16, 28, 44, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  cursor: pointer;
  font-family: inherit;
}

.scroll-top-ico {
  width: 18px;
  height: 18px;
  color: #F0C040;
  display: grid;
  place-items: center;
}

.scroll-top-ico svg {
  width: 16px !important;
  height: 16px !important;
}

.scroll-top-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Coming-soon toast */
.soon-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 400;
  max-width: 360px;
  margin: 0 auto;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--color-navy);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  box-shadow: 0 14px 36px rgba(16, 28, 44, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.soon-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (min-width: 640px) {
  .soon-toast {
    left: 24px;
    right: auto;
    margin: 0;
  }
}

.mega-ext {
  margin-left: auto;
  color: #8AA0B5;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mega-ext svg {
  width: 14px !important;
  height: 14px !important;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Empty states */
.empty-state {
  padding: 36px 20px;
  text-align: center;
  background: rgba(255,255,255,0.6);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ========== Attestation page ========== */
.page-hero--attest h1 {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}
.page-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--pastel-yellow);
  color: var(--color-navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.attest-viewer {
  background: #F8F4EA;
  border: 1.5px solid rgba(125, 180, 220, 0.55);
  border-radius: 22px;
  padding: 22px 22px 16px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-card);
}
.attest-viewer.is-expanded {
  position: fixed;
  inset: 16px;
  z-index: 280;
  margin: 0;
  padding: 20px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  background: #F8F4EA;
  box-shadow: 0 24px 60px rgba(16, 28, 44, 0.28);
}
.attest-viewer.is-expanded .attest-viewer-stage {
  flex: 1;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
}
.attest-viewer.is-expanded .attest-book-host {
  flex: 1;
  min-height: 0;
}
.attest-viewer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 16px;
}
.attest-viewer-title {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  color: var(--color-navy);
}
.attest-viewer-status {
  margin: 4px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.attest-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.attest-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-navy);
  text-decoration: none;
}
.attest-link svg {
  width: 15px;
  height: 15px;
}
.attest-link:hover { color: var(--color-navy-soft); }
.attest-link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.attest-expand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(32, 59, 91, 0.18);
  background: #fff;
  color: var(--color-navy);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.attest-expand svg {
  width: 16px;
  height: 16px;
}
.attest-expand:hover:not(:disabled) {
  border-color: var(--color-navy);
  box-shadow: var(--shadow-card);
}
.attest-expand:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.attest-viewer-stage {
  position: relative;
  background: #FBF7EE;
  border-radius: 16px;
  border: 1.5px solid rgba(125, 180, 220, 0.45);
  overflow: visible;
  min-height: 480px;
  padding: 18px 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.attest-book-host {
  position: relative;
  width: 100%;
  max-width: 980px;
  min-height: 380px;
  height: min(58vh, 620px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
}
.attest-viewer.is-expanded .attest-book-host {
  height: auto;
  max-height: none;
}
.attest-book {
  width: 100%;
  height: 100%;
  margin: 0 auto;
}
.attest-page {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(32, 59, 91, 0.06);
}
.attest-page-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.attest-page-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, #fff 0%, #f4f7fb 100%);
  position: relative;
}
.attest-page-placeholder::after {
  content: "";
  position: absolute;
  inset: 42% 38%;
  border-radius: 50%;
  border: 3px solid rgba(32, 59, 91, 0.12);
  border-top-color: rgba(32, 59, 91, 0.45);
  animation: attest-spin 0.8s linear infinite;
}
.attest-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 12px;
  background: rgba(251, 247, 238, 0.88);
  text-align: center;
  color: var(--color-text-muted);
  font-weight: 700;
}
.attest-loading[hidden],
.attest-empty[hidden],
.attest-controls[hidden] {
  display: none !important;
}
.attest-loading-spin {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(32, 59, 91, 0.12);
  border-top-color: var(--color-navy);
  animation: attest-spin 0.8s linear infinite;
}
@keyframes attest-spin {
  to { transform: rotate(360deg); }
}
.attest-empty {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  color: var(--color-text-muted);
  font-weight: 600;
  padding: 32px;
  background: #FBF7EE;
}
.attest-empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 14px;
  background: var(--pastel-blue);
  color: var(--pastel-blue-icon);
  display: grid;
  place-items: center;
}
.attest-empty-icon svg {
  width: 26px;
  height: 26px;
}
.attest-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.attest-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid rgba(32, 59, 91, 0.16);
  background: #EEF1F4;
  color: var(--color-navy);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.attest-nav-btn:hover:not(:disabled) {
  background: #fff;
  border-color: var(--color-navy);
}
.attest-nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.attest-pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-navy);
}
.attest-pager input {
  width: 54px;
  height: 36px;
  text-align: center;
  border-radius: 8px;
  border: 1.5px solid rgba(74, 144, 217, 0.65);
  background: #fff;
  color: var(--color-navy);
  font: inherit;
  font-weight: 800;
  -moz-appearance: textfield;
}
.attest-pager input::-webkit-outer-spin-button,
.attest-pager input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.attest-pager-total {
  color: var(--color-text-muted);
  font-weight: 700;
}
.attest-hint {
  margin: 12px 4px 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-soft);
}

.attest-docs-title {
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--color-navy);
}
.attest-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
@media (min-width: 720px) {
  .attest-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .attest-cards { grid-template-columns: repeat(3, 1fr); }
}
.attest-card {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  border: 1.5px solid rgba(74, 144, 217, 0.22);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.attest-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.attest-card-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.attest-card[data-color="blue"] .attest-card-cover { background: linear-gradient(160deg, #D9ECFA, #BFDFF5); color: var(--pastel-blue-icon); }
.attest-card[data-color="green"] .attest-card-cover { background: linear-gradient(160deg, #D8F0DC, #BBE3C4); color: var(--pastel-green-icon); }
.attest-card[data-color="pink"] .attest-card-cover { background: linear-gradient(160deg, #FFE0E8, #F7C5D2); color: var(--pastel-pink-icon); }
.attest-card[data-color="yellow"] .attest-card-cover { background: linear-gradient(160deg, #FFF0C2, #F5DEA0); color: var(--pastel-yellow-icon); }
.attest-card[data-color="lavender"] .attest-card-cover { background: linear-gradient(160deg, #EDE0F5, #D9C5EA); color: var(--pastel-lavender-icon); }
.attest-card[data-color="coral"] .attest-card-cover { background: linear-gradient(160deg, #FFD6D6, #F5B8B8); color: var(--pastel-coral-icon); }
.attest-card-num {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-navy);
  opacity: 0.55;
}
.attest-card-icon svg {
  width: 42px;
  height: 42px;
}
.attest-card-ext {
  position: absolute;
  bottom: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--color-navy);
  opacity: 0.55;
}
.attest-card-title {
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-navy);
}
.attest-card-desc {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1.45;
  flex: 1;
}
.attest-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--color-cream-deep);
  color: var(--color-navy);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}
.attest-card-btn svg {
  width: 18px;
  height: 18px;
}
.attest-card-btn:hover {
  background: var(--pastel-yellow);
}

.attest-drive {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  padding: 16px 18px;
  background: #fff;
  border-radius: 18px;
  border: 1.5px solid rgba(32, 59, 91, 0.08);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.attest-drive:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.attest-drive-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--pastel-yellow);
  color: var(--pastel-yellow-icon);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.attest-drive-icon svg {
  width: 24px;
  height: 24px;
}
.attest-drive-text {
  flex: 1;
  min-width: 160px;
  display: grid;
  gap: 2px;
}
.attest-drive-text strong {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--color-navy);
}
.attest-drive-text span {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.attest-drive-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--color-cream-deep);
  color: var(--color-navy);
  font-size: 0.88rem;
  font-weight: 800;
}
.attest-drive-btn svg {
  width: 15px;
  height: 15px;
}

body.attest-expanded {
  overflow: hidden;
}

@media (max-width: 640px) {
  .attest-viewer { padding: 16px 14px 12px; }
  .attest-viewer-stage { min-height: 360px; padding: 12px 8px 10px; }
  .attest-book-host { min-height: 340px; height: min(58vh, 520px); }
  .attest-viewer.is-expanded { inset: 8px; padding: 12px; }
  .attest-expand span { display: none; }
  .attest-pager span:first-child { display: none; }
}

/* Director blog (no photo, no request form) */
.dir-blog {
  display: grid;
  gap: 22px;
  align-items: start;
}

@media (min-width: 960px) {
  .dir-blog {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 28px;
  }
}

.dir-blog-side {
  display: grid;
  gap: 16px;
}

.dir-blog-card,
.dir-blog-schedule,
.dir-blog-letter,
.dir-blog-principle {
  background: #fff;
  border-radius: 22px;
  border: 1.5px solid rgba(32, 59, 91, 0.08);
  box-shadow: 0 10px 28px rgba(32, 59, 91, 0.05);
}

.dir-blog-card {
  padding: 22px 20px;
}

.dir-blog-role {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4A90D9;
  line-height: 1.35;
}

.dir-blog-name {
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.2;
}

.dir-blog-meta {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.dir-blog-meta dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-soft);
}

.dir-blog-meta dd {
  margin: 2px 0 0;
  font-weight: 700;
  color: var(--color-navy);
}

.dir-blog-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dir-blog-credo {
  margin: 0;
  padding: 14px 14px 14px 16px;
  border-left: 3px solid #6FA06A;
  background: #F4FAF3;
  border-radius: 0 14px 14px 0;
}

.dir-blog-credo-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6FA06A;
}

.dir-blog-credo p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.dir-blog-schedule {
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, #F3F8FF 0%, #fff 70%);
}

.dir-blog-schedule-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.dir-blog-schedule-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #E7F1FB;
  color: #4A90D9;
  flex-shrink: 0;
}

.dir-blog-schedule-ico svg {
  width: 20px;
  height: 20px;
}

.dir-blog-schedule-head h3 {
  margin: 0 0 2px;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--color-navy);
}

.dir-blog-schedule-head p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-soft);
}

.dir-blog-schedule-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.dir-blog-day,
.dir-blog-time {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}

.dir-blog-day {
  background: #203B5B;
  color: #fff;
}

.dir-blog-time {
  background: #EAF4EA;
  color: #3E7A3A;
}

.dir-blog-schedule-note {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.dir-blog-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.dir-blog-letter {
  padding: 24px 22px;
}

.dir-blog-letter :where(h2, h3) {
  margin: 0 0 12px;
  color: var(--color-navy);
  font-weight: 800;
}

.dir-blog-letter :where(p, ul, ol) {
  color: var(--color-text-muted);
  font-weight: 600;
  line-height: 1.6;
}

.dir-blog-letter p + p {
  margin-top: 12px;
}

.dir-blog-principles {
  display: grid;
  gap: 14px;
}

@media (min-width: 700px) {
  .dir-blog-principles {
    grid-template-columns: 1fr 1fr;
  }
}

.dir-blog-principle {
  padding: 18px 16px;
}

.dir-blog-principle-ico {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: #FFF1E8;
  color: #D9784A;
}

.dir-blog-principle-ico svg {
  width: 22px;
  height: 22px;
}

.dir-blog-principle:nth-child(2) .dir-blog-principle-ico {
  background: #EAF4EA;
  color: #6FA06A;
}

.dir-blog-principle:nth-child(3) .dir-blog-principle-ico {
  background: #E7F1FB;
  color: #4A90D9;
}

.dir-blog-principle:nth-child(4) .dir-blog-principle-ico {
  background: #F3EEFA;
  color: #7A5CA8;
}

.dir-blog-principle h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-navy);
}

.dir-blog-principle p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text-muted);
}

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

@media (max-width: 374px) {
  .brand-title { font-size: 0.88rem; }
  .header-contacts { font-size: 0.75rem; }
  .ql-title { font-size: 0.84rem; }
}
