/* ============================================
   SITIO DR. VÍCTOR L. FIGUEROA
   CSS global consolidado - estilos compartidos
   ============================================ */

:root {
  --navy: #13293d;
  --navy-soft: #1e3a52;
  --teal: #3d7385;
  --teal-light: #7fb3c4;
  --teal-pale: #e8f1f4;
  --cream: #faf8f5;
  --warm-white: #fdfcfa;
  --ink: #1a1f2e;
  --ink-soft: #4a5568;
  --muted: #7a8494;
  --border: #e5e1d8;
  --accent: #c9a96e;
}

/* ============ RESET + BASE ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  color-scheme: light only;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--warm-white) !important;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============ NAVIGATION ============ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 225, 216, 0.6);
  padding: 1.25rem 0;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand-iso { height: 38px; width: auto; display: block; flex-shrink: 0; transition: transform 0.2s ease; }
.brand:hover .brand-iso { transform: scale(1.05); }
.brand-text { font-family: Poppins, sans-serif; font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; color: var(--navy); line-height: 1.2; display: block; }
.brand-sub { display: block; font-size: 0.66rem; font-weight: 400; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 3px; }
@media (max-width: 640px) {
  .brand-iso { height: 32px; }
  .brand-text { font-size: 0.88rem; }
  .brand-sub { font-size: 0.58rem; letter-spacing: 0.1em; }
}
@media (max-width: 420px) {
  .brand-text { display: none; }
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.brand:hover .brand-logo {
  opacity: 0.85;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--navy);
}

.nav-links a.active {
  color: var(--navy);
  font-weight: 500;
}

.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--teal);
  transition: width 0.3s ease;
}

.nav-links a:not(.nav-cta):hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--navy);
  color: var(--warm-white) !important;
  padding: 0.6rem 1.3rem;
  border-radius: 2rem;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: var(--teal) !important;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--navy);
  margin: 5px 0;
  transition: 0.3s;
}

/* ============ BOTONES ============ */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 2.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--navy);
  color: var(--warm-white);
}

.btn-primary:hover {
  background: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -10px rgba(19, 41, 61, 0.25);
}

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

.btn-secondary:hover {
  border-color: var(--navy);
  background: var(--cream);
}

/* ============ EYEBROW COMÚN ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.5rem;
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--teal);
}

/* ============ CAJAS DE ATENCIÓN CLÍNICA ============ */
.attention-box {
  background: #fff9f0;
  border: 1px solid #f0d4a6;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.attention-box h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.attention-box h3 svg {
  color: var(--accent);
}

.attention-box p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ============ FOOTER ============ */
footer {
  background: var(--navy);
  color: var(--warm-white);
  padding: 5rem 0 2rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.footer-iso { height: 36px; width: auto; display: block; flex-shrink: 0; opacity: 0.95; }
.footer-brand-name { font-size: 1.2rem; color: var(--warm-white); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }

.footer-tagline {
  color: rgba(253, 252, 250, 0.65);
  font-size: 0.88rem;
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 1.75rem;
  max-width: 24rem;
}

.footer-socials {
  display: flex;
  gap: 0.85rem;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(253, 252, 250, 0.08);
  color: var(--warm-white);
  transition: all 0.2s ease;
  text-decoration: none;
}

.footer-socials a:hover {
  background: var(--teal);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 1.1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col ul a {
  color: rgba(253, 252, 250, 0.72);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 300;
}

.footer-col ul a:hover {
  color: var(--warm-white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(253, 252, 250, 0.1);
  color: rgba(253, 252, 250, 0.45);
  font-size: 0.78rem;
  font-weight: 300;
}

/* ============ WHATSAPP FLOTANTE ============ */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 10px 30px -5px rgba(37, 211, 102, 0.5);
  z-index: 99;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px -5px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
}

.whatsapp-float-label {
  position: absolute;
  right: calc(100% + 0.75rem);
  top: 50%;
  transform: translateY(-50%);
  background: var(--navy);
  color: var(--warm-white);
  padding: 0.5rem 0.9rem;
  border-radius: 1.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.whatsapp-float:hover .whatsapp-float-label {
  opacity: 1;
}

/* ============ AUMENTAR CONTRASTE CREAM (para que se note la alternancia) ============ */
:root {
  --cream: #f4efe5;  /* Antes: #faf8f5 - demasiado sutil en móvil */
}

/* ============ MENÚ MÓVIL FUNCIONAL ============ */
.nav-links.is-open {
  display: flex !important;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--warm-white);
  flex-direction: column;
  padding: 2.5rem 2rem;
  gap: 1.5rem;
  align-items: flex-start;
  z-index: 99;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}

.nav-links.is-open a {
  font-size: 1.1rem;
  padding: 0.5rem 0;
  width: 100%;
}

.nav-links.is-open .nav-cta {
  margin-top: 0.5rem;
  width: auto;
  padding: 0.85rem 1.8rem;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Evitar scroll del body cuando el menú está abierto */
body.menu-open {
  overflow: hidden;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 968px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .footer-brand-col {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1.25rem;
  }

  .nav-inner {
    padding: 0 1.25rem;
  }

  .brand-logo {
    height: 36px;
  }

  footer {
    padding: 3rem 0 1.5rem;
  }

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

  .whatsapp-float {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 50px;
    height: 50px;
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }

  .whatsapp-float-label {
    display: none;
  }
}

/* ============== SKIP LINK (A11y) ============== */
.skip-link {
  position: absolute;
  top: -200px;
  left: 1rem;
  z-index: 1000;
  background: var(--navy);
  color: var(--warm-white);
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--teal-light);
  outline-offset: 2px;
}
