/* ═══════════════════════════════════════════════════════
   BSB CLINIQUE — GLOBAL STYLESHEET
   Balance · Soul · Body
═══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ──────────────────────────────────── */
:root {
  --forest:     #1C3830;
  --forest-md:  #274F42;
  --forest-lt:  #3A6B58;
  --forest-xs:  #EAF0EE;
  --gold:       #C8A46A;
  --gold-lt:    #E8D4AB;
  --gold-xs:    #FAF4E8;
  --cream:      #F7F3ED;
  --stone:      #EDE7DD;
  --warm-white: #FFFCF8;
  --text:       #1A1916;
  --text-md:    #4A4742;
  --text-lt:    #8C8880;
  --white:      #FFFFFF;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', sans-serif;

  --r-sm:   6px;
  --r-md:   14px;
  --r-lg:   24px;
  --r-xl:   36px;
  --r-pill: 100px;

  --shadow-sm:   0 2px 12px rgba(28,56,48,.06);
  --shadow-md:   0 4px 28px rgba(28,56,48,.10);
  --shadow-lg:   0 12px 48px rgba(28,56,48,.16);

  --ease:   cubic-bezier(.25,.46,.45,.94);
  --t-fast: .2s;
  --t-base: .35s;
  --t-slow: .6s;
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* фиксированная шапка — якоря (#booking и др.) не уезжают под .nav */
  scroll-padding-top: 96px;
}
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font-body); cursor: pointer; border: none; }

/* ── TYPOGRAPHY ─────────────────────────────────────── */
.display { font-family: var(--font-display); font-weight: 300; line-height: 1.08; letter-spacing: -.01em; }
.h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); }
.h2 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); }
.h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
.h4 { font-size: 1.1rem; font-family: var(--font-display); font-weight: 500; }

.eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}

.body-lg { font-size: 1.05rem; line-height: 1.75; font-weight: 300; color: var(--text-md); }
.body-sm { font-size: .875rem; line-height: 1.65; font-weight: 300; color: var(--text-md); }

/* ── LAYOUT ─────────────────────────────────────────── */
.container { max-width: 1260px; margin: 0 auto; padding: 0 48px; }
.section { padding: 100px 0; }
.section-sm { padding: 64px 0; }

@media (max-width: 1024px) { .container { padding: 0 32px; } }
@media (max-width: 768px)  { .container { padding: 0 20px; } .section { padding: 72px 0; } }

/* ── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: .8rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  transition: all var(--t-base) var(--ease);
  white-space: nowrap; position: relative; overflow: hidden;
}

.btn-primary {
  background: var(--forest); color: var(--white);
  padding: 16px 38px; border-radius: var(--r-pill);
  box-shadow: 0 4px 20px rgba(28,56,48,.25);
}
.btn-primary:hover {
  background: var(--forest-md);
  box-shadow: 0 8px 36px rgba(28,56,48,.35);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold); color: var(--white);
  padding: 16px 38px; border-radius: var(--r-pill);
  box-shadow: 0 4px 20px rgba(200,164,106,.3);
}
.btn-gold:hover {
  background: #B8944A;
  box-shadow: 0 8px 36px rgba(200,164,106,.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent; color: var(--forest);
  padding: 14px 34px; border-radius: var(--r-pill);
  border: 1.5px solid var(--forest);
}
.btn-outline:hover { background: var(--forest); color: var(--white); transform: translateY(-2px); }

.btn-ghost {
  background: transparent; color: var(--gold);
  padding: 8px 0; border-bottom: 1px solid currentColor;
  font-size: .78rem;
}
.btn-ghost:hover { letter-spacing: .14em; }

.btn svg, .btn-arrow::after { transition: transform var(--t-fast) var(--ease); }
.btn-arrow::after { content: '→'; font-size: 1em; }
.btn-arrow:hover::after { transform: translateX(4px); }

/* ── NAV ────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 22px 0;
  transition: all var(--t-base) var(--ease);
}
.nav.scrolled {
  background: rgba(247,243,237,.96);
  backdrop-filter: blur(16px);
  padding: 14px 0;
  box-shadow: 0 1px 0 rgba(28,56,48,.08);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }

.nav-logo {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
  width: max-content;
  align-items: center;
}
.nav-logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 500;
  color: var(--forest); line-height: 1;
  letter-spacing: .02em;
}
.nav-logo-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(38%) sepia(22%) saturate(816%) hue-rotate(108deg) brightness(95%) contrast(90%);
}
.nav-logo-sub {
  display: block;
  width: 100%;
  text-align: center;
  font-size: .6rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-lt);
}

.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  font-size: .78rem; font-weight: 400; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-md);
  transition: color var(--t-fast); position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width var(--t-base) var(--ease);
}
.nav-links a:hover { color: var(--forest); }
.nav-links a:hover::after { width: 100%; }

/* Dropdown */
.nav-dropdown { position: relative; }
/* Невидимый мост под ссылкой — шире текста «Услуги», как и само меню (min-width), иначе курсор уходит из :hover */
.nav-dropdown::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: max(240px, 100%);
  top: 100%;
  height: 20px;
  z-index: 199;
}
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 16px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--warm-white); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 12px 0; min-width: 220px;
  opacity: 0; pointer-events: none;
  transition: all var(--t-base) var(--ease);
  border: 1px solid rgba(28,56,48,.06);
  list-style: none;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu li a {
  display: block; padding: 10px 22px;
  font-size: .8rem; letter-spacing: .04em;
  color: var(--text-md); text-transform: none;
  transition: all var(--t-fast);
}
.nav-dropdown-menu li a:hover { color: var(--forest); background: var(--forest-xs); padding-left: 28px; }
.nav-dropdown-menu li a::after { display: none; }

.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; }
.nav-burger span { display: block; width: 22px; height: 1.5px; background: var(--forest); transition: all var(--t-base) var(--ease); transform-origin: center; }
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 199;
  background: var(--cream); flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
  opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: all; display: flex; }
.mobile-menu a {
  font-family: var(--font-display); font-size: 2.2rem;
  font-weight: 300; color: var(--forest); transition: color var(--t-fast);
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu .btn {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
}
.mobile-menu .btn-primary {
  color: var(--white);
}
.mobile-menu .btn-primary:hover {
  color: var(--white);
}

@media (max-width: 960px) { .nav-links { display: none; } .nav-burger { display: flex; } }
@media (max-width: 500px) {
  .nav-inner { gap: 12px; }
  .nav-inner > .btn { display: none; }
  .nav-logo-mark { font-size: 1.15rem; }
  .nav-logo-mark img { width: 22px; height: 22px; }
  .nav-logo-sub { font-size: .5rem; letter-spacing: .14em; }
}

/* ── SCROLL REVEAL ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.reveal.in  { opacity: 1; transform: translateY(0); }
.reveal-left  { opacity: 0; transform: translateX(-32px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.reveal-left.in  { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(32px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.reveal-right.in { opacity: 1; transform: translateX(0); }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; }
.d5 { transition-delay: .5s; } .d6 { transition-delay: .6s; }

/* ── FOOTER ─────────────────────────────────────────── */
footer {
  background: var(--text); color: rgba(255,255,255,.55);
  padding: 80px 0 36px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 64px; margin-bottom: 64px;
}
.footer-brand {
  display: inline-flex;
  flex-direction: column;
  width: max-content;
  align-items: center;
}
.footer-logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--white);
}
.footer-logo-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(73%) sepia(33%) saturate(558%) hue-rotate(355deg) brightness(93%) contrast(88%);
}
.footer-tagline {
  display: block;
  width: 100%;
  text-align: center;
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 4px 0 20px;
}
.footer-desc { font-size: .83rem; line-height: 1.7; font-weight: 300; margin-bottom: 28px; }
.footer-socials { display: flex; gap: 10px; }
.footer-social-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.07); display: flex; align-items: center;
  justify-content: center; font-size: .72rem; font-weight: 600;
  color: rgba(255,255,255,.45); transition: all var(--t-fast); cursor: pointer;
}
.footer-social-btn:hover { background: var(--gold); color: var(--white); }

.footer-col h4 { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--white); margin-bottom: 20px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: .83rem; font-weight: 300; color: rgba(255,255,255,.5); transition: color var(--t-fast); }
.footer-links a:hover { color: var(--gold); }

.footer-contact-row { margin-bottom: 14px; }
.footer-contact-row strong { display: block; font-size: .63rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: 3px; font-weight: 500; }
.footer-contact-row span, .footer-contact-row a { font-size: .83rem; font-weight: 300; color: rgba(255,255,255,.55); transition: color var(--t-fast); }
.footer-contact-row a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07); padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: .75rem;
}
.footer-bottom a { color: rgba(255,255,255,.35); transition: color var(--t-fast); }
.footer-bottom a:hover { color: var(--gold); }
.footer-disclaimer { font-size: .7rem; color: rgba(255,255,255,.25); }

.footer-offer-disclaimer {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-offer-disclaimer p {
  font-size: .72rem;
  line-height: 1.65;
  font-weight: 300;
  color: rgba(255,255,255,.38);
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; gap: 36px; } .footer-bottom { flex-direction: column; text-align: center; } }

/* ── LICENSE POPUP ──────────────────────────────────── */
.popup-overlay {
  position: fixed; inset: 0; background: rgba(26,25,22,.7);
  backdrop-filter: blur(6px); z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease);
  padding: 20px;
}
#pdf-popup.popup-overlay { z-index: 520; }
.booking-popup-overlay { z-index: 510; }
.bp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 520px) { .bp-grid-2 { grid-template-columns: 1fr; } }
.popup-overlay.open { opacity: 1; pointer-events: all; }
.popup-box {
  background: var(--warm-white); border-radius: var(--r-lg);
  max-width: 600px; width: 100%; padding: 48px;
  position: relative; transform: translateY(16px);
  transition: transform var(--t-base) var(--ease);
  max-height: 80vh; overflow-y: auto;
}
.popup-overlay.open .popup-box { transform: translateY(0); }
.popup-close {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--stone); border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--text-md);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast);
}
.popup-close:hover { background: var(--gold); color: var(--white); }
.popup-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; color: var(--forest); margin-bottom: 20px; }
.popup-body { font-size: .875rem; line-height: 1.75; color: var(--text-md); font-weight: 300; }
.popup-body p { margin-bottom: 12px; }
.popup-body strong { color: var(--text); font-weight: 500; }

.popup-box--pdf {
  max-width: min(960px, 96vw);
  width: 100%;
  padding: 20px 20px 24px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.popup-box--pdf .popup-title {
  margin-bottom: 14px;
  padding-right: 44px;
  flex-shrink: 0;
}
.pdf-popup-frame-wrap {
  flex: 1;
  min-height: 280px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--stone);
  border: 1px solid rgba(28, 56, 48, .08);
}
.pdf-popup-frame {
  width: 100%;
  height: min(72vh, 780px);
  border: 0;
  display: block;
  vertical-align: top;
}

/* ── SERVICE PAGE HERO (справа) — те же фото и тонировка, что у .service-thumb на главной ─ */
.svc-hero-right > .svc-photo-bg {
  width: 100%;
  min-height: 460px;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.svc-hero-photo--kapelnitsy {
  background-image: linear-gradient(135deg, rgba(28,56,48,.7), rgba(58,107,88,.65)), url(../img/IMG_5015.JPG);
}
.svc-hero-photo--terapiya {
  background-image: linear-gradient(135deg, rgba(42,62,85,.7), rgba(74,110,143,.65)), url(../img/IMG_5016.JPG);
}
.svc-hero-photo--telesnaya {
  background-image: linear-gradient(135deg, rgba(62,42,42,.7), rgba(122,74,74,.65)), url(../img/IMG_5017.JPG);
}
.svc-hero-photo--psihologiya {
  background-image: linear-gradient(135deg, rgba(46,42,62,.7), rgba(90,74,122,.65)), url(../img/IMG_5018.JPG);
}
.svc-hero-photo--fizioterapiya {
  background-image: linear-gradient(135deg, rgba(28,56,48,.7), rgba(74,122,98,.65)), url(../img/IMG_5019.JPG);
}
.svc-hero-photo--kosmetologiya {
  background-image: linear-gradient(135deg, rgba(62,46,26,.7), rgba(138,106,58,.65)), url(../img/IMG_5020.JPG);
}
.svc-hero-photo--fdt {
  background-image: linear-gradient(135deg, rgba(13,32,32,.7), rgba(28,72,56,.65)), url(../img/IMG_5021.JPG);
}

/* ── SCROLL TO TOP ──────────────────────────────────── */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 400;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 56, 48, 0.42);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease), visibility var(--t-base), background var(--t-fast), transform var(--t-fast);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.scroll-top:hover {
  background: rgba(28, 56, 48, 0.68);
  transform: translateY(-2px);
}
.scroll-top svg {
  display: block;
  width: 22px;
  height: 22px;
}
@media (max-width: 500px) {
  .scroll-top { right: 14px; bottom: 18px; width: 42px; height: 42px; }
}
