
.header-inner > *, .about-grid > *, .contact-grid > *, .footer-inner > * {
  min-width: 0;
}
.logo-text, .hero-title, .section-title, .contact-item, .footer-contact-value {
  overflow-wrap: anywhere;
}
.logo-icon, .lang-switcher, header .burger {
  flex-shrink: 0;
}
header .nav { z-index: 2; }
.access-panel { flex-wrap: wrap; }
.gallery-col { min-width: 0; }
dialog { max-width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
dialog img { max-width: 100%; max-height: 72dvh; object-fit: contain; }
@media (max-width: 1180px) {
  header .nav:not(.open) { display: none; }
  header .nav.open {
    display: flex;
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    padding: 12px 20px 18px;
    background: var(--paper, #fff);
    box-shadow: 0 10px 20px #0001;
    overflow-y: auto;
    max-height: calc(100dvh - 72px);
  }
  header .nav .nav-link,
  header .nav #access-toggle { padding: 12px; max-width: none; }
  header .header-inner { height: 72px; }
  header .burger { display: flex; }
  header .header-inner .lang-switcher { margin-left: auto; }
}
@media (max-width: 480px) {
  header .header-inner { padding-inline: 10px; gap: 8px !important; }
  .logo { min-width: 0; gap: 6px; }
  .hero-inner { padding-inline: 16px; }
  #about, #groups, #gallery, #advantages, #contacts { padding-inline: 16px; }
  #about .about-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #about .about-card { overflow-wrap: anywhere; }
}
@media (max-width: 360px) {
  #about .about-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Keep decorative particles behind opaque site surfaces. */
#ambient-particles { z-index: 0; }
#site { position: relative; z-index: 1; }

#hero .hero-stat,
#about .about-card,
#about .fact-card,
#about .director-card,
.groups-grid .group-card,
.adv-grid .adv-card {
  background: #fff;
}

#main > :is(#about, #groups, #gallery, #advantages, #contacts) {
  padding-block: clamp(40px, 5.6vw, 80px);
  scroll-margin-top: 72px;
}
#main > :is(#about, #groups, #gallery, #advantages, #contacts) .section-header {
  margin-bottom: clamp(24px, 3.5vw, 48px);
}

/* Pink accents and soft section backgrounds follow the reference. */
:root {
  --yellow: #f06295;
  --yellow-light: #fce7f0;
  --orange: #d62d70;
  --bg: #fff5f9;
}
#header { border-bottom-color: #f3d5e1; }
#header .nav-link:hover,
#header .nav-link:focus-visible { background: var(--yellow-light); }
#hero .hero-mask {
  background: linear-gradient(105deg, #fff5f9fa 16%, #fff5f9e8 47%, #fff5f93b 100%);
}
.hero-tag { color: #8d2850; }
.hero-title .hl-yellow { color: #b22e62; text-shadow: none; }
.hero-title .hl-blue { color: #236898; text-shadow: none; }
.hero-title .hl-green { color: #297044; }
.hero-stat-num.stat-orange { color: #b22e62; }
.btn-primary {
  background: linear-gradient(135deg, #bc3065, #a52353);
  color: #fff;
  box-shadow: 0 8px 24px #a5235330;
}
.btn-outline { background: #fff; }
#main > #about,
#main > #gallery,
#main > #contacts { background: #fff5f9; }
#main > #groups,
#main > #advantages { background: #fff; }
#main > :is(#about, #groups, #gallery, #advantages, #contacts) {
  border-top: 1px solid #f3e2ea;
}
#about .about-card,
.adv-grid .adv-card { border-color: #f1e2eb; }
@media (max-width: 768px) {
  #hero .hero-mask {
    background: linear-gradient(180deg, #fff5f9cc 0%, #fff5f9f5 65%, #fff5f9 100%);
  }
  #hero .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: 420px;
    margin-inline: auto;
  }
  #hero .hero-stat { min-width: 0; padding: 12px 4px; }
  #hero .hero-stat-num { font-size: clamp(1.2rem, 5vw, 1.8rem); }
}
.high-contrast #main > :is(#about, #groups, #gallery, #advantages, #contacts) {
  background: #fff;
}

.logo-icon { background: #fde8f0; }
.logo-flower { display: inline-block; vertical-align: middle; }
.logo-icon .logo-flower { width: 100%; height: 100%; border-radius: inherit; }

/* iOS 7 palette */
:root {
  --ios-indigo: #5856d6;
  --ios-blue: #007aff;
  --ios-teal: #34aadc;
  --ios-cyan: #5ac8fa;
  --ios-green: #4cd964;
  --ios-pink: #ff2d55;
  --ios-red: #ff3b30;
  --ios-orange: #ff9500;
  --ios-yellow: #ffcc00;
  --ios-gray: #8e8e93;
  --yellow: var(--ios-yellow);
  --yellow-light: #fff6d2;
  --orange: var(--ios-orange);
  --blue: var(--ios-blue);
  --blue-light: #e8f3ff;
  --green: var(--ios-green);
  --green-light: #e9fbed;
  --pink: var(--ios-pink);
  --pink-light: #ffebef;
  --purple: var(--ios-indigo);
  --bg: #f5f7fc;
}
#header { border-bottom-color: #dce7f3; }
#header .nav-link:hover,
#header .nav-link:focus-visible { background: var(--blue-light); }
#hero .hero-mask {
  background: linear-gradient(105deg, #f5f7fcfa 16%, #f5f7fce8 47%, #e8f3ff3b 100%);
}
.hero-tag { color: #514000; }
.hero-title .hl-yellow, .hero-stat-num.stat-orange { color: #8c4800; }
.hero-title .hl-blue { color: #005abb; }
.hero-title .hl-green { color: #26703c; }
.btn-primary {
  background: var(--ios-indigo);
  box-shadow: 0 8px 24px #5856d633;
}
#main > #about,
#main > #gallery,
#main > #contacts { background: #f3f7fc; }
#main > :is(#about, #groups, #gallery, #advantages, #contacts),
#about .about-card,
.adv-grid .adv-card { border-color: #dfe6ef; }
.adv-grid .adv-card:nth-child(2)::before { background: var(--ios-cyan); }
.adv-grid .adv-card:nth-child(6)::before { background: var(--ios-red); }
.adv-grid .adv-card:nth-child(7)::before { background: var(--ios-teal); }
.logo-icon { background: #eef0ff; }
@media (max-width: 768px) {
  #hero .hero-mask {
    background: linear-gradient(180deg, #f5f7fccc 0%, #f5f7fcf5 65%, #f5f7fc 100%);
  }
}

.hero-title .hl-yellow { color: #5856d6; }
.hero-title .hl-blue { color: #005fca; }
.hero-title .hl-green { color: #bd1740; }
.whatsapp-card-link {
  display: inline-block;
  margin-top: 12px;
  color: #17683a;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

:root {
  --green: #4CD964;
  --orange: #FF9500;
  --yellow: #FFCC00;
  --blue: #007AFF;
  --pink: #FF3A2D;
  --purple: #007AFF;
  --text: #1F1F21;
  --ink: #1F1F21;
}
#hero .hero-title { color: #1F1F21; }
.hero-title .hl-yellow { color: #874900; }
.hero-title .hl-blue { color: #005fca; }
.hero-title .hl-green { color: #a82a20; }
.btn-primary { background: #1F1F21; box-shadow: 0 8px 24px #1f1f2133; }
.gallery-more .btn svg { width: 21px; height: 21px; }

/* Bright accents for the welcome section. */
#hero .hero-mask {
  background: linear-gradient(102deg, #fffdf2fa 6%, #fff6dcdb 45%, #d6f3ff48 100%);
}
#hero .hero-tag { background: #ffcc00; color: #422e00; border-color: #ff9500; }
#hero .hero-title .hl-yellow { color: #ffcc00; -webkit-text-stroke: 1px #8a4f00; }
#hero .hero-title .hl-blue { color: #007aff; }
#hero .hero-title .hl-green { color: #ed3228; }
#hero .hero-stat { border: 2px solid #ffcc00; background: #fff8d9; }
#hero .hero-stat:nth-child(2) { border-color: #007aff; background: #e7f3ff; }
#hero .hero-stat:nth-child(3) { border-color: #4cd964; background: #e7fbe9; }
#hero .stat-orange { color: #a34b00; }
#hero .stat-blue { color: #0062d0; }
#hero .stat-green { color: #13783d; }
#hero .btn-primary { background: #0068df; color: #fff; box-shadow: 0 8px 24px #007aff40; }
#hero .btn-primary:hover { background: #0059bf; }
#hero .btn-outline { background: #ffcc00; border-color: #ff9500; color: #332400; }
#hero .btn-outline:hover { background: #ffb600; }
@media (max-width: 768px) {
  #hero .hero-mask {
    background: linear-gradient(180deg, #fff7e1d9 0%, #fff9eaf5 62%, #e6f6ff 100%);
  }
}
.high-contrast #hero .hero-title span { color: #000; -webkit-text-stroke: 0; }
