:root {
  --green-dark: #062611;
  --green-main: #0d3b1d;
  --cream: #f4f4ef;
  --text: #1c1c1c;
  --muted: #6b6b6b;
  --white: #ffffff;
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
  --radius: 14px;
  --header-height: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
}

img,
video,
iframe {
  display: block;
}

img,
video {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--cream);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.navbar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.logo,
.logo img {
  flex: 0 0 auto;
}

.logo img {
  width: auto;
  height: 66px;
  object-fit: contain;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.3vw, 44px);
  margin: 0;
  padding: 0;
  font-weight: 600;
}

.nav-menu a {
  transition: opacity 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  opacity: 0.62;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 40px;
  padding: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  margin: 7px 0;
  border-radius: 999px;
  background: var(--green-dark);
}

/* Videos de fondo: siempre cubren el módulo completo, sin franjas ni huecos. */
.hero,
.contact-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: var(--green-dark);
  transform: translateZ(0);
}

.hero {
  height: clamp(520px, calc(100vh - var(--header-height)), 760px);
  height: clamp(520px, calc(100svh - var(--header-height)), 760px);
  color: var(--white);
  display: grid;
  place-items: center;
  text-align: center;
}

.background-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border: 0;
  transform: translateZ(0) scale(1.002);
  backface-visibility: hidden;
}

.hero-bg-video {
  filter: brightness(1.08) saturate(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(2, 23, 9, 0.18), rgba(2, 23, 9, 0.42)),
    linear-gradient(90deg, rgba(2, 23, 9, 0.13), transparent 50%, rgba(2, 23, 9, 0.13));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding-block: clamp(48px, 8vh, 88px);
}

.hero h1 {
  max-width: 1050px;
  margin: 0 auto 10px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.06;
  letter-spacing: 0.3px;
  text-wrap: balance;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero p {
  margin: 0 0 30px;
  font-size: clamp(1.1rem, 2.6vw, 1.75rem);
  font-weight: 500;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.52);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 42px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  font: 800 1rem/1 "Montserrat", Arial, sans-serif;
  cursor: pointer;
}

.btn-light {
  color: var(--green-dark);
  background: var(--white);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.section-light {
  background: var(--cream);
}

.about {
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
  padding-bottom: 36px;
}

.doctor-photo {
  align-self: stretch;
  min-height: 400px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--green-main);
}

.doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
}

.about-text {
  min-width: 0;
  padding: 48px 0 24px;
}

h2,
.section-title {
  margin: 0 0 18px;
  font-size: clamp(1.85rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: 0.3px;
  text-wrap: balance;
}

.subtitle {
  margin: 0 0 18px;
  color: #2b2b2b;
  text-transform: uppercase;
  font-style: italic;
}

.about-text ul {
  margin-bottom: 0;
  padding-left: 22px;
  font-weight: 500;
  line-height: 1.55;
}

.treatments {
  padding: 32px 0 68px;
}

.section-title {
  text-align: center;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(22px, 3vw, 34px);
  margin-top: 30px;
}

.treatment-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--green-main);
  box-shadow: var(--shadow);
}

.treatment-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s ease;
}

.treatment-card:hover img {
  transform: scale(1.025);
}

.treatment-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 36%, rgba(3, 35, 13, 0.96) 100%);
}

.card-content {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 18px;
  left: 18px;
  color: var(--white);
  text-align: center;
}

.card-content h3 {
  margin: 0 0 6px;
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  line-height: 1.08;
  letter-spacing: 0.65px;
  text-transform: uppercase;
  text-wrap: balance;
}

.card-content p {
  margin: 3px 0;
  font-size: 0.84rem;
  font-style: italic;
}

.testimonials {
  padding: clamp(48px, 7vw, 72px) 0;
  color: var(--white);
  background: var(--green-dark);
}

.testimonials h2 {
  margin-bottom: 44px;
  text-align: center;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(30px, 4vw, 44px);
}

blockquote {
  position: relative;
  min-width: 0;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.58;
}

blockquote::before {
  content: "“";
  display: block;
  font-size: 4rem;
  font-weight: 800;
  line-height: 0.7;
  opacity: 0.9;
}

.contact-banner {
  height: clamp(320px, 44vw, 560px);
  color: var(--white);
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(26px, 5vw, 46px);
}

.contact-bg-video {
  object-position: center;
  filter: brightness(1.08) saturate(1.04);
}

.contact-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(3, 25, 10, 0.04), rgba(3, 25, 10, 0.3));
}

.contact-banner-content {
  position: relative;
  z-index: 2;
}

.contact-banner h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.46);
}

.contact-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 36px);
  align-items: start;
  padding: 40px 0 22px;
}

.contact-info,
.contact-map {
  min-width: 0;
}

.contact-info h3 {
  margin: 0 0 14px;
  font-size: 1.38rem;
}

.contact-info ul {
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.75;
}

.contact-info p {
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.contact-info a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.address {
  font-weight: 600;
}

.contact-map {
  min-height: 235px;
  overflow: hidden;
  border-radius: 12px;
  background: #d7d7d7 url("assets/img/mapa.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.contact-map iframe {
  width: 100%;
  height: 235px;
  border: 0;
}

.appointment-note {
  margin: 18px 16px 30px;
  font-size: 0.86rem;
  font-weight: 800;
  font-style: italic;
  text-align: center;
  text-transform: uppercase;
}

.footer {
  padding: 22px 0;
  color: var(--white);
  background: var(--green-dark);
  font-size: 0.85rem;
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (max-width: 900px) {
  :root {
    --header-height: 72px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    display: block;
    padding: 17px 24px;
  }

  .about-grid {
    grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
    gap: 30px;
  }

  .contact-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-map {
    grid-column: 1 / -1;
  }

  .contact-map,
  .contact-map iframe {
    height: 300px;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 68px;
  }

  .container {
    width: min(100% - 24px, 1120px);
  }

  .logo img {
    height: 58px;
  }

  .hero {
    height: clamp(500px, calc(100vh - var(--header-height)), 690px);
    height: clamp(500px, calc(100svh - var(--header-height)), 690px);
  }

  .hero-bg-video {
    object-position: 54% center;
  }

  .hero-content {
    padding-block: 48px;
  }

  .about-grid,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .doctor-photo {
    min-height: 350px;
  }

  .about-text {
    padding-top: 30px;
  }

  .contact-banner {
    height: 330px;
  }

  .contact-bg-video {
    object-position: center;
  }

  .contact-map {
    grid-column: auto;
  }

  .contact-map,
  .contact-map iframe {
    height: 275px;
  }
}

@media (max-height: 680px) and (min-width: 681px) {
  .hero {
    height: calc(100vh - var(--header-height));
    height: calc(100svh - var(--header-height));
    min-height: 430px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .treatment-card img {
    transition: none;
  }
}
