/* B.T Maison — общие стили. Логические свойства (inline/block) — чтобы RTL и LTR работали одинаково. */
:root {
  --ink: #0e0d0b;
  --ink-2: #17150f;
  --ink-3: #221f17;
  --cream: #f7f3ea;
  --cream-2: #efe8d9;
  --text-dark: #1d1a14;
  --text-dark-2: #4d463a;
  --text-light: #f6f1e6;
  --text-light-2: #c9c0ae;
  --gold: #d9b45a;
  --gold-2: #b8862f;
  --gold-ink: #7d5a17; /* золото для текста на светлом фоне (контраст AA) */
  --line-light: rgba(217, 180, 90, 0.28);
  --line-dark: rgba(29, 26, 20, 0.12);
  --radius: 14px;
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.45);
  --container: 1180px;
  --header-h: 72px;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-head: "Playfair Display", Georgia, serif;
}
html[lang="he"] { --font-head: "Frank Ruhl Libre", "Times New Roman", serif; }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.center { text-align: center; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 500; text-decoration: none;
}
.skip:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font: 500 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .2s, background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: linear-gradient(135deg, #e6c56f, var(--gold) 45%, var(--gold-2)); color: var(--ink); }
.btn-gold:hover { background: linear-gradient(135deg, #f0d384, #e2be62 45%, #c4923a); }
.btn-ghost { border-color: var(--line-light); color: var(--text-light); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: 14px 32px; font-size: 1.1rem; }
.legal .btn-ghost { color: var(--text-dark); border-color: var(--line-dark); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(14, 13, 11, .86); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line-light); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: "Playfair Display", Georgia, serif; font-weight: 700; letter-spacing: .06em; font-size: 1.05rem; }
.brand-sub { font-size: .75rem; color: var(--text-light-2); }
.nav { margin-inline-start: auto; }
.nav-panel { display: flex; align-items: center; gap: 28px; }
.nav-list { display: flex; gap: 22px; }
.nav-list a { text-decoration: none; font-size: .95rem; color: var(--text-light-2); transition: color .2s; }
.nav-list a:hover { color: var(--gold); }
.lang-list { display: flex; gap: 4px; padding-inline-start: 18px; border-inline-start: 1px solid var(--line-light); }
.lang-list a, .lang-list span { display: inline-block; padding: 4px 8px; border-radius: 6px; font-size: .85rem; text-decoration: none; }
.lang-list a { color: var(--text-light-2); }
.lang-list a:hover { color: var(--gold); }
.lang-list span { color: var(--ink); background: var(--gold); font-weight: 500; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
/* Баннер на весь экран, текст поверх нижней части */
.hero {
  position: relative; overflow: hidden; background: var(--ink);
  min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h));
  display: flex; align-items: flex-end;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 35%; }
/* Логотип на картинке слева — текст всегда справа (физически), во всех языках */
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to left, rgba(14,13,11,.95) 0%, rgba(14,13,11,.88) 36%, rgba(14,13,11,.5) 50%, rgba(14,13,11,0) 62%),
    linear-gradient(to top, rgba(14,13,11,.95) 0%, rgba(14,13,11,.5) 14%, rgba(14,13,11,0) 26%);
}
.hero-inner { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding-block: 64px 28px; }
.hero-copy { max-width: 540px; margin-left: auto; margin-right: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { color: var(--gold); font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
html[lang="he"] .eyebrow { letter-spacing: .04em; font-size: .92rem; }
.hero h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); margin-bottom: 20px; }
.hero h1 .accent { display: block; font-size: .62em; margin-top: .35em; color: var(--gold); font-weight: 500; }
.lead { color: var(--text-light-2); font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 58ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .lead { color: #ddd5c4; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--line-light); padding-top: 24px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-family: "Playfair Display", Georgia, serif; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; color: var(--gold); line-height: 1; }
html[dir="rtl"] .stat-value { text-align: right; }
.stat-label { color: var(--text-light-2); font-size: .98rem; }

/* ---------- Секции ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); background: var(--cream); color: var(--text-dark); }
.section-alt { background: var(--cream-2); }
.section-dark { background: var(--ink-2); color: var(--text-light); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 52px); }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.section:not(.section-dark) .eyebrow { color: var(--gold-ink); }
.section-lead { margin-top: 14px; color: var(--text-dark-2); font-size: 1.1rem; }
.section-dark .section-lead, .muted { color: var(--text-light-2); }

/* Основное направление */
.service-main {
  display: grid; grid-template-columns: 1.3fr .7fr; background: var(--ink); color: var(--text-light);
  border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow);
}
.service-main-copy { padding: clamp(28px, 4vw, 52px); }
.tag { display: inline-block; font-size: .8rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold); margin-bottom: 18px; }
.service-main h3 { display: flex; align-items: center; gap: 14px; font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin-bottom: 12px; }
.service-main h3 .card-icon { width: 44px; height: 44px; color: var(--gold); }
.service-main-copy > p { color: var(--text-light-2); max-width: 60ch; }
.points { display: grid; gap: 10px; margin-block: 24px; }
.points li, .values li { display: flex; gap: 10px; align-items: flex-start; }
.icon-check { color: var(--gold); margin-top: .2em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .9rem; padding: 6px 14px; border-radius: 999px; background: var(--ink-3); color: var(--text-light); }
.service-main-media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
.card {
  background: #fff; border: 1px solid var(--line-dark); border-radius: calc(var(--radius) + 6px);
  padding: clamp(24px, 3vw, 36px); transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -26px rgba(0,0,0,.35); }
.card .card-icon { width: 44px; height: 44px; color: var(--gold-ink); margin-bottom: 18px; }
.card h3 { font-size: 1.45rem; margin-bottom: 8px; }
.card p { color: var(--text-dark-2); }

/* Больницы */
.hospitals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; margin-bottom: 28px; }
.hospitals li { display: flex; align-items: center; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--line-light); }
.icon-hosp { color: var(--gold); width: 22px; height: 22px; }

/* Галерея */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shot a { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--cream-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.shot a:hover img { transform: scale(1.05); }
.shot-cap {
  position: absolute; inset-inline: 0; bottom: 0; padding: 28px 12px 10px; font-size: .85rem; line-height: 1.35; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.78), transparent); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.shot a:hover .shot-cap, .shot a:focus-visible .shot-cap { opacity: 1; transform: none; }
.shot:first-child { grid-column: span 2; grid-row: span 2; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(8, 7, 5, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { max-width: min(92vw, 1200px); }
.lightbox img { max-height: 82vh; width: auto; margin-inline: auto; border-radius: 8px; }
.lightbox figcaption { text-align: center; color: var(--text-light-2); margin-top: 12px; }
.lb-btn {
  position: fixed; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.2); cursor: pointer;
}
.lb-btn:hover { background: rgba(217,180,90,.25); }
.lb-close { top: 16px; inset-inline-end: 16px; }
.lb-prev { top: 50%; inset-inline-start: 16px; transform: translateY(-50%); }
.lb-next { top: 50%; inset-inline-end: 16px; transform: translateY(-50%); }

/* О компании */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; max-height: 560px; }
.about-copy h2 { margin-bottom: 18px; }
.about-copy p { color: var(--text-dark-2); margin-bottom: 14px; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.section:not(.section-dark) .icon-check { color: var(--gold-ink); }

/* Процесс */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line-dark); }
.step-num {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; margin-bottom: 16px;
  background: var(--ink); color: var(--gold); font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.15rem;
}
.step h3 { font-size: 1.25rem; margin-bottom: 6px; }
.step p { color: var(--text-dark-2); font-size: .98rem; }

/* Контакты */
.contact { background: radial-gradient(800px 360px at 50% 0%, rgba(217,180,90,.14), transparent 70%), var(--ink-2); }
.contact-head { text-align: center; max-width: 720px; margin-inline: auto; margin-bottom: clamp(32px, 5vw, 48px); }
.contact-head h2 { margin-bottom: 14px; }
.contact-head .lead { margin-inline: auto; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: stretch; }
.contact-card { background: var(--ink); border: 1px solid var(--line-light); border-radius: calc(var(--radius) + 6px); padding: clamp(24px, 3.5vw, 40px); }
.contact-wa { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; text-align: center; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-code { width: 168px; padding: 10px; background: #fff; border-radius: 12px; }
.qr-code svg { display: block; width: 100%; height: auto; }
.qr p { color: var(--text-light-2); font-size: .92rem; max-width: 30ch; }
.contact-list { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.contact-list li { display: flex; align-items: center; gap: 10px; color: var(--text-light-2); }
.contact-list .icon { color: var(--gold); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--gold); }

.contact-form h3 { font-size: 1.5rem; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .92rem; color: var(--text-light-2); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text-light); background: var(--ink-3);
  border: 1px solid rgba(217,180,90,.3); border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
html[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,180,90,.25); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; font-size: .9rem; color: var(--text-light-2); }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--gold); }
.consent a { color: var(--gold); }
.contact-form .btn { width: 100%; }
.contact-form .btn:disabled { opacity: .6; cursor: progress; }
.form-status { min-height: 1.6em; margin-top: 14px; font-size: .95rem; }
.form-status.is-success { color: #8fd19e; }
.form-status.is-error { color: #ff9b8f; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Подвал */
.site-footer { background: var(--ink); border-top: 1px solid var(--line-light); padding-block: 48px 96px; }
.footer-inner { display: grid; justify-items: center; gap: 22px; text-align: center; }
.footer-logo { width: 170px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; }
.footer-links a { color: var(--text-light-2); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { color: #8f8777; font-size: .85rem; }

.wa-float {
  position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 40; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 28px -8px rgba(0,0,0,.55);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float .icon { width: 30px; height: 30px; }

/* Юридические страницы */
.legal { background: var(--cream); color: var(--text-dark); padding-block: 56px 80px; }
.prose { max-width: 780px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 24px; }
.prose h2 { font-size: 1.4rem; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--text-dark-2); margin-bottom: 10px; }
.prose ul { list-style: disc; padding-inline-start: 1.4em; }
.prose a { color: var(--gold-ink); }

/* Появление при скролле */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease var(--d, 0ms), transform .7s ease var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1020px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
    background: transparent; border: 1px solid var(--line-light); color: var(--text-light); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s, opacity .25s;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; inset-inline-start: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .nav { order: 3; margin-inline-start: 0; }
  .header-cta { margin-inline-start: auto; }
  .nav-panel {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line-light); padding: 8px 20px 20px; display: none;
  }
  .nav-panel.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { display: block; padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid rgba(217,180,90,.15); color: var(--text-light); }
  .lang-list { border: 0; padding: 16px 0 0; gap: 8px; }
  .lang-list a, .lang-list span { padding: 8px 14px; font-size: .95rem; border: 1px solid var(--line-light); }

  .about { grid-template-columns: 1fr; }
  .about-media { max-width: 480px; }
  .service-main { grid-template-columns: 1fr; }
  .service-main-media { order: -1; }
  .service-main-media img { min-height: 0; max-height: 360px; }
  .hospitals { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand-sub { display: none; }
  .header-cta span:not(.sr-only) { display: none; }
  .header-cta { padding: 8px 12px; }
  /* Телефон: баннер целиком сверху, текст под ним */
  .hero { display: block; min-height: 0; }
  .hero-bg { position: relative; aspect-ratio: 1672 / 941; }
  .hero-bg img { object-position: center; }
  .hero-bg::after { background: linear-gradient(to top, var(--ink) 0%, rgba(14,13,11,0) 35%); }
  .hero-inner { padding-block: 8px 40px; }
  .stats { grid-template-columns: 1fr; gap: 18px; }
  .stat { flex-direction: row; align-items: baseline; gap: 14px; }
  .stat-value { min-width: 2.6em; }
  .cards, .hospitals, .values, .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .shot-cap { display: none; }
  .actions .btn { flex: 1 1 100%; }
  .qr { display: none; }
  .contact-wa .btn { width: 100%; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
