:root {
  --color-primary: #EF7A85;
  --color-primary-dark: #d8636e;
  --color-secondary: #14453D;
  --color-secondary-light: #1e5d52;
  --color-bg: #FFFFFF;
  --color-bg-alt: #FAF6F3;
  --color-text: #1A1A1A;
  --color-muted: #6B6B6B;
  --color-border: #E8E2DC;
  --color-whatsapp: #25D366;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Cormorant Garamond', 'Georgia', serif;

  --container: 1200px;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(20, 69, 61, 0.08);
  --shadow-md: 0 4px 14px rgba(20, 69, 61, 0.10);
  --shadow-lg: 0 10px 30px rgba(20, 69, 61, 0.12);

  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-secondary);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h4 { font-size: 1.15rem; }

p { color: var(--color-text); }
p + p { margin-top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}
.section-alt { background: var(--color-bg-alt); }

.section-title {
  text-align: center;
  margin-bottom: 1rem;
}
.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  max-width: 640px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: white;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--color-secondary);
  color: white;
}
.btn-secondary:hover {
  background: var(--color-secondary-light);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}
.btn-outline:hover {
  background: white;
  color: var(--color-secondary);
}
.btn-outline-dark {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}
.btn-outline-dark:hover {
  background: var(--color-secondary);
  color: white;
}
.btn-whatsapp {
  background: var(--color-whatsapp);
  color: white;
}
.btn-whatsapp:hover {
  background: #1ebd5b;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-lg { padding: 1.1rem 2.2rem; font-size: 1.05rem; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FFFFFF;
  transition: var(--transition);
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: var(--container);
  margin: 0 auto;
}
.logo img {
  height: 90px;
  width: auto;
  display: block;
}
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-list {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-item {
  position: relative;
}
.nav-item > a {
  color: var(--color-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  cursor: pointer;
}
.nav-item > a:hover { color: var(--color-primary); }
.nav-item > a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}
.nav-item.has-dropdown > a::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
  margin-left: 0.1rem;
}
.nav-item.has-dropdown:hover > a::after {
  transform: rotate(225deg) translate(-2px, -2px);
}
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  background: #FFFFFF;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.6rem 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.dropdown li { list-style: none; }
.dropdown a {
  display: block;
  padding: 0.7rem 1.4rem;
  color: var(--color-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}
.dropdown a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.nav .btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; }

.menu-toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-secondary);
  transition: var(--transition);
}

/* ============ Hero (home) ============ */
.hero {
  position: relative;
  height: 90vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 69, 61, 0.65), rgba(20, 69, 61, 0.45));
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  color: white;
  max-width: 820px;
  padding: 0 1.5rem;
}
.hero-content h1 {
  color: white;
  margin-bottom: 1.2rem;
}
.hero-content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2.2rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ Page Hero (subpáginas) ============ */
.page-hero {
  background: var(--color-secondary);
  color: white;
  padding: 5rem 0 4rem;
  text-align: center;
}
.page-hero h1 {
  color: white;
  margin-bottom: 0.8rem;
}
.page-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
}
.breadcrumb {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.breadcrumb a:hover { color: var(--color-primary); }

/* ============ Quiénes somos ============ */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-img img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 500px;
  object-fit: cover;
}
.about-text .eyebrow {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.8rem;
}
.about-text h2 { margin-bottom: 1.5rem; }
.about-text p { color: var(--color-muted); margin-bottom: 1.2rem; }

/* ============ Especialidades / Grid de tarjetas ============ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.card:hover .card-img img {
  transform: scale(1.05);
}
.card-body {
  padding: 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-body h3 {
  margin-bottom: 0.6rem;
}
.card-body p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  flex: 1;
}
.card-link {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.card-link:hover { color: var(--color-secondary); }
.card-link::after {
  content: '→';
  transition: var(--transition);
}
.card-link:hover::after { transform: translateX(4px); }

/* ============ Valores ============ */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  text-align: center;
}
.value-item .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 122, 133, 0.12);
  border-radius: 50%;
  color: var(--color-primary);
}
.value-item h3 { margin-bottom: 0.6rem; }
.value-item p { color: var(--color-muted); font-size: 0.95rem; }

/* ============ Clínicas tarjetas ============ */
.clinics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.clinic-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}
.clinic-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.clinic-card:hover img { transform: scale(1.05); }
.clinic-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 69, 61, 0.92) 0%, rgba(20, 69, 61, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: white;
}
.clinic-card-overlay h3 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}
.clinic-card-overlay p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

/* ============ CTA Banner ============ */
.cta-banner {
  background: var(--color-secondary);
  color: white;
  padding: 4rem 0;
  text-align: center;
}
.cta-banner h2 {
  color: white;
  margin-bottom: 1rem;
}
.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

/* ============ Tratamiento detalle ============ */
.treatment-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.treatment-intro img {
  border-radius: var(--radius-lg);
  width: 100%;
  height: 480px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}
.treatment-intro h2 { margin-bottom: 1.2rem; }
.treatment-intro p { color: var(--color-muted); margin-bottom: 1rem; }

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 2rem;
}
.feature-list li {
  background: white;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
}
.feature-list li strong {
  color: var(--color-secondary);
  display: block;
  margin-bottom: 0.3rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: var(--transition);
}
.gallery img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

/* ============ Clínicas página ============ */
.clinic-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 5rem;
}
.clinic-section:nth-child(even) .clinic-info { order: 2; }
.clinic-section .clinic-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.8rem;
  height: 480px;
}
.clinic-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.clinic-gallery img:first-child {
  grid-row: 1 / 3;
}
.clinic-info h2 { margin-bottom: 1.2rem; }
.clinic-info .data-list {
  margin: 1.5rem 0 2rem;
}
.clinic-info .data-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.clinic-info .data-list li:last-child { border-bottom: none; }
.clinic-info .data-list .label {
  color: var(--color-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-width: 90px;
}
.clinic-map {
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 7;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}
.clinic-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============ Contacto ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.contact-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  border: 1px solid var(--color-border);
}
.contact-card h3 {
  margin-bottom: 0.6rem;
}
.contact-card .city {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}
.contact-card .data {
  text-align: left;
  margin-bottom: 2rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}
.contact-card .data div {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}
.contact-card .data div:last-child { border: none; }
.contact-card .data strong {
  color: var(--color-secondary);
  display: inline-block;
  min-width: 90px;
}

/* ============ Floating WhatsApp ============ */
.fab-whatsapp {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 90;
  transition: var(--transition);
}
.fab-whatsapp:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}
.fab-whatsapp svg { width: 30px; height: 30px; }

/* ============ Footer ============ */
.site-footer {
  background: var(--color-secondary);
  color: rgba(255, 255, 255, 0.85);
  padding: 4rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand img {
  height: 90px;
  width: auto;
  margin-bottom: 1.2rem;
  display: block;
  border-radius: 4px;
}
.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}
.footer-col h4 {
  color: white;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
}
.footer-col ul li {
  padding: 0.4rem 0;
  font-size: 0.92rem;
}
.footer-col ul li a:hover {
  color: var(--color-primary);
}
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  margin-top: 1.2rem;
  transition: var(--transition);
}
.footer-social:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
}
.footer-col address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.7;
}
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: white;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
  }
  .nav.open { transform: translateX(0); }
  .nav-list {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    align-items: flex-start;
  }
  .nav-item { width: 100%; }
  .nav-item > a { font-size: 1.05rem; }
  .nav-item.has-dropdown > a::after { display: none; }
  .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    padding: 0.4rem 0 0.4rem 1rem;
    min-width: auto;
    background: transparent;
  }
  .dropdown a {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--color-muted);
  }
  .dropdown a:hover { background: transparent; }

  .section { padding: 3.5rem 0; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }

  .about,
  .treatment-intro,
  .clinic-section,
  .clinics-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about-img img,
  .treatment-intro img { height: 320px; }

  .cards-grid,
  .values { grid-template-columns: 1fr; }

  .feature-list,
  .gallery { grid-template-columns: 1fr 1fr; }

  .clinic-section .clinic-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px;
    height: auto;
  }
  .clinic-gallery img:first-child { grid-row: auto; }
  .clinic-section:nth-child(even) .clinic-info { order: 0; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  .hero { height: 80vh; min-height: 500px; }
  .hero-content p { font-size: 1rem; }

  .fab-whatsapp { width: 54px; height: 54px; bottom: 1rem; right: 1rem; }
}
