/* ==========================================================================
   Dr. Enrique Rios - Cirujano Plástico
   Estilos principales y componentes personalizados (Inspirado en Clínica Ziegler)
   ========================================================================== */

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

:root {
  --primary: #009BDF;       /* Cyan Ziegler */
  --secondary: #005EAD;     /* Azul Médico */
  --dark: #00396A;          /* Azul Marino Profundo */
  --dark-hover: #00274a;
  --neutral-black: #111827;
  --neutral-gray: #64748b;
  --light-bg: #f8fafc;
  --border-color: #e2e8f0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--neutral-black);
  background-color: #ffffff;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Tipografía médica refinada */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
}

.font-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Transición suave para Header Sticky estilo Ziegler */
#site-header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#site-header.header-scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px -2px rgba(0, 57, 106, 0.08);
}

#site-header.header-scrolled .nav-link {
  color: var(--neutral-black);
}

#site-header.header-scrolled .header-separator {
  background-color: #e5e7eb;
}

#site-header.header-transparent .nav-link {
  color: #ffffff;
}

#site-header.header-transparent .nav-link:hover {
  color: var(--primary);
}

#site-header.header-transparent .header-separator {
  background-color: rgba(255, 255, 255, 0.2);
}

#site-header.header-transparent .cta-link {
  color: #ffffff;
}

#site-header.header-scrolled .cta-link {
  color: #374151;
}

/* Mega Menú estilo Ziegler */
.megamenu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  pointer-events: none;
}

.has-megamenu:hover .megamenu,
.megamenu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.megamenu-tab.is-active {
  color: var(--dark);
  font-weight: 700;
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  background-color: #f0f9ff;
}

/* Comparador interactivo Antes y Después */
.before-after-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  border-radius: 8px;
  box-shadow: 0 10px 30px -5px rgba(0, 57, 106, 0.12);
  background: #001f3b;
}

.before-after-container img {
  display: block;
  width: 100%;
  height: 640px;
  object-fit: cover;
  pointer-events: none;
}

@media (max-width: 768px) {
  .before-after-container img {
    height: 340px;
  }
}

.before-after-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  will-change: width;
}

.before-after-overlay img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  max-width: none !important;
  object-fit: cover;
}

.before-after-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background-color: #ffffff;
  cursor: ew-resize;
  transform: translateX(-50%);
  z-index: 20;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
}

.before-after-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  background-color: #ffffff;
  border: 3px solid var(--primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23005EAD' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23005EAD' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
  background-position: 4px center, 20px center;
  background-repeat: no-repeat;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.before-after-handle:hover::after,
.before-after-handle:active::after {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 155, 223, 0.4);
}

.before-after-label {
  position: absolute;
  bottom: 20px;
  padding: 6px 14px;
  background: rgba(0, 57, 106, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 3px;
  pointer-events: none;
  z-index: 10;
}

.before-after-label.before {
  left: 20px;
}

.before-after-label.after {
  right: 20px;
}

/* Lightbox Modal */
#gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0, 24, 48, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

/* Botón flotante de WhatsApp */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.floating-whatsapp .whatsapp-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  position: relative;
}

.floating-whatsapp .whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.55);
}

.floating-whatsapp .whatsapp-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: pulseWave 2s infinite;
  pointer-events: none;
}

@keyframes pulseWave {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.whatsapp-tooltip {
  background: #ffffff;
  color: #111827;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.floating-whatsapp:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Indicadores y animaciones de Hero Ziegler */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUpAnim 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUpAnim {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sombra suave personalizada */
.shadow-ziegler {
  box-shadow: 0 15px 35px -5px rgba(0, 57, 106, 0.08), 0 5px 15px -3px rgba(0, 57, 106, 0.04);
}

/* ==========================================================================
   Hero Slider Dinámico (Dr. Enrique Ríos)
   ========================================================================== */
.hero-slider-wrapper {
  position: relative;
  width: 100%;
  height: 90vh;
  min-height: 620px;
  background-color: #001733;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .hero-slider-wrapper {
    height: 94vh;
    min-height: 700px;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s ease;
  pointer-events: none;
  z-index: 1;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 10;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.06);
  transition: transform 7s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (min-width: 768px) {
  .hero-slide-bg {
    object-position: right 15% top;
  }
}

.hero-slide.is-active .hero-slide-bg {
  transform: scale(1);
}

.hero-slide-content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slide.is-active .hero-slide-content {
  opacity: 1;
  transform: translateY(0);
}

/* Indicadores de paginación del slider (Dots estilo Ziegler) */
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.hero-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.hero-dot.is-active {
  width: 38px;
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(0, 155, 223, 0.6);
}

/* Flechas de navegación del slider */
.hero-nav-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: rgba(0, 31, 59, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  cursor: pointer;
}

.hero-nav-btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 155, 223, 0.4);
}

/* ==========================================================================
   Sección de Perfil en 2 Columnas (Dr. Enrique Ríos)
   ========================================================================== */
.profile-doctor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: rgba(0, 155, 223, 0.08);
  border: 1px solid rgba(0, 155, 223, 0.25);
  color: var(--secondary);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doctor-photo-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 39, 74, 0.25);
  border: 5px solid #ffffff;
  background-color: #f1f5f9;
}

.doctor-photo-card img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.doctor-photo-card:hover img {
  transform: scale(1.03);
}

.doctor-experience-tag {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 25px -5px rgba(0, 57, 106, 0.15);
}

/* ==========================================================================
   Carrusel de Eventos y Trayectoria (perfil-cirujano.html)
   ========================================================================== */
.events-slider-container {
  position: relative;
  width: 100%;
}

.events-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.45s ease-in-out;
}

.events-slide.is-active {
  display: block;
  opacity: 1;
  animation: fadeInEvent 0.45s ease forwards;
}

@keyframes fadeInEvent {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.events-nav-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #00396A;
  box-shadow: 0 6px 18px rgba(0, 57, 106, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  cursor: pointer;
  z-index: 20;
}

.events-nav-btn:hover {
  background-color: #009BDF;
  border-color: #009BDF;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 155, 223, 0.35);
}

.events-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #cbd5e1;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  border: none;
  padding: 0;
}

.events-dot:hover {
  background-color: #94a3b8;
  transform: scale(1.25);
}

.events-dot.is-active {
  width: 28px;
  background-color: #009BDF;
}


