@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Paleta Pastel Claro con Degradado Dinámico de 4 Tonos Pasteles */
  --bg-primary: #f4f9fd;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-glass: rgba(255, 255, 255, 0.90);
  --border-color: rgba(180, 205, 225, 0.55);
  --border-hover: rgba(13, 148, 136, 0.5);

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Colores de Acento y Confianza Clínica */
  --primary: #0d9488;       /* Teal Esmeralda */
  --primary-light: #0f766e;
  --primary-glow: rgba(13, 148, 136, 0.16);
  --accent: #0284c7;        /* Turquesa Ciel */
  --accent-glow: rgba(2, 132, 199, 0.15);
  --success: #10b981;
  --whatsapp: #25d366;
  --whatsapp-hover: #1ebd5b;

  /* Transiciones y Sombras Suaves Pastel */
  --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-sm: 0 4px 15px rgba(100, 120, 145, 0.07);
  --shadow-md: 0 12px 35px -10px rgba(100, 120, 145, 0.15);
  --shadow-glow: 0 0 35px var(--primary-glow);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
}

/* Reset y Configuración Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  /* Degradado pastel dinámico y suave de 4 tonos que transiciona continuamente */
  background: linear-gradient(-45deg, #eef9f6, #f4eefb, #fef6ee, #eef6fe);
  background-size: 400% 400%;
  animation: pastelGradientShift 18s ease-in-out infinite;
  background-attachment: fixed;
}

@keyframes pastelGradientShift {
  0% {
    background-position: 0% 50%;
  }
  33% {
    background-position: 100% 50%;
  }
  66% {
    background-position: 50% 100%;
  }
  100% {
    background-position: 0% 50%;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Encabezado y Navegación Glassmorphism */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-logo .logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-glow);
}

.brand-logo span {
  background: linear-gradient(to right, #0f172a, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary-light);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Botones Premium */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 9999px;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
  text-align: center;
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(13, 148, 136, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Hero Section Premium */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 9999px;
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.25rem;
  max-width: 600px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.stat-card h4 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.stat-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Cards & Glassmorphism Panels */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: var(--transition);
}

.card-glass:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.info-box-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.info-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(20, 184, 166, 0.15);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Sección de Contenido Médico / Scientific Protocol */
.section {
  padding: 5.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  color: var(--primary-light);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 2.5rem;
}

/* Protocol Timeline (Pasos Clínicos) */
.protocol-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step-item {
  display: flex;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.step-item:hover {
  background: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.step-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Preguntas Frecuentes (FAQ Accordion) */
.faq-container {
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.active {
  border-color: var(--primary-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 1.35rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--primary-light);
}

.faq-icon {
  font-size: 1.35rem;
  transition: transform 0.3s ease;
  color: var(--primary-light);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 1.75rem;
}

.faq-item.active .faq-answer {
  padding: 0 1.75rem 1.5rem;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* Legal Banner / Descargo de Responsabilidad */
.disclaimer-banner {
  background: linear-gradient(135deg, #fff2f2 0%, #fee2e2 100%);
  border-left: 4px solid #e11d48;
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.08);
}

.disclaimer-title {
  color: #fb7185;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

/* Red de Departamentos (Malla de Enlaces Locales) */
.departamentos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.departamento-tag {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(180, 205, 225, 0.65);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(100, 120, 145, 0.06);
}

.departamento-tag:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(13, 148, 136, 0.28);
}

/* WhatsApp Flotante Pulsante */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--whatsapp);
  color: #ffffff;
  padding: 0.85rem 1.35rem;
  border-radius: 9999px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
  transition: var(--transition);
}

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

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

.whatsapp-pulse {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 9999px;
  background: rgba(37, 211, 102, 0.5);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Footer Premium */
.site-footer {
  background: rgba(255, 255, 255, 0.65);
  border-top: 1px solid var(--border-color);
  padding: 4.5rem 0 2.5rem;
  margin-top: 5rem;
}

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

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Media Queries y Responsive Design (Mobile-First) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Menú simple u oculto para mobile, botón WA visible */
  }
  
  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 3.5rem 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .whatsapp-float span {
    display: none; /* En pantallas pequeñas solo mostrar icono del botón flotante */
  }
  
  .whatsapp-float {
    padding: 1rem;
    bottom: 1.25rem;
    right: 1.25rem;
  }
}
