/* ==========================================================================
   ESTILOS GENERALES Y COMPONENTES - AGENCIA DE ENFERMERÍA Y AMBULANCIAS
   ========================================================================== */

:root {
  --color-primary: #0b2545;
  --color-primary-dark: #040a14;
  --color-secondary: #0077b6;
  --color-accent-red: #d90429;
  --color-accent-red-hover: #b8001f;
  --color-accent-yellow: #ffb703;
  --color-accent-green: #25d366;
  --glass-bg: rgba(7, 21, 39, 0.82);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 12px 36px 0 rgba(0, 0, 0, 0.5);
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #f1f5f9;
}

body {
  background-color: #040913;
  color: #f1f5f9;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* ==========================================================================
   FONDOS ESTÁTICOS / PARALLAX Y VISIBILIDAD ÓPTIMA DE IMÁGENES
   ========================================================================== */

.section-with-bg {
  position: relative;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
}

/* En pantallas móviles y tablets, mantener la proporción sin sobredimensionar */
@media (max-width: 768px) {
  .section-with-bg {
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center center !important;
  }
}

/* Fondos de sección 100% Reales y Nítidos (Sin filtros ni velos oscuros) */
.section-with-bg::before {
  display: none !important;
}

.section-with-bg > * {
  position: relative;
  z-index: 2;
}

/* Enlaces directos a los fondos exportados en assets/images/backgrounds/ */
#servicios.section-with-bg {
  background-image: url('../images/backgrounds/bg-servicios.jpg');
}

#cotizador.section-with-bg {
  background-image: url('../images/backgrounds/bg-cotizador.jpg');
}

/* Textos de alta legibilidad en Cotizador (Fondo claro de pastillas) */
#cotizador h2 {
  color: #0b2545 !important;
  text-shadow: none !important;
}

#cotizador .reveal-on-scroll > p {
  color: #1e293b !important;
  font-weight: 600 !important;
  text-shadow: none !important;
}

#cotizador .reveal-on-scroll > span {
  background-color: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

#unidades.section-with-bg {
  background-image: url('../images/backgrounds/bg-unidades.jpg');
}

#cobertura.section-with-bg {
  background-image: url('../images/backgrounds/bg-cobertura.jpg');
}

#nosotros.section-with-bg {
  background-image: url('../images/backgrounds/bg-nosotros.jpg');
}

#faq.section-with-bg {
  background-image: url('../images/backgrounds/bg-faq.jpg');
}

#cta-final.section-with-bg {
  background-image: url('../images/backgrounds/bg-cta.jpg');
}

#footer-section.section-with-bg {
  background-image: url('../images/backgrounds/bg-footer.jpg');
}

/* ==========================================================================
   GLASSMORPHISM Y TARJETAS LIGERAS
   ========================================================================== */

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
}

.glass-card-dark {
  background: rgba(11, 25, 44, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  border-radius: 20px;
}

/* Video Background Layer */
.video-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.video-bg-container video {
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

@media (max-width: 768px) {
  .video-bg-container video {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center 35% !important;
  }
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 9, 19, 0.6) 0%, rgba(7, 21, 39, 0.65) 55%, #040913 100%);
  z-index: 1;
}

/* ==========================================================================
   BOTÓN FLOTANTE SOS (POSICIONADO ABAJO A LA DERECHA)
   ========================================================================= */

.sos-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #d90429 0%, #ef233c 100%);
  color: #ffffff;
  font-weight: 800;
  border-radius: 50px;
  box-shadow: 0 12px 35px rgba(217, 4, 41, 0.6);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.sos-floating-btn:hover {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 16px 40px rgba(217, 4, 41, 0.8);
}

/* Glow effects */
.glow-border-blue {
  position: relative;
}
.glow-border-blue::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg, #0077b6, #00b4d8, #03045e);
  z-index: -1;
  filter: blur(8px);
  opacity: 0.6;
}

/* Service Card Hover */
.service-card {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 180, 216, 0.6);
  box-shadow: 0 24px 50px -10px rgba(0, 119, 182, 0.45);
}

/* Custom Tabs */
.triage-tab {
  transition: all 0.25s ease;
  cursor: pointer;
}

.triage-tab.active {
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #ffffff;
  border-color: #00b4d8;
  box-shadow: 0 6px 20px rgba(0, 119, 182, 0.45);
}

/* Switcher flotante de propuestas (Modo Oscuro) */
.theme-switch-badge {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff !important;
  color: #0b2545 !important;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
}

.theme-switch-badge:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  background: #f8fafc !important;
  color: #0077b6 !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #040913;
}
::-webkit-scrollbar-thumb {
  background: #1e3a5f;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0077b6;
}

/* ==========================================================================
   Crédito Desarrollador en Footer
   ========================================================================== */
#developer-credit a {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 700;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

#developer-credit a:hover,
#developer-credit a:focus,
#developer-credit a:active {
  color: #38bdf8 !important;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}
