/* ========= THEME (PALETA DEL DR.) ========= */
:root{
  --ink-1:#060609;
  --ink-2:#061820;   /* texto principal */
  --ink-3:#0c2c3a;   /* subtítulos/headers */
  --primary:#123e56; /* primario */
  --accent:#185877;  /* acento/botones */
  --muted-border:#e0e6ed;
  --muted-bg:#f5f7fa; /* fondo claro para mantener buena legibilidad */
  --white:#ffffff;
}


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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--muted-bg);
  color: var(--ink-2);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  transition: box-shadow 0.3s ease;
}

img:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}
a:hover{ color: var(--accent); }
a:focus-visible,
button:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}


/* ====== TOPBAR elegante (paleta del Dr.) ====== */
.topbar{
  position: sticky; top:0; z-index:1000;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom:1px solid var(--muted-border);
  transition: box-shadow .25s ease, background .25s ease;
}
.topbar.is-scrolled{
  background: rgba(255,255,255,.96);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 0;
}

/* Marca */
.brand{display:flex; align-items:center; gap:10px; text-decoration:none}
.brand-logo{
  width:34px; height:34px; border-radius:10px;
  display:inline-grid; place-items:center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color:#fff; font-weight:700; letter-spacing:.5px;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.brand-text{color:var(--ink-3); font-weight:600}

/* Links desktop */
.nav-links{list-style:none; display:flex; gap:20px; margin:0; padding:0}
.nav-link{
  position:relative; padding:8px 4px; color:var(--ink-2); font-weight:500;
}
.nav-link::after{
  content:""; position:absolute; left:0; right:0; bottom:0;
  height:2px; background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin:left; transition: transform .25s ease;
  border-radius:2px;
}
.nav-link:hover::after{ transform: scaleX(1); }

/* CTA */
.btn-cta{
  display:inline-block; padding:10px 16px; border-radius:10px;
  background: var(--accent); color:#fff; font-weight:600;
  box-shadow: 0 6px 16px rgba(24,88,119,.22);
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
}
.btn-cta:hover{ background: var(--primary); transform: translateY(-1px); }

/* Burger (versión dentro del topbar, NO fija a pantalla) */
/* Burger (dentro del topbar) */
.menu-toggle{
  display:none;
  width:36px; height:24px;
  background:transparent; border:0; cursor:pointer;
  padding:0;
  display:none;
  position:relative;
}

.menu-toggle span{
  display:block;
  width:100%; height:3px;
  background:var(--ink-3);
  border-radius:3px;
  transition: transform .25s ease, opacity .25s ease, width .25s ease;
  transform-origin:center;
  /* Espaciado visual: usamos margin entre líneas */
  margin:4px 0;
}

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

/* Drawer móvil (overlay + panel) */
.drawer-overlay{
  position: fixed; inset:0; background: rgba(0,0,0,.35);
  backdrop-filter: blur(2px);
  z-index: 1000;
}
.mobile-drawer{
  position: fixed; top:0; right:-100%; width:min(86vw, 360px); height:100vh;
  background:#fff; box-shadow: -10px 0 30px rgba(0,0,0,.12);
  transition: right .30s ease; z-index:1001; display:flex; flex-direction:column; padding:20px;
}
.mobile-drawer.open{ right:0; }
.drawer-header{
  display:flex; align-items:center; justify-content:space-between; margin-bottom:10px;
}
.drawer-close{
  background:transparent; border:0; font-size:22px; cursor:pointer; color:var(--ink-3);
}
.drawer-links{ list-style:none; margin:20px 0; padding:0; display:flex; flex-direction:column; gap:14px; }
.drawer-link{
  padding:12px 10px; border-radius:10px; font-weight:500; color:var(--ink-2);
  transition: background .2s ease, color .2s;
}
.drawer-link:hover{ background: rgba(24,88,119,.08); color: var(--ink-3); }
.drawer-cta{ margin-top:auto; text-align:center; }

/* Solo uno a la vez */
@media (max-width: 980px){
  .topbar .nav-links{ display:none; }
  .topbar .nav-cta{ display:none; }
  .topbar .menu-toggle{ display:block; }
}
/* En desktop, aseguramos que el drawer no quede visible si se redimensiona */
@media (min-width: 981px){
  .mobile-drawer{ right:-100% !important; }
  .drawer-overlay{ display:none !important; }
}

/* Separadores entre secciones */
section + section {
  border-top: 1px solid var(--muted-border);
}

/* HERO */
header.hero {
  /* degradado ajustado a la paleta */
  background: linear-gradient(135deg, #123e56, #185877);
  text-align: center;
  padding: 100px 20px;
  color: var(--white);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.5rem;
  color: rgba(255,255,255,.9);
}

.btn {
  margin-top: 20px;
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--accent);
  color: #fff;
  border-radius: 25px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* SECCIONES */
section {
  padding: 80px 0;
}

h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--ink-3);
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent);
  margin: 10px auto 0;
  border-radius: 2px;
}

h3.categoria-sintoma {
  font-size: 1.6rem;
  margin: 60px 0 20px;
  color: var(--ink-3);
  border-left: 6px solid var(--accent);
  padding-left: 15px;
}

.intro {
  max-width: 800px;
  margin: auto;
  text-align: center;
  font-size: 1.1rem;
  color: #4b5b67;
  margin-bottom: 50px;
}

/* SOBRE MI */
.sobre-mi {
  background-color: #f8fbfd;
  padding: 80px 0;
}

.sobre-mi-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  align-items: start;
}

.sobre-mi-texto p {
  font-size: 1.1rem;
  color: #2b3a44;
  margin-bottom: 20px;
}

.sobre-mi-datos {
  background-color: var(--white);
  border: 1px solid var(--muted-border);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.sobre-mi-datos h3 {
  font-size: 1.4rem;
  color: var(--ink-3);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 5px;
}

.sobre-mi-datos ul {
  list-style: none;
  padding: 0;
}

.sobre-mi-datos li {
  margin-bottom: 12px;
  font-size: 1.05rem;
  color: #3a4a55;
}

ul.enfermedades {
  list-style: none;
  padding-left: 0;
  margin-bottom: 30px;
}

ul.enfermedades li {
  margin: 5px 0;
  font-weight: 500;
  color: var(--ink-2);
}

/* GALERÍA - CROSS FADE (actualizado a 4 slides) */
.fade-carousel {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
}

.fade-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: fadeCross 16s ease-in-out infinite;
}

.fade-slide:nth-child(1) { animation-delay: 0s; }
.fade-slide:nth-child(2) { animation-delay: 4s; }
.fade-slide:nth-child(3) { animation-delay: 8s; }
.fade-slide:nth-child(4) { animation-delay: 12s; }

.fade-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

/* FOOTER */
footer {
  background-color: var(--primary);
  color: white;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
}

/* CONTACTO */
.contacto {
  background-color: var(--muted-bg);
  padding: 80px 0 0;
}

.contacto-simple {
  text-align: center;
  font-size: 1.1rem;
  color: var(--ink-2);
}

.contacto-simple h2 {
  font-size: 2.2rem;
  color: var(--ink-3);
  margin-bottom: 40px;
}

.linea-contacto {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.linea-contacto i {
  color: var(--accent);
}

.linea-contacto a {
  color: var(--accent);
  font-weight: bold;
  text-decoration: none;
}

.mapa-contacto {
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-top: 1px solid var(--muted-border);
  margin-top: 50px;
}

.mapa-contacto iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== Contacto redondeado: grid + CTAs claras ===== */
.contacto-grid{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 60px;
}
.contacto-col{ width: 100%; }

.contacto-intro{
  max-width: 56ch;
  margin: 0 auto 22px 0;
  font-size: 1.05rem;
  color: #2b3a44;
}

.contacto-cta{
  display: flex; flex-wrap: wrap; gap: 14px;
  margin: 10px 0 22px;
}
.contacto-cta .btn-cta{
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(24,88,119,.18);
}
.contacto-cta .btn-cta i{ font-size: 1.1rem; }

/* WhatsApp y Llamada con ligeras variantes visuales */
.btn-wa{
  background: #25D366; /* color oficial WA */
  box-shadow: 0 6px 16px rgba(37,211,102,.28);
}
.btn-wa:hover{ filter: brightness(0.95); }

.btn-call{
  background: var(--accent);
}
.btn-call:hover{ background: var(--primary); }

/* Lista de datos de contacto */
.contacto-list{
  list-style: none;
  padding: 0;
  margin: 12px 0 18px;
  display: grid;
  gap: 10px;
  color: var(--ink-2);
}
.contacto-list li{
  display: flex; align-items: center; gap: 10px;
  line-height: 1.5;
}
.contacto-list i{ color: var(--accent); }
.contacto-list a{
  color: var(--accent);
  font-weight: 600;
}

/* Horarios */
.contacto-horarios h3{
  font-size: 1.05rem;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.contacto-horarios p{ color: #4b5b67; }

/* Mapa con bordes suaves */
.mapa-contacto{
  width: 100%;
  height: 420px;
  overflow: hidden;
  border: 1px solid var(--muted-border);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.mapa-contacto iframe{
  width: 100%; height: 100%; border: 0;
}

/* Responsive: apilar en mobile */
@media (max-width: 980px){
  .contacto-grid{
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .contacto-cta{
    flex-direction: column;
    align-items: stretch;
  }
  .mapa-contacto{ height: 360px; }
}


/* ANIMACIONES */
.fade-in {
  animation: fadeIn 1s ease forwards;
  opacity: 0;
}

.fade-in-delay {
  animation: fadeIn 1.5s ease forwards;
  opacity: 0;
  animation-delay: 0.5s;
}

.animated-btn {
  animation: bounce 2s infinite;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Crossfade para 4 imágenes (16s) */
@keyframes fadeCross {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  25%  { opacity: 1; }
  33%  { opacity: 0; }
  100% { opacity: 0; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.4rem; }
  .subtitle { font-size: 1.2rem; }
  .btn { font-size: 1rem; padding: 10px 24px; }
  h2 { font-size: 2rem; }
  .fade-carousel { height: 250px; }
  .fade-slide img { height: 250px; }
}

/* ===========================
   LIMPIEZA: eliminamos estilos viejos de slide-menu
   (evita conflictos con el drawer moderno)
   =========================== */

/* Ya NO usamos .slide-menu ni .menu-toggle fija de pantalla.
   La .menu-toggle vive dentro del topbar y solo aparece <=980px.
   body.menu-open se mantiene para bloquear scroll al abrir el drawer. */
body.menu-open { overflow: hidden; }