:root {
  /* Cores - Tons Terrosos e Neutros Sofisticados */
  --color-sand: #F5F1EB;
  /* Areia/Off-white claro para clínica */
  --color-beige: #E6DFD3;
  /* Bege para divisões suaves */
  --color-brown-soft: #8B7355;
  /* Marrom suave para o começo do Spa */
  --color-green-deep: #2C3E36;
  /* Verde profundo para imersão final */
  --color-text-dark: #2A2A2A;
  /* Texto principal (quase preto) */
  --color-text-light: #Fcfcfc;
  /* Texto claro sobre fundos escuros */
  --color-accent: #6c7865;
  /* Verde sutil para detalhes/botões */

  /* Gradientes sutis para transições */
  --gradient-clinical: linear-gradient(180deg, var(--color-sand) 0%, var(--color-beige) 100%);
  --gradient-spa: linear-gradient(180deg, var(--color-beige) 0%, var(--color-brown-soft) 50%, var(--color-green-deep) 100%);

  /* Tipografia */
  --font-primary: 'Sorts Mill Goudy', serif;
  /* Elegância clássica, editorial */
  --font-secondary: 'Inter', sans-serif;
  /* Apoio para legibilidade técnica e botões */
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  color: var(--color-text-dark);
  background-color: var(--color-sand);
  /* Cor base clínica inicial */
  line-height: 1.6;
  overflow-x: hidden;
}

/* Tipografia Base */
h1,
h2,
h3,
h4,
.brand-font {
  font-family: var(--font-primary);
  font-weight: 400;
  /* "Autoridade silenciosa" não precisa gritar */
}

h1 {
  font-size: 2.8rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--color-green-deep);
  line-height: 1.2;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-dark);
}

p {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  color: rgba(42, 42, 42, 0.85);
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-green-deep);
}

.emphasize {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-style: italic;
  margin-top: 2rem;
  color: var(--color-green-deep);
  border-left: 2px solid var(--color-green-deep);
  padding-left: 1rem;
}

/* Container Responsivo (First-Mobile focado) */
.container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Utilitários */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mb-4 {
  margin-bottom: 4rem;
}

.mt-2 {
  margin-top: 2rem;
}

.pb-2 {
  padding-bottom: 2rem;
}

.pb-4 {
  padding-bottom: 4rem;
}

.bg-light {
  /* Mantém a mesma cor de fundo do corpo para evitar troca de cor ao rolar */
  background-color: var(--color-sand);
}

/* --- Botoes (Call To Action) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 2rem;
  background-color: var(--color-green-deep);
  color: var(--color-text-light);
  font-family: var(--font-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.btn:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-green-deep);
  border: 1px solid var(--color-green-deep);
}

.btn-secondary:hover {
  background-color: var(--color-green-deep);
  color: var(--color-text-light);
}

.white-btn {
  border-color: var(--color-sand);
  color: var(--color-sand);
}

.white-btn:hover {
  background-color: var(--color-sand);
  color: var(--color-green-deep);
}

/* Header & Menu */
header {
  position: absolute;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 100;
  background: linear-gradient(
    to bottom,
    rgba(245, 241, 235, 0.96) 0%,
    rgba(245, 241, 235, 0.9) 40%,
    rgba(245, 241, 235, 0) 100%
  );
}

.header-inner {
  display: flex;
  align-items: center;
}

.logo-container img {
  height: 40px;
  width: auto;
}

/* --- Sections --- */
section {
  padding: 5rem 0;
  position: relative;
}

/* 1. Hero Section */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0 4rem;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(245, 241, 235, 0.2) 0%, rgba(245, 241, 235, 0.95) 90%, var(--color-sand) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Título do hero um pouco menor */
.hero-content h1 {
  font-size: 2.3rem;
}

/* Logo grande no hero (estado inicial mobile) */
.hero-logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.hero-logo {
  height: 200px;
  width: auto;
}

/* Estado recolhido do logo no mobile (controlado via classe no body) */
body.logo-collapsed .hero-logo {
  opacity: 0;
  transform: translateY(-10px) scale(0.9);
}

body.logo-collapsed .hero-logo-wrapper {
  height: 0;
  margin-bottom: 0;
  overflow: hidden;
}

body .hero-logo,
body .hero-logo-wrapper {
  transition: all 0.35s ease;
}

/* 2. Scroll-Telling Diagnostico */
.clinic-intro {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.diagnosis-scroll {
  padding-top: 3rem;
}

.sticky-visual {
  position: sticky;
  top: 100px;
  /* Mantém a imagem presa no topo enquanto dá o scroll */
  height: 60vh;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0;
  z-index: 1;
  box-shadow: none;
}

.sticky-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out, opacity 0.5s ease;
  filter: blur(5px);
  transform: scale(1.1);
}

.scroll-steps {
  position: relative;
  z-index: 2;
  margin-top: -150px;
  /* Sobrepõe a imagem suavemente */
  padding-bottom: 2rem;
}

.step {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 2rem;
  margin-bottom: 20vh;
  /* Espaçamento para o scroll-telling */
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  opacity: 0.3;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  border-left: 3px solid var(--color-green-deep);
}

.step.active {
  opacity: 1;
  transform: translateY(0);
}

/* 3. Listas Clínicas */
.patologia-list {
  list-style: none;
  margin-top: 1.5rem;
}

.patologia-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.patologia-list li::before {
  content: "•";
  color: var(--color-green-deep);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.clinical-treatments .patologia-list,
.headspa-section .headspa-card {
  margin-bottom: 3rem;
}

/* 4. HeadSpa Transition */
.transition-trigger {
  height: 1px;
  width: 100%;
}

.headspa-section {
  padding-top: 2rem;
}

.headspa-parallax-band {
  position: relative;
  height: 60vh;
  background-image: url('assets/headspa.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.tech-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.headspa-card img {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
  height: 250px;
}

/* 5. Tecnologias Slider */
.tech-slider {
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2rem;
  scrollbar-width: none;
  /* Firefox */
}

.tech-slider::-webkit-scrollbar {
  display: none;
  /* Chrome */
}

.tech-track {
  display: flex;
  gap: 1.5rem;
  padding: 0 1.5rem;
  width: max-content;
}

.tech-section .container.pb-2 {
  margin-bottom: 2.5rem;
}

.tech-card {
  width: 280px;
  scroll-snap-align: start;
  background-color: rgba(255, 255, 255, 0.05);
  /* Funciona nos dois fundos */
  padding: 1.5rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.tech-card img,
.placeholder-tech {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1rem;
  background-color: #ddd;
}

/* Camila Responsavel */
.camila-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.camila-image {
  width: 100%;
  margin-bottom: 2rem;
}

.camila-parallax-wrap {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.camila-image img {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}

.camila-section .camila-content {
  padding-bottom: 3rem;
}

/* Partículas de atmosfera – parallax em outra dimensão (mobile e desktop) */
.camila-atmosphere {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.camila-particle {
  position: absolute;
  display: block;
  will-change: transform;
}

.camila-leaf {
  display: block;
  width: 17px;
  height: 10px;
  background: url('assets/leaf.svg') no-repeat center / contain;
  opacity: 1;
}

.camila-particle:nth-child(1) { left: 6%;  top: 15%; }
.camila-particle:nth-child(1) .camila-leaf { transform: scale(1) rotate(-25deg); }
.camila-particle:nth-child(2) { left: 90%; top: 22%; }
.camila-particle:nth-child(2) .camila-leaf { transform: scale(1.2) rotate(40deg); }
.camila-particle:nth-child(3) { left: 12%; top: 68%; }
.camila-particle:nth-child(3) .camila-leaf { transform: scale(0.8) rotate(12deg); }
.camila-particle:nth-child(4) { left: 86%; top: 62%; }
.camila-particle:nth-child(4) .camila-leaf { transform: scale(1.1) rotate(-50deg); }
.camila-particle:nth-child(5) { left: 42%; top: 8%; }
.camila-particle:nth-child(5) .camila-leaf { transform: scale(0.5) rotate(8deg); }
.camila-particle:nth-child(6) { left: 68%; top: 78%; }
.camila-particle:nth-child(6) .camila-leaf { transform: scale(0.9) rotate(-35deg); }
.camila-particle:nth-child(7) { left: 28%; top: 42%; }
.camila-particle:nth-child(7) .camila-leaf { transform: scale(1.3) rotate(55deg); }
.camila-particle:nth-child(8) { left: 78%; top: 38%; }
.camila-particle:nth-child(8) .camila-leaf { transform: scale(0.45) rotate(-18deg); }
.camila-particle:nth-child(9) { left: 22%; top: 28%; }
.camila-particle:nth-child(9) .camila-leaf { transform: scale(1) rotate(22deg); }
.camila-particle:nth-child(10) { left: 94%; top: 55%; }
.camila-particle:nth-child(10) .camila-leaf { transform: scale(0.7) rotate(-40deg); }
.camila-particle:nth-child(11) { left: 8%; top: 48%; }
.camila-particle:nth-child(11) .camila-leaf { transform: scale(1.15) rotate(-8deg); }
.camila-particle:nth-child(12) { left: 72%; top: 12%; }
.camila-particle:nth-child(12) .camila-leaf { transform: scale(0.55) rotate(32deg); }
.camila-particle:nth-child(13) { left: 38%; top: 72%; }
.camila-particle:nth-child(13) .camila-leaf { transform: scale(1.25) rotate(-55deg); }
.camila-particle:nth-child(14) { left: 58%; top: 35%; }
.camila-particle:nth-child(14) .camila-leaf { transform: scale(0.65) rotate(18deg); }
.camila-particle:nth-child(15) { left: 15%; top: 8%; }
.camila-particle:nth-child(15) .camila-leaf { transform: scale(0.85) rotate(-30deg); }
.camila-particle:nth-child(16) { left: 82%; top: 68%; }
.camila-particle:nth-child(16) .camila-leaf { transform: scale(1.1) rotate(45deg); }

@media (max-width: 767px) {
  .camila-atmosphere {
    top: 0;
    bottom: auto;
    height: 60vh;
  }

  .camila-particle:nth-child(13),
  .camila-particle:nth-child(14),
  .camila-particle:nth-child(15),
  .camila-particle:nth-child(16) {
    display: none;
  }
}

@media (min-width: 768px) {
  .camila-atmosphere {
    top: 0;
    bottom: auto;
    height: 60vh;
  }
}

/* Desktop: 20% esquerda para foto (overflow), 80% texto */
@media (min-width: 768px) {
  .camila-section {
    overflow: visible;
  }

  .camila-layout {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
  }

  /* Coluna da foto: 20% do container, conteúdo vaza à esquerda */
  .camila-image {
    flex: 0 0 20%;
    width: 20%;
    min-width: 20%;
    margin-bottom: 0;
    margin-right: 0;
    position: relative;
    z-index: 1;
    padding: 2rem 0;
    overflow: visible;
    align-self: stretch;
    min-height: 70vh;
  }

  /* Wrap da foto: mais largo que a coluna, ancorado à direita, vaza à esquerda; dentro do container */
  .camila-parallax-wrap {
    overflow: visible;
    border-radius: 12px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 260px;
    max-height: 85vh;
    height: auto;
  }

  .camila-image img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    border-radius: 12px;
    will-change: transform, opacity;
    object-fit: contain;
    object-position: right center;
    display: block;
  }

  /* Partículas sobre a foto (atmosfera na imagem) */
  .camila-photo-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    border-radius: 12px;
  }

  .camila-particle-on-photo {
    position: absolute;
    display: block;
    will-change: transform;
  }

  .camila-leaf--photo {
    display: block;
    width: 14px;
    height: 8px;
    background: url('assets/leaf.svg') no-repeat center / contain;
    opacity: 1;
  }

  .camila-particle-on-photo:nth-child(1) { left: 12%; top: 22%; }
  .camila-particle-on-photo:nth-child(1) .camila-leaf--photo { transform: scale(0.9) rotate(-20deg); }
  .camila-particle-on-photo:nth-child(2) { left: 78%; top: 18%; }
  .camila-particle-on-photo:nth-child(2) .camila-leaf--photo { transform: scale(1.2) rotate(35deg); }
  .camila-particle-on-photo:nth-child(3) { left: 85%; top: 65%; }
  .camila-particle-on-photo:nth-child(3) .camila-leaf--photo { transform: scale(0.5) rotate(5deg); }
  .camila-particle-on-photo:nth-child(4) { left: 18%; top: 72%; }
  .camila-particle-on-photo:nth-child(4) .camila-leaf--photo { transform: scale(1.1) rotate(-42deg); }
  .camila-particle-on-photo:nth-child(5) { left: 48%; top: 45%; }
  .camila-particle-on-photo:nth-child(5) .camila-leaf--photo { transform: scale(0.7) rotate(28deg); }
  .camila-particle-on-photo:nth-child(6) { left: 55%; top: 15%; }
  .camila-particle-on-photo:nth-child(6) .camila-leaf--photo { transform: scale(0.85) rotate(-15deg); }
  .camila-particle-on-photo:nth-child(7) { left: 25%; top: 38%; }
  .camila-particle-on-photo:nth-child(7) .camila-leaf--photo { transform: scale(1.15) rotate(50deg); }
  .camila-particle-on-photo:nth-child(8) { left: 88%; top: 42%; }
  .camila-particle-on-photo:nth-child(8) .camila-leaf--photo { transform: scale(0.6) rotate(-25deg); }
  .camila-particle-on-photo:nth-child(9) { left: 35%; top: 78%; }
  .camila-particle-on-photo:nth-child(9) .camila-leaf--photo { transform: scale(0.95) rotate(12deg); }
  .camila-particle-on-photo:nth-child(10) { left: 62%; top: 58%; }
  .camila-particle-on-photo:nth-child(10) .camila-leaf--photo { transform: scale(1.05) rotate(-38deg); }

  /* Texto: 80% do container */
  .camila-content {
    flex: 1;
    width: 80%;
    min-width: 0;
    max-width: 80%;
    position: relative;
    padding-top: 0.5rem;
    padding-left: 1.5rem;
    box-sizing: border-box;
  }
}

/* Footer & Sticky */
footer {
  padding: 4rem 1.5rem;
  background-color: var(--color-sand);
}

.footer-logo {
  height: 150px; /* 75% do logo do hero (200px) */
  opacity: 0.8;
}

.footer-address {
  font-size: 0.9rem;
  color: var(--color-brown-soft);
  line-height: 1.5;
}

.copyright {
  font-size: 0.75rem;
  color: var(--color-brown-soft);
  opacity: 0.75;
  font-weight: 400;
}

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
  z-index: 999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-cta.visible {
  transform: translateY(0);
}

/* Mostrar logo do header de forma suave quando o logo grande recolher (mobile) */
@media (max-width: 767px) {
  header .logo-container img {
    transition: transform 0.35s ease, opacity 0.35s ease, height 0.35s ease;
  }

  body:not(.logo-collapsed) header .logo-container img {
    opacity: 0;
    transform: translateY(10px);
  }

  body.logo-collapsed header .logo-container img {
    opacity: 1;
    transform: translateY(0);
    height: 32px;
  }

  /* No mobile, o hero ganha um pouco mais de padding-top para acomodar o logo grande dentro do conteúdo */
  .hero {
    padding-top: 4.5rem;
  }

  /* Mobile: texto do hero um pouco menor, logo maior */
  .hero-content h1 {
    font-size: 1.85rem;
  }

  .hero-logo {
    height: 260px;
  }

  /* Mobile: parallax degrade gracioso (sem background-attachment: fixed) */
  .headspa-parallax-band {
    background-attachment: scroll;
    height: 50vh;
  }
}

/* Animações Reveal Gerais */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards;
}

.delay-1 {
  animation-delay: 0.3s;
}

.delay-2 {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------- */
/* RESPONSIVIDADE DESKTOP           */
/* -------------------------------- */
@media (min-width: 768px) {
  section {
    padding-bottom: 6rem;
  }

  .hero {
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    text-align: center;
  }

  /* Logo visível em desktop e mobile */
  .hero-logo-wrapper {
    display: flex;
  }

  .hero-logo {
    height: 280px;
  }

  .hero-bg img {
    object-position: top center;
  }

  .tech-slider {
    display: flex;
    justify-content: center;
    overflow-x: visible;
  }

  .tech-track {
    justify-content: center;
    flex-wrap: wrap;
    width: auto;
  }

  .sticky-visual {
    max-width: 100%;
    height: 400px;
    margin-bottom: 2rem;
  }

  .sticky-visual img {
    filter: blur(8px);
    opacity: 0.6;
  }

  .scroll-steps {
    margin-top: -100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 6rem;
  }

  .step {
    width: 80%;
    margin-bottom: 10vh;
  }

  .sticky-cta {
    display: flex;
    justify-content: center;
  }

  .sticky-cta .btn {
    width: auto;
    min-width: 300px;
  }
}