/* ============================================================
   SANAR - TRATAMIENTO INTEGRAL DE PIE DIABÉTICO - Modern Design System (v4.0)
   High-Conversion Medical Landing Page & Admin UI
   ============================================================ */

:root {
  --color-primary: #0b335e;
  --color-primary-hover: #072240;
  --color-teal: #0d9488;
  --color-teal-hover: #0f766e;
  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #1da851;
  --color-dark: #07172c;
  --color-dark-card: #0c2340;
  --color-muted: #64748b;
  --color-light: #f8fafc;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  color: #0f172a;
  background-color: #ffffff;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Navigation */
.glass-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Subtle background mesh */
.bg-mesh-subtle {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 15% 15%, rgba(11, 51, 94, 0.05) 0px, transparent 55%),
    radial-gradient(at 85% 15%, rgba(13, 148, 136, 0.07) 0px, transparent 55%),
    radial-gradient(at 50% 85%, rgba(11, 51, 94, 0.04) 0px, transparent 55%);
}

/* Floating Instagram Card Animation */
@keyframes float-gentle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float-card {
  animation: float-gentle 5s ease-in-out infinite;
}

@keyframes badge-float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-4px);
  }
}

.animate-badge-float {
  animation: badge-float 4s ease-in-out infinite 0.5s;
}

/* Instagram Story Gradient Ring */
.ig-story-ring {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  padding: 3px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ig-gradient-btn {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
  transition: all 0.3s ease;
}

.ig-gradient-btn:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(220, 39, 67, 0.40);
}

/* Infinite Marquee Ticker */
@keyframes marqueeScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.animate-marquee-track,
.animate-marquee {
  display: flex !important;
  width: max-content !important;
  animation: marqueeScroll 35s linear infinite !important;
  will-change: transform;
}

.animate-marquee-track:hover,
.animate-marquee:hover {
  animation-play-state: paused !important;
}

/* Shadows */
.shadow-soft {
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
}

.shadow-card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shadow-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -5px rgba(11, 51, 94, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #25d366 !important;
  color: #ffffff !important;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.50) !important;
  z-index: 9999 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-2px);
  background-color: #1da851 !important;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.65) !important;
}

.whatsapp-float svg {
  fill: #ffffff !important;
  color: #ffffff !important;
  width: 34px !important;
  height: 34px !important;
}

.whatsapp-pulse {
  animation: pulse-ring 2.2s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Star Rating */
.star-rating {
  color: #f59e0b;
  display: inline-flex;
  gap: 2px;
  font-size: 1rem;
}

/* Modal Overlay & Popups */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(15, 23, 42, 0.80) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.hidden,
div.modal-overlay.hidden,
.modal-overlay[style*="display: none"] {
  display: none !important;
}

.modal-content {
  background-color: #ffffff;
  color: #0f172a;
  border-radius: 1.25rem;
  width: 100%;
  max-width: 34rem;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  border: 1px solid #e2e8f0;
}

/* Form Controls */
.modal-content input,
.modal-content textarea,
.modal-content select,
.admin-tab-panel input,
.admin-tab-panel textarea,
.admin-tab-panel select {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 500 !important;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus,
.admin-tab-panel input:focus,
.admin-tab-panel textarea:focus,
.admin-tab-panel select:focus {
  border-color: #0d9488 !important;
  outline: 2px solid rgba(13, 148, 136, 0.2) !important;
}

/* Audio Toggle for YouTube */
.audio-toggle {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(11, 51, 94, 0.85);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 40;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.audio-toggle:hover {
  transform: translateY(-1px) scale(1.03);
  background: rgba(11, 51, 94, 0.95);
  border-color: rgba(255, 255, 255, 0.6);
}

.audio-toggle.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-8px) !important;
}

.audio-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  position: relative;
}

.audio-mute-line {
  position: absolute;
  width: 20px;
  height: 2.5px;
  background: #ff4b4b;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(35deg);
  border-radius: 999px;
  box-shadow: 0 0 6px rgba(255, 75, 75, 0.8);
  animation: mutePulse 1.2s ease-in-out infinite;
}

.audio-wave {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  animation: audioPulse 1.2s ease-in-out infinite;
}

.audio-wave.delay {
  animation-delay: 0.4s;
}

@keyframes mutePulse {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(35deg) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) rotate(35deg) scale(1.18);
  }
}

@keyframes audioPulse {
  0%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Toast Container */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #ffffff;
  color: #0f172a;
  padding: 12px 20px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  border-left: 5px solid #0d9488;
  animation: slideInToast 0.3s ease;
}

.toast.toast-success {
  border-left-color: #10b981;
}

.toast.toast-error {
  border-left-color: #ef4444;
}

@keyframes slideInToast {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
