/* ==========================================================================
   Метаморфозия — layout and page sections (built on m3.css tokens)
   ========================================================================== */

main { padding-top: var(--md-top-bar-height); }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.container--narrow { max-width: 820px; }

.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tight { padding-block: clamp(24px, 4vw, 48px); }
.section--tonal { background: var(--md-sys-color-surface-container-low); }
.section--tonal .md-card { background: var(--md-sys-color-surface-container-lowest); }

.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.section-head--row > div { max-width: 720px; }
.section-head h2, .section-title {
  font-family: var(--md-ref-typeface-brand);
  font-weight: 400;
  font-size: clamp(1.875rem, 3.4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -.015em;
  margin-bottom: 16px;
  text-wrap: balance;
}
.section-head p { color: var(--md-sys-color-on-surface-variant); font-size: 1.0625rem; line-height: 1.65; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: var(--md-sys-shape-full);
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-family: var(--md-ref-typeface-brand);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: 16px;
}
.eyebrow .msr { font-size: 16px; }

.lead { font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.65; color: var(--md-sys-color-on-surface-variant); }

.grid { display: grid; gap: clamp(16px, 2.2vw, 24px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.muted { color: var(--md-sys-color-on-surface-variant); }
.text-center { text-align: center; }

/* Decorative section backgrounds ---------------------------------------- */
.has-deco { position: relative; overflow: hidden; }
.has-deco > .container { position: relative; z-index: 1; }
.deco { position: absolute; z-index: 0; pointer-events: none; color: var(--md-sys-color-primary); opacity: .12; }
.deco--lines { left: 0; right: 0; width: 100%; height: 60%; bottom: -8%; }
.deco--rings { width: 640px; height: 640px; }
.deco--mark { width: 420px; height: 500px; opacity: .06; color: var(--md-sys-color-on-surface); --brand-a: currentColor; --brand-b: currentColor; }
.emblem { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.emblem span { font-family: var(--md-ref-typeface-brand); font-size: .875rem; font-weight: 500; color: var(--md-sys-color-on-surface-variant); max-width: 220px; line-height: 1.3; }
.deco--tertiary { color: var(--md-sys-color-tertiary); }
.deco--soft { opacity: .085; }
.deco--strong { opacity: .18; }
.deco--hero { height: 74%; bottom: -6%; opacity: .11; }
.deco--top-right { top: -320px; right: -320px; }
.deco--bottom-left { bottom: -320px; left: -320px; }
.deco--footer { right: -140px; bottom: -160px; transform: rotate(-14deg); }
.cta > .deco { position: absolute; z-index: 0; }
.deco--cta { top: -330px; right: -300px; color: var(--md-sys-color-on-primary-container); opacity: .14; }
.deco--cta-mark { width: 300px; height: 360px; left: -70px; bottom: -120px; color: var(--md-sys-color-on-primary-container); opacity: .08; transform: rotate(12deg); }

/* Navigation drawer hero (mobile) */
.md-drawer__hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
  padding: 10px 8px 20px 16px;
  border-radius: var(--md-sys-shape-xl);
  background: linear-gradient(135deg, var(--md-sys-color-primary-container), var(--md-sys-color-tertiary-container));
  color: var(--md-sys-color-on-primary-container);
}
/* The drawer scrolls; its children must not shrink (the hero has overflow: hidden, so it would collapse). */
.md-drawer > * { flex-shrink: 0; }
.md-drawer__hero-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.md-drawer__hero .brand, .md-drawer__hero .md-icon-btn { color: inherit; }
.md-drawer__quote { position: relative; z-index: 1; margin: 14px 0 0; max-width: 250px; font-family: var(--md-ref-typeface-brand); font-size: 1.125rem; line-height: 1.4; text-wrap: balance; }
.deco--drawer { width: 380px; height: 380px; right: -200px; top: -210px; color: var(--md-sys-color-on-primary-container); opacity: .16; }
body.drawer-open .md-drawer__item { animation: drawer-item 420ms var(--md-sys-motion-emphasized-decelerate) both; animation-delay: calc(80ms + var(--i, 0) * 28ms); }
@keyframes drawer-item { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.drawer-open .md-drawer__item { animation: none; } }

.bg-dots::before,
.bg-blobs::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.bg-dots::before {
  background-image: radial-gradient(color-mix(in srgb, var(--md-sys-color-primary) 26%, transparent) 1.2px, transparent 1.7px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(55% 60% at 8% 92%, #000 0%, transparent 75%);
  mask-image: radial-gradient(55% 60% at 8% 92%, #000 0%, transparent 75%);
}
.bg-blobs::before {
  background:
    radial-gradient(560px 400px at 88% 12%, color-mix(in srgb, var(--md-sys-color-primary-container) 72%, transparent), transparent 70%),
    radial-gradient(460px 340px at 6% 92%, color-mix(in srgb, var(--md-sys-color-tertiary-container) 72%, transparent), transparent 70%);
}

@media (prefers-reduced-motion: no-preference) {
  .deco--rings { animation: deco-drift 24s ease-in-out infinite alternate; }
  .deco--lines { animation: deco-sway 30s ease-in-out infinite alternate; }
}
@keyframes deco-drift { from { translate: 0 0; } to { translate: -22px 16px; } }
@keyframes deco-sway { from { translate: 0 0; } to { translate: 0 -14px; } }

/* Prose ------------------------------------------------------------------ */
.prose { max-width: 720px; }
a.eyebrow { text-decoration: none; }
.embed { position: relative; margin: -24px -24px 8px; aspect-ratio: 16 / 9; background: var(--md-sys-color-surface-container-high); border-radius: var(--md-sys-shape-xl) var(--md-sys-shape-xl) 0 0; overflow: hidden; }
.embed--audio { aspect-ratio: auto; height: 166px; }
.embed iframe { width: 100%; height: 100%; border: 0; }
.footer__map { display: block; position: relative; margin-top: 18px; height: 170px; border-radius: var(--md-sys-shape-lg); overflow: hidden; background: var(--md-sys-color-surface-container-high); box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant); }
.footer__map iframe { width: 100%; height: 100%; border: 0; pointer-events: none; }
.footer__map::after { content: ""; position: absolute; inset: 0; }
.footer__contact span { white-space: nowrap; }
.prose > p { font-size: 1.0625rem; line-height: 1.7; margin-bottom: 1.2em; color: var(--md-sys-color-on-surface); }
.prose > p.lead { color: var(--md-sys-color-on-surface-variant); }
.prose h2 {
  font-family: var(--md-ref-typeface-brand);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 2em 0 .7em;
}
.prose h2:first-child { margin-top: 0; }
.prose a:not(.md-btn) { text-decoration: underline; text-underline-offset: .15em; text-decoration-color: var(--md-sys-color-outline-variant); }
.prose a:not(.md-btn):hover { text-decoration-color: currentColor; }
.prose .md-btn { margin: -.4em 0 1.6em; }
.prose > * + .md-list, .prose > * + .quotes, .prose > * + .features, .prose > * + .steps, .prose > * + .mini-stats, .prose > * + .md-chip-set, .prose > * + .bank, .prose > * + .degrees { margin-top: 1.25em; }
.prose .md-list, .prose .quotes, .prose .features, .prose .steps, .prose .mini-stats, .prose .md-chip-set, .prose .bank, .prose .degrees, .prose .blockquote, .prose .t-card { margin-bottom: 2em; }

/* Hero ------------------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(32px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); overflow: hidden; }
.hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.08fr .92fr; gap: 64px; } }
.hero__title {
  font-family: var(--md-ref-typeface-brand);
  font-weight: 400;
  font-size: clamp(2rem, 4.3vw, 3.375rem);
  line-height: 1.06;
  letter-spacing: -.022em;
  margin: 8px 0 24px;
  text-wrap: balance;
}
.hero__title em { font-style: normal; color: var(--md-sys-color-primary); }
.hero__lead { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--md-sys-color-on-surface-variant); max-width: 560px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero__trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--md-sys-color-on-surface-variant); font-size: .875rem; }
.hero__trust li { display: inline-flex; align-items: center; gap: 6px; }
.hero__trust .msr { font-size: 18px; color: var(--md-sys-color-tertiary); }

.hero__media { position: relative; max-width: 520px; margin-inline: auto; aspect-ratio: 1; }
.hero__media picture, .hero__media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 36px 150px 36px 150px; }
/* Decorative lines stay behind the copy only; the portrait sits on clean background. */
@media (min-width: 960px) { .hero .deco--hero { right: 46%; width: auto; } }
.hero__badge {
  position: absolute;
  z-index: 2;
  left: -12px;
  bottom: 10%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 12px;
  border-radius: var(--md-sys-shape-lg);
  background: var(--md-sys-color-surface-container-lowest);
  box-shadow: var(--md-sys-elevation-2);
  color: var(--md-sys-color-on-surface);
}
.hero__badge .msr { width: 40px; height: 40px; border-radius: 50%; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); display: grid; place-items: center; font-size: 22px; }
.hero__badge strong { display: block; font-family: var(--md-ref-typeface-brand); font-size: 1.25rem; line-height: 1.5rem; font-weight: 500; }
.hero__badge span { font-size: .75rem; color: var(--md-sys-color-on-surface-variant); }
@media (max-width: 959px) { .hero__media { max-width: 400px; } .hero__badge { left: 0; } }

/* Stats ------------------------------------------------------------------ */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stat { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 168px; padding: 28px; border-radius: var(--md-sys-shape-xl); overflow: hidden; }
.stat:nth-child(1) { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.stat:nth-child(2) { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.stat:nth-child(3) { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.stat__value { font-family: var(--md-ref-typeface-brand); font-size: clamp(2.75rem, 5vw, 3.75rem); line-height: 1; font-weight: 400; letter-spacing: -.025em; }
.stat__label { font-size: 1rem; font-weight: 500; font-family: var(--md-ref-typeface-brand); }
.stat > .msr { position: absolute; right: 24px; top: 24px; font-size: 32px; opacity: .55; }

/* Service cards ---------------------------------------------------------- */
.service-card { padding: 28px; gap: 20px; height: 100%; }
.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--md-sys-shape-lg);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: grid;
  place-items: center;
  transition: border-radius var(--md-sys-motion-medium) var(--md-sys-motion-standard), background-color var(--md-sys-motion-medium), color var(--md-sys-motion-medium);
}
.service-card__icon .msr { font-size: 28px; }
.service-card:hover .service-card__icon { border-radius: 50%; background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.service-card h3 { font-family: var(--md-ref-typeface-brand); font-size: 1.375rem; line-height: 1.75rem; font-weight: 500; margin-bottom: 8px; }
.service-card p { color: var(--md-sys-color-on-surface-variant); font-size: .9375rem; line-height: 1.55; }
.service-card__more { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--md-sys-color-primary); font-family: var(--md-ref-typeface-brand); font-weight: 500; font-size: .875rem; }
.service-card__more .msr { font-size: 18px; transition: transform var(--md-sys-motion-medium) var(--md-sys-motion-standard); }
.service-card:hover .service-card__more .msr { transform: translateX(4px); }

/* Split (image + copy) --------------------------------------------------- */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split--media-right .split__media { order: 2; } }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--md-sys-shape-xl2); }
.split__media--portrait img { aspect-ratio: 1; border-radius: 36px 150px 36px 150px; }
.split__body h2 { font-family: var(--md-ref-typeface-brand); font-weight: 400; font-size: clamp(1.875rem, 3.2vw, 2.5rem); line-height: 1.15; letter-spacing: -.015em; margin-bottom: 20px; text-wrap: balance; }
.split__body p { color: var(--md-sys-color-on-surface-variant); font-size: 1.0625rem; line-height: 1.65; margin-bottom: 16px; }
.split__body .md-chip-set { margin: 24px 0; }
.split__body .md-list { margin: 8px 0 24px; }

/* Testimonials ----------------------------------------------------------- */
.carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px clamp(16px, 4vw, 32px) 16px;
  margin-inline: calc(-1 * clamp(16px, 4vw, 32px));
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { flex: 0 0 min(84vw, 380px); scroll-snap-align: start; }
.carousel-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.carousel-nav__btns { display: flex; gap: 8px; }

.t-card { padding: 28px; gap: 16px; }
.t-card__quote { width: 40px; height: 40px; border-radius: 50%; background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); display: grid; place-items: center; }
.t-card__quote .msr { font-size: 22px; font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.t-card p { font-size: 1rem; line-height: 1.62; }
.t-card__text { display: flex; flex-direction: column; gap: .8em; }
.t-card__title { font-family: var(--md-ref-typeface-brand); font-weight: 500; }
.js .t-card--clamp .t-card__text { max-height: 11.4em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.t-card footer { margin-top: auto; display: flex; align-items: center; gap: 12px; font-family: var(--md-ref-typeface-brand); font-weight: 500; font-size: .875rem; color: var(--md-sys-color-on-surface-variant); }
.t-card footer::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: var(--md-sys-color-primary); flex: none; }
.t-card .md-btn { align-self: flex-start; margin-top: -4px; }

.masonry { columns: 1; column-gap: 20px; }
@media (min-width: 720px) { .masonry { columns: 2; } }
@media (min-width: 1100px) { .masonry { columns: 3; } }
.masonry > * { break-inside: avoid; margin-bottom: 20px; }

/* Events ----------------------------------------------------------------- */
.events { display: flex; flex-direction: column; gap: 16px; }
.event { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; padding: 20px; border-radius: var(--md-sys-shape-xl); background: var(--md-sys-color-surface-container-low); }
@media (min-width: 840px) { .event { grid-template-columns: auto 1fr auto; align-items: center; padding: 24px 28px; gap: 28px; } }
.event__date { width: 72px; height: 84px; border-radius: var(--md-sys-shape-lg); background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--md-ref-typeface-brand); }
.event__date strong { font-size: 1.75rem; line-height: 1; font-weight: 500; }
.event__date span { font-size: .75rem; margin-top: 6px; }
.event--full .event__date { background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant); }
.event__title { font-family: var(--md-ref-typeface-brand); font-size: 1.25rem; line-height: 1.6rem; font-weight: 500; margin-bottom: 6px; }
.event__text { color: var(--md-sys-color-on-surface-variant); font-size: .9375rem; line-height: 1.55; margin-bottom: 12px; }
.event__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.event__action { grid-column: 2; }
@media (min-width: 840px) { .event__action { grid-column: auto; } }

/* CTA band --------------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 28px;
  align-items: center;
  padding: clamp(36px, 6vw, 72px);
  border-radius: var(--md-sys-shape-xl2);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
@media (min-width: 900px) { .cta { grid-template-columns: 1.3fr auto; } }
.cta::after { content: ""; position: absolute; right: -120px; top: -140px; width: 380px; height: 380px; border-radius: 50%; background: var(--md-sys-color-primary); opacity: .10; pointer-events: none; }
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-family: var(--md-ref-typeface-brand); font-weight: 400; font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.15; letter-spacing: -.015em; margin-bottom: 12px; text-wrap: balance; }
.cta p { font-size: 1.0625rem; line-height: 1.6; max-width: 560px; opacity: .92; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .md-btn--outlined { color: inherit; box-shadow: inset 0 0 0 1px currentColor; }

/* Footer ----------------------------------------------------------------- */
.footer { background: var(--md-sys-color-surface-container); color: var(--md-sys-color-on-surface-variant); padding: clamp(48px, 6vw, 72px) 0 32px; }
.footer__grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1.1fr 1.2fr; gap: 48px; } }
.footer h3 { font-family: var(--md-ref-typeface-brand); font-size: .875rem; font-weight: 500; letter-spacing: .04em; color: var(--md-sys-color-on-surface); margin-bottom: 16px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: .9375rem; }
.footer a { color: inherit; }
.footer a:hover { color: var(--md-sys-color-primary); }
.footer__brand p { margin-top: 14px; font-size: .9375rem; line-height: 1.6; max-width: 340px; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact .msr { font-size: 20px; color: var(--md-sys-color-primary); }
.footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--md-sys-color-outline-variant); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: .8125rem; }
.footer__bottom ul { flex-direction: row; gap: 20px; font-size: inherit; }

/* Inner page hero -------------------------------------------------------- */
.page-hero { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(32px, 5vw, 56px); }
.page-hero__grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .page-hero__grid { grid-template-columns: 1.1fr .9fr; gap: 64px; } }
.page-hero h1 {
  font-family: var(--md-ref-typeface-brand);
  font-weight: 400;
  font-size: clamp(2.25rem, 4.8vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 8px 0 20px;
  text-wrap: balance;
}
.page-hero .lead { max-width: 640px; }
.page-hero .actions { margin-top: 28px; }
.page-hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--md-sys-shape-xl2); }
.page-hero__media--portrait { max-width: 480px; margin-inline: auto; }
.page-hero__media--portrait img { aspect-ratio: 1; border-radius: 36px 150px 36px 150px; }

/* Service page ----------------------------------------------------------- */
.service-layout { display: grid; gap: 40px; }
@media (min-width: 960px) { .service-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 64px; align-items: start; } }
.service-aside { position: sticky; top: calc(var(--md-top-bar-height) + 24px); }
.info-card { padding: 24px; gap: 4px; }
.info-card h3 { font-family: var(--md-ref-typeface-brand); font-size: 1.125rem; font-weight: 500; margin-bottom: 8px; }
.info-card__row { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; padding: 8px 0; }
.info-card__row .msr { width: 40px; height: 40px; border-radius: 50%; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); display: grid; place-items: center; font-size: 20px; }
.info-card__row small { display: block; font-size: .75rem; letter-spacing: .03em; color: var(--md-sys-color-on-surface-variant); }
.info-card__row strong { font-weight: 500; font-size: .9375rem; line-height: 1.35; display: block; }
.info-card .md-btn { margin-top: 16px; }
.info-card__phone { text-align: center; margin-top: 12px; font-size: .875rem; color: var(--md-sys-color-on-surface-variant); }
.info-card__phone a { font-weight: 500; }

.quotes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.quote-pill { position: relative; padding: 18px 20px 18px 52px; border-radius: var(--md-sys-shape-lg2); background: var(--md-sys-color-surface-container-low); font-size: .9375rem; line-height: 1.55; font-style: italic; color: var(--md-sys-color-on-surface); }
.quote-pill .msr { position: absolute; left: 18px; top: 16px; font-size: 22px; color: var(--md-sys-color-tertiary); font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.feature { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 22px; border-radius: var(--md-sys-shape-xl); background: var(--md-sys-color-surface-container-low); align-items: start; }
.feature__icon { width: 48px; height: 48px; border-radius: var(--md-sys-shape-md); background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); display: grid; place-items: center; }
.feature h3 { font-family: var(--md-ref-typeface-brand); font-size: 1.0625rem; font-weight: 500; margin-bottom: 4px; }
.feature p { font-size: .9375rem; line-height: 1.55; color: var(--md-sys-color-on-surface-variant); }

.steps { display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 20px 24px; border-radius: var(--md-sys-shape-xl); background: var(--md-sys-color-surface-container-low); align-items: start; }
.step__num { width: 56px; height: 56px; border-radius: var(--md-sys-shape-lg); background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); display: grid; place-items: center; font-family: var(--md-ref-typeface-brand); font-weight: 500; font-size: 1.125rem; }
.step h3 { font-family: var(--md-ref-typeface-brand); font-size: 1.125rem; font-weight: 500; margin: 6px 0 4px; }
.step p { font-size: .9375rem; line-height: 1.55; color: var(--md-sys-color-on-surface-variant); }

.mini-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.mini-stat { padding: 20px 22px; border-radius: var(--md-sys-shape-lg2); background: var(--md-sys-color-surface-container-low); }
.mini-stat strong { display: block; font-family: var(--md-ref-typeface-brand); font-weight: 400; font-size: 2.25rem; line-height: 1.1; color: var(--md-sys-color-primary); letter-spacing: -.02em; }
.mini-stat span { display: block; font-weight: 500; font-size: .9375rem; margin-top: 6px; }
.mini-stat small { display: block; font-size: .8125rem; color: var(--md-sys-color-on-surface-variant); margin-top: 2px; }

.degrees { display: grid; gap: 8px; }
.degree { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: var(--md-sys-shape-lg); background: var(--md-sys-color-surface-container-low); }
.degree__code { min-width: 76px; text-align: center; padding: 6px 10px; border-radius: var(--md-sys-shape-sm); background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); font-family: var(--md-ref-typeface-brand); font-weight: 500; font-size: .875rem; }

.bank { display: grid; gap: 16px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); padding: 24px; border-radius: var(--md-sys-shape-xl); background: var(--md-sys-color-surface-container-low); }
.bank small { display: block; font-size: .75rem; letter-spacing: .03em; color: var(--md-sys-color-on-surface-variant); margin-bottom: 4px; }
.bank strong { font-family: var(--md-ref-typeface-brand); font-weight: 500; font-size: 1rem; }

.blockquote { padding: 28px 32px; border-radius: var(--md-sys-shape-xl); background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); font-family: var(--md-ref-typeface-brand); font-size: 1.25rem; line-height: 1.5; }
.blockquote footer { margin-top: 12px; font-family: var(--md-ref-typeface-plain); font-size: .875rem; opacity: .85; }

.principles { display: grid; gap: 12px; counter-reset: principle; }
.principle { display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: center; padding: 18px 24px; border-radius: var(--md-sys-shape-xl); background: var(--md-sys-color-surface-container-lowest); font-family: var(--md-ref-typeface-brand); font-size: 1.125rem; line-height: 1.4; }
.principle::before { counter-increment: principle; content: counter(principle); width: 48px; height: 48px; border-radius: 50%; background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); display: grid; place-items: center; font-weight: 500; }

.link-card { padding: 24px; gap: 12px; height: 100%; }
.link-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link-card__icon { width: 44px; height: 44px; border-radius: var(--md-sys-shape-md); background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); display: grid; place-items: center; }
.link-card__top > .msr { color: var(--md-sys-color-on-surface-variant); font-size: 20px; }
.link-card small { font-family: var(--md-ref-typeface-brand); font-size: .75rem; font-weight: 500; letter-spacing: .04em; color: var(--md-sys-color-primary); }
.link-card h3 { font-family: var(--md-ref-typeface-brand); font-size: 1.0625rem; font-weight: 500; line-height: 1.4; margin-top: 2px; }
.link-card p { font-size: .9rem; line-height: 1.5; color: var(--md-sys-color-on-surface-variant); }

/* Services index rows ---------------------------------------------------- */
.service-rows { display: flex; flex-direction: column; gap: 24px; }
.service-row { display: grid; gap: 28px; align-items: center; padding: clamp(20px, 3vw, 36px); border-radius: var(--md-sys-shape-xl2); background: var(--md-sys-color-surface-container-low); }
@media (min-width: 900px) { .service-row { grid-template-columns: 1fr 1fr; gap: 48px; } .service-row:nth-child(even) .service-row__media { order: 2; } }
.service-row__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--md-sys-shape-lg2); }
.service-row__body h2 { font-family: var(--md-ref-typeface-brand); font-weight: 400; font-size: clamp(1.625rem, 2.6vw, 2.125rem); line-height: 1.2; margin: 16px 0 12px; }
.service-row__body p { color: var(--md-sys-color-on-surface-variant); font-size: 1.0625rem; line-height: 1.65; margin-bottom: 20px; }
.service-row__body .md-chip-set { margin-bottom: 24px; }

/* Contact ---------------------------------------------------------------- */
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; } }
.contact-list { gap: 12px; }
.contact-list .md-list-item { padding: 18px 20px; border-radius: var(--md-sys-shape-xl); background: var(--md-sys-color-surface-container-low); align-items: center; }
.contact-list .md-list-item__headline a { color: inherit; }
.form-card { padding: clamp(24px, 4vw, 40px); --md-field-bg: var(--md-sys-color-surface-container-low); }
.form-card h2 { font-family: var(--md-ref-typeface-brand); font-weight: 400; font-size: 1.75rem; line-height: 1.2; margin-bottom: 8px; }
.form-card > p { color: var(--md-sys-color-on-surface-variant); margin-bottom: 28px; font-size: .9375rem; }
.form-grid { display: grid; gap: 22px; }
@media (min-width: 600px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.form-label { display: block; font-family: var(--md-ref-typeface-brand); font-size: .875rem; font-weight: 500; color: var(--md-sys-color-on-surface-variant); margin-bottom: 10px; }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--md-sys-shape-md); background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); font-size: .875rem; margin-bottom: 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.success { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 8px 0; }
.success__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); display: grid; place-items: center; }
.success__icon .msr { font-size: 32px; }
.success h2 { font-family: var(--md-ref-typeface-brand); font-weight: 400; font-size: 1.75rem; }
.success p { color: var(--md-sys-color-on-surface-variant); max-width: 480px; }
.map { border-radius: var(--md-sys-shape-xl2); overflow: hidden; background: var(--md-sys-color-surface-container); height: clamp(320px, 38vw, 520px); }
.map iframe { width: 100%; height: 100%; border: 0; }

/* 404 -------------------------------------------------------------------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound__code { font-family: var(--md-ref-typeface-brand); font-size: clamp(5rem, 14vw, 9rem); line-height: 1; color: var(--md-sys-color-primary-container); letter-spacing: -.04em; }

/* Content note (e.g. contraindications) ------------------------------------ */
.note { display: grid; grid-template-columns: 24px 1fr; gap: 14px; padding: 20px 22px; margin-bottom: 1.6em; border-radius: var(--md-sys-shape-xl); background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.note p { margin: 0; font-size: 1rem; line-height: 1.65; }

/* Certificate thumbnail (about page) ---------------------------------------- */
.cert { display: block; margin-top: 12px; border-radius: var(--md-sys-shape-lg); overflow: hidden; background: var(--md-sys-color-surface-container-lowest); box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant); color: var(--md-sys-color-on-surface); text-decoration: none; transition: box-shadow var(--md-sys-motion-short) var(--md-sys-motion-standard); }
.cert:hover { box-shadow: inset 0 0 0 1px var(--md-sys-color-outline), var(--md-sys-elevation-1); }
.cert img { width: 100%; aspect-ratio: 1600 / 1131; object-fit: cover; }
.cert__caption { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-family: var(--md-ref-typeface-brand); font-size: .8125rem; font-weight: 500; }
.cert__caption .msr { font-size: 18px; color: var(--md-sys-color-primary); }
.cert__caption .msr:last-child { margin-left: auto; color: var(--md-sys-color-on-surface-variant); }

/* Events archive ------------------------------------------------------------ */
.archive { display: grid; gap: 28px; }
.archive__year { display: grid; gap: 12px; }
@media (min-width: 900px) {
  .archive__year { grid-template-columns: 150px 1fr; gap: 32px; align-items: start; }
  .archive__label { position: sticky; top: calc(var(--md-top-bar-height) + 24px); }
}
.archive__label { display: flex; flex-direction: column; gap: 6px; font-family: var(--md-ref-typeface-brand); font-weight: 400; font-size: 2rem; line-height: 1; letter-spacing: -.02em; color: var(--md-sys-color-primary); }
.archive__label small { font-family: var(--md-ref-typeface-plain); font-size: .8125rem; letter-spacing: 0; color: var(--md-sys-color-on-surface-variant); }
.archive__list { list-style: none; display: grid; gap: 8px; }
.archive__item { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; padding: 14px 18px; border-radius: var(--md-sys-shape-lg2); background: var(--md-sys-color-surface-container-lowest); }
.archive__date { display: flex; flex-direction: column; align-items: center; font-size: .75rem; line-height: 1.25; color: var(--md-sys-color-on-surface-variant); }
.archive__date strong { font-family: var(--md-ref-typeface-brand); font-size: 1.375rem; font-weight: 500; color: var(--md-sys-color-on-surface); }
.archive__title { display: block; font-family: var(--md-ref-typeface-brand); font-weight: 500; font-size: 1rem; line-height: 1.4; }
.archive__meta { display: block; margin-top: 4px; font-size: .8125rem; color: var(--md-sys-color-on-surface-variant); }

/* Event links + event page ------------------------------------------------- */
.event__title a, a.archive__title { color: inherit; }
.event__title a:hover, a.archive__title:hover { text-decoration: underline; text-underline-offset: .18em; text-decoration-color: var(--md-sys-color-outline); }
.event__action { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (min-width: 840px) { .event__action { flex-direction: column; align-items: stretch; } }
.event-hero__date { display: inline-flex; align-items: baseline; gap: 10px; margin-bottom: 12px; color: var(--md-sys-color-primary); font-family: var(--md-ref-typeface-brand); font-size: 1.125rem; font-weight: 500; }
.event-hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 24px; }
.event-past { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--md-sys-shape-lg); background: var(--md-sys-color-surface-container); color: var(--md-sys-color-on-surface-variant); margin-bottom: 24px; max-width: 640px; }
.page-hero--single .page-hero__grid { grid-template-columns: minmax(0, 1fr); }

/* Select in the contact form (label always floated) ------------------------ */
.md-field--select .md-field__label { transform: translateY(-24px) scale(.75); }
.md-field--select .md-field__input {
  padding-right: 44px; cursor: pointer; background-color: transparent;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.md-field--select option, .md-field--select optgroup { color: var(--md-sys-color-on-surface); background: var(--md-sys-color-surface); }

/* Notice at the top (admin „Съобщение най-горе“) --------------------------- */
.announce { padding: 10px clamp(16px, 4vw, 32px) 0; }
.announce__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 10px 8px 10px 18px;
  border-radius: var(--md-sys-shape-lg2);
  background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container);
}
.announce__icon { flex: none; }
.announce__text { flex: 1 1 260px; font-size: .9375rem; line-height: 1.45; }
.announce__text a { color: inherit; text-decoration: underline; text-underline-offset: .15em; }
.announce__link { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 14px; border-radius: var(--md-sys-shape-full); background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface); font: 500 .875rem/1.25rem var(--md-ref-typeface-brand); white-space: nowrap; }
.announce__link .msr { font-size: 18px; }
.announce__link:hover { background: var(--md-sys-color-surface-container-lowest); }
.announce__close { display: grid; place-items: center; width: 36px; height: 36px; flex: none; margin-left: auto; border-radius: 50%; color: inherit; }
.announce__close:hover { background: color-mix(in oklab, currentColor 10%, transparent); }
.announce__close .msr { font-size: 20px; }

/* Map / video / podcast behind a button (nothing loads from the provider before a click) */
.embed-gate { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 30%, var(--md-sys-color-surface-container-high), var(--md-sys-color-surface-container) 70%); }
.embed-gate--map { background:
  repeating-linear-gradient(0deg, transparent 0 38px, color-mix(in oklab, var(--md-sys-color-outline-variant) 55%, transparent) 38px 40px),
  repeating-linear-gradient(90deg, transparent 0 38px, color-mix(in oklab, var(--md-sys-color-outline-variant) 55%, transparent) 38px 40px),
  var(--md-sys-color-surface-container); }
.embed-gate__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.embed-gate:has(.embed-gate__poster)::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgb(0 0 0 / .72), rgb(0 0 0 / .32)); }
.embed-gate__poster + .embed-gate__body { color: #fff; }
.embed-gate__poster + .embed-gate__body .embed-gate__note { opacity: .95; text-shadow: 0 1px 2px rgb(0 0 0 / .5); }
.embed-gate__body { position: relative; z-index: 2; display: grid; justify-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--md-sys-shape-lg); text-align: center; }
.embed-gate__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: var(--md-sys-shape-full);
  background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); font: 500 .875rem/1.25rem var(--md-ref-typeface-brand); cursor: pointer; }
.embed-gate__btn:hover { box-shadow: var(--md-sys-elevation-1); }
.embed-gate__btn .msr { font-size: 20px; }
.embed-gate .embed-gate__note { margin: 0; font-size: .75rem; line-height: 1.3; opacity: .85; color: inherit; }
.embed-gate.is-loaded { display: block; background: none; }
.embed-gate iframe { width: 100%; height: 100%; border: 0; display: block; }
.footer__map.embed-gate { height: 170px; }
.footer__map .embed-gate__note { display: none; }
.footer__map.is-loaded iframe { pointer-events: auto; }
.embed--audio .embed-gate__body { grid-auto-flow: column; }
.footer__map.embed-gate::after { display: none; }
.embed-gate__caption { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font: 500 1rem/1.4 var(--md-ref-typeface-brand); color: var(--md-sys-color-on-surface); }
.embed-gate__caption .msr { color: var(--md-sys-color-primary); }
