/* ============================================
   Cabinet Physiothérapie Dragan Tanaskovic
   Design system
   ============================================ */

:root {
  /* Palette — derived from the clinic's own logo (amber figure + brown spine)
     pushed into a deeper, more editorial register instead of the
     cream+terracotta default */
  --espresso: #241712;
  --espresso-deep: #180F0B;
  --paper: #F3ECE3;
  --paper-soft: #EAE1D3;
  --amber: #E8944A;
  --amber-soft: #F2B37E;
  --clay: #6B4226;
  --sage: #8FA68E;
  --sage-deep: #5F7A61;
  --cream-text: #F5EFE6;
  --line: rgba(245, 239, 230, 0.14);
  --line-dark: rgba(36, 23, 18, 0.12);

  --font-display: "Unbounded", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--espresso);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 500;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
  font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.05rem; font-weight: 500; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  padding: 15px 26px;
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn-amber {
  background: var(--amber);
  color: var(--espresso-deep);
}
.btn-amber:hover { background: var(--amber-soft); transform: translateY(-2px); }
.btn-outline {
  border: 1px solid var(--line);
  color: var(--cream-text);
}
.btn-outline:hover { background: rgba(245,239,230,0.08); transform: translateY(-2px); }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(24, 15, 11, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 58px; width: auto; }
.brand-text {
  font-family: var(--font-display);
  color: var(--cream-text);
  font-size: 13px;
  line-height: 1.3;
}
.brand-text strong { display: block; font-size: 14px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}
.main-nav a {
  color: var(--cream-text);
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
  position: relative;
}
.main-nav a:hover { opacity: 1; }
.main-nav a.active { opacity: 1; }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--amber);
}

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
}
.lang-switch a {
  padding: 8px 12px;
  color: var(--cream-text);
  opacity: 0.55;
}
.lang-switch a.active { opacity: 1; background: var(--amber); color: var(--espresso-deep); }
.lang-switch a:not(.active):hover { opacity: 0.9; }

.header-actions { display: flex; align-items: center; gap: 20px; }

.nav-toggle { display: none; background: none; border: 0; color: var(--cream-text); font-size: 24px; line-height: 1; padding: 4px; }

@media (max-width: 900px) {
  .main-nav.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--espresso);
    border-bottom: 1px solid var(--line);
    padding: 10px 24px 26px;
    gap: 2px;
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
  }
  .main-nav a { width: 100%; padding: 14px 0; }
}

/* Dropdown — "Traitements" nav item */
.has-dropdown { position: relative; }
.has-dropdown > a { display: inline-flex; align-items: center; gap: 6px; }
.has-dropdown .caret {
  font-size: 10px;
  transition: transform 0.2s ease;
  opacity: 0.7;
}
.has-dropdown:hover .caret, .has-dropdown:focus-within .caret { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translate(-50%, 6px);
  min-width: 300px;
  background: var(--espresso);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  z-index: 60;
}
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: var(--espresso);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--cream-text);
  opacity: 0.82;
}
.dropdown-menu a::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}
.dropdown-menu a:hover { opacity: 1; background: rgba(245,239,230,0.07); color: var(--amber-soft); }

@media (max-width: 900px) {
  .has-dropdown { width: 100%; }
  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    box-shadow: none;
    border: none;
    background: rgba(245,239,230,0.04);
    margin-top: 6px;
    width: 100%;
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
  }
  .dropdown-menu::before { display: none; }
  .has-dropdown.open .dropdown-menu {
    display: block;
    min-width: 0;
    transform: none;
  }
  .has-dropdown > a .caret { margin-left: auto; }
}

/* ============ Hero ============ */
.hero {
  background: var(--espresso);
  color: var(--cream-text);
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  align-items: center;
  gap: 60px;
  padding-top: 70px;
  padding-bottom: 90px;
}
.hero-media { position: relative; }
.hero-media .frame {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(18%) saturate(85%) hue-rotate(-6deg) contrast(1.02);
}
.hero-media .frame::after {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid var(--amber);
  outline: 10px solid var(--espresso);
  outline-offset: -10px;
  pointer-events: none;
}
.hero-media .tag {
  position: absolute;
  bottom: -18px; left: 24px;
  background: var(--amber);
  color: var(--espresso-deep);
  padding: 10px 18px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.hero-copy .eyebrow { color: var(--amber-soft); margin-bottom: 18px; display: block; }
.hero-copy h1 { margin-bottom: 24px; }
.hero-copy h1 em {
  font-style: normal;
  color: var(--amber);
}
.hero-copy .lead {
  font-size: 1.1rem;
  color: rgba(245,239,230,0.82);
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero-copy .cta-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* Spine divider — signature element built from the logo's vertebra motif */
.spine-divider {
  display: flex;
  justify-content: center;
  padding: 30px 0;
  background: var(--espresso);
}
.spine-divider svg { display: block; }

/* ============ Treatments ============ */
.treatments {
  background: var(--paper);
  padding: 100px 0 110px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}
.section-head .eyebrow { color: var(--sage-deep); margin-bottom: 14px; display: block; }
.section-head p { max-width: 42ch; color: var(--clay); }

.spine-list {
  position: relative;
  display: grid;
  gap: 0;
}
.spine-list::before {
  content: "";
  position: absolute;
  left: 29px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--clay) 0 4px, transparent 4px 10px);
  opacity: 0.4;
}
.treatment-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 26px 8px;
  border-bottom: 1px solid var(--line-dark);
  position: relative;
  transition: padding-left 0.3s ease;
}
.treatment-item:first-child { border-top: 1px solid var(--line-dark); }
.treatment-item .vertebra {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--clay);
  justify-self: center;
  position: relative;
  z-index: 1;
  transition: background 0.3s ease, transform 0.3s ease;
}
.treatment-item:hover .vertebra { background: var(--amber); transform: scale(1.25); }
.treatment-item:hover { padding-left: 18px; }
.t-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; }
.t-desc { color: var(--clay); font-size: 0.95rem; margin-top: 6px; max-width: 56ch; }
.t-num { font-family: var(--font-mono); font-size: 12px; color: var(--sage-deep); }

/* ============ Team / video ============ */
.team {
  background: var(--espresso-deep);
  color: var(--cream-text);
  padding: 100px 0;
}
.team .section-head .eyebrow { color: var(--amber-soft); }
.team .section-head p { color: rgba(245,239,230,0.72); }
.team .section-head h2 { color: var(--cream-text); }
.video-frame {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}
.video-frame::before,
.video-frame::after {
  content: "";
  position: absolute;
  width: 46px; height: 46px;
  border: 2px solid var(--amber);
  z-index: 2;
}
.video-frame::before { top: 16px; left: 16px; border-right: none; border-bottom: none; }
.video-frame::after { bottom: 16px; right: 16px; border-left: none; border-top: none; }
.video-frame video { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; background: #000; }

/* ============ FAQ ============ */
.faq {
  background: var(--paper);
  padding: 100px 0 120px;
}
.faq .section-head .eyebrow { color: var(--sage-deep); }
.faq-list { max-width: 780px; }
.faq-item {
  border-bottom: 1px solid var(--line-dark);
}
.faq-q {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--espresso);
}
.faq-q .icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--sage-deep);
  position: relative;
}
.faq-q .icon::before, .faq-q .icon::after {
  content: "";
  position: absolute;
  background: var(--sage-deep);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq-q .icon::before { width: 10px; height: 1px; }
.faq-q .icon::after { width: 1px; height: 10px; transition: transform 0.25s ease, opacity 0.25s ease; }
.faq-item.open .faq-q .icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  color: var(--clay);
  font-size: 0.97rem;
}
.faq-a-inner { padding: 0 0 26px; }
.faq-item.open .faq-a { max-height: 400px; }

.faq-foot {
  margin-top: 34px;
  color: var(--clay);
  font-size: 0.95rem;
}
.faq-foot a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }

/* ============ Page hero (inner pages) ============ */
.page-hero {
  background: var(--espresso);
  color: var(--cream-text);
  padding: 70px 0 60px;
}
.page-hero .eyebrow { color: var(--amber-soft); margin-bottom: 16px; display: block; }
.page-hero h1 { margin-bottom: 18px; }
.page-hero p { color: rgba(245,239,230,0.78); max-width: 60ch; font-size: 1.05rem; }

/* ============ Detailed service list ============ */
.service-list { background: var(--paper); padding: 90px 0 100px; }
.service-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 30px;
  padding: 46px 0;
  border-bottom: 1px solid var(--line-dark);
  scroll-margin-top: 100px;
}
.service-item:first-child { border-top: 1px solid var(--line-dark); }
.service-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.service-marker .vertebra-lg {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--clay);
  position: relative;
}
.service-item:nth-child(odd) .service-marker .vertebra-lg { background: var(--amber); }
.service-marker .t-num { writing-mode: vertical-rl; letter-spacing: 0.1em; }
.service-body h3.t-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--espresso);
  margin-bottom: 14px;
}
.service-body p { color: var(--clay); max-width: 70ch; font-size: 1rem; }

@media (max-width: 640px) {
  .service-item { grid-template-columns: 44px 1fr; gap: 18px; }
  .service-marker .t-num { display: none; }
}

/* ============ CTA banner ============ */
.cta-banner {
  background: var(--espresso-deep);
  color: var(--cream-text);
  padding: 80px 0;
  text-align: center;
}
.cta-banner .eyebrow { color: var(--amber-soft); display: block; margin-bottom: 16px; }
.cta-banner h2 { margin-bottom: 30px; max-width: 30ch; margin-left: auto; margin-right: auto; }

/* ============ Footer ============ */
.site-footer {
  background: var(--espresso);
  color: var(--cream-text);
  padding: 80px 0 30px;
}
.footer-map {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 50px;
  border: 1px solid var(--line);
  filter: grayscale(0.4) sepia(0.15) contrast(1.05);
  aspect-ratio: 16 / 4.5;
}
.footer-map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 700px) { .footer-map { aspect-ratio: 4 / 3; } }

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
}
.footer-grid .eyebrow { color: var(--amber-soft); margin-bottom: 16px; display: block; }
.footer-grid h4 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 6px; }
.footer-grid p { color: rgba(245,239,230,0.75); font-size: 0.95rem; }
.footer-grid a.plain { color: rgba(245,239,230,0.75); }
.footer-grid a.plain:hover { color: var(--amber-soft); }
.footer-treatments li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-treatments a { color: rgba(245,239,230,0.75); }
.footer-treatments a:hover { color: var(--amber-soft); }
.footer-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 12px;
  color: rgba(245,239,230,0.5);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 10px;
}

/* ============ Responsive ============ */

/* Safety net against accidental horizontal scroll */
html, body { overflow-x: hidden; max-width: 100%; }

@media (max-width: 900px) {
  .wrap { padding: 0 24px; }

  .site-header .wrap { padding-top: 14px; padding-bottom: 14px; gap: 14px; }
  .brand img { height: 32px; }
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .lang-switch a { padding: 7px 10px; }
  .header-actions { gap: 10px; }
  .header-actions .btn-amber { padding: 11px 16px; }

  .hero .wrap { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 60px; gap: 44px; }
  .hero-media { max-width: 300px; margin: 0 auto; }
  .hero-copy { text-align: left; }
  .hero-copy .lead { max-width: none; }
  .hero-copy .cta-row .btn { flex: 1 1 auto; justify-content: center; }

  .treatments, .team, .faq, .service-list { padding-top: 64px; padding-bottom: 70px; }
  .section-head { margin-bottom: 40px; gap: 20px; }
  .section-head p { max-width: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-cta { align-items: flex-start; }
  .footer-cta .btn { width: 100%; justify-content: center; }
  .site-footer { padding-top: 56px; }

  .page-hero { padding: 50px 0 44px; }
  .page-hero p { max-width: none; }
  .cta-banner { padding: 56px 0; }
  .cta-banner h2 { max-width: none; }

  .video-frame::before, .video-frame::after { width: 30px; height: 30px; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 20px; }

  .header-actions .btn-amber span.full { display: none; }
  .header-actions .btn-amber { padding: 11px 13px; }
  .lang-switch { font-size: 11px; }
  .lang-switch a { padding: 6px 8px; }

  h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  h2 { font-size: clamp(1.6rem, 7vw, 2rem); }

  .hero-media { max-width: 240px; }
  .hero-media .tag { left: 12px; bottom: -14px; font-size: 10px; padding: 8px 14px; }

  .spine-divider svg { width: 220px; height: 26px; }

  .treatment-item { grid-template-columns: 34px 1fr; gap: 16px; padding: 20px 4px; }
  .t-num { display: none; }
  .treatment-item:hover { padding-left: 4px; }
  .spine-list::before { left: 21px; }

  .service-item { grid-template-columns: 34px 1fr; gap: 16px; padding: 32px 0; }
  .service-marker .t-num { display: none; }
  .service-body .t-title { font-size: 1.25rem; }

  .video-frame::before, .video-frame::after { width: 22px; height: 22px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer-map { aspect-ratio: 4 / 3.4; }
}

@media (max-width: 380px) {
  .brand img { height: 28px; }
  .header-actions .btn-amber { padding: 10px 12px; }
  .lang-switch a { padding: 6px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
