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

:root {
  --primary-color: #26569e;
  --primary-dark: #1b437f;
  --secondary-color: #1abc9c;
  --secondary-dark: #16a085;
  --accent-color: #bdd368;
  --accent-dark: #9eb83f;
  --dark-text: #2c3e50;
  --light-bg: #f8fbfd;
  --card-border: #e9ecef;
  --emergency-red: #e74c3c;
  --font-base: 14px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #333;
  background-color: #fff;
  line-height: 1.6;
  font-size: var(--font-base);
  padding-bottom: 70px; /* Espacio para barra móvil inferior */
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

/* MODO ACCESIBILIDAD: FUENTE GRANDE */
body.large-font {
  --font-base: 17px;
}
body.large-font .nav-link,
body.large-font p,
body.large-font li,
body.large-font button,
body.large-font input,
body.large-font select {
  font-size: 1.15em !important;
}

/* ==========================================
   MODO OSCURO (DARK MODE UX HEALTHCARE)
   ========================================== */
html.dark-mode,
body.dark-mode,
body.high-contrast {
  background-color: #0b1320 !important;
  color: #cbd5e1 !important;
}

/* Transición suave para cambio de modo */
body,
.navbar-sanatorio,
.top-bar,
.footer-sanatorio,
.card,
.quick-card,
.service-box,
.doctor-card,
.specialty-card,
.feature-box,
.mobile-bottom-nav,
.form-control,
.form-select {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Barra superior */
body.dark-mode .top-bar,
body.high-contrast .top-bar {
  background: #060b14 !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body.dark-mode .top-bar a,
body.high-contrast .top-bar a {
  color: #cbd5e1 !important;
}
body.dark-mode .top-bar a:hover,
body.high-contrast .top-bar a:hover {
  color: #38bdf8 !important;
}

/* Navbar principal */
body.dark-mode .navbar-sanatorio,
body.high-contrast .navbar-sanatorio {
  background: #101c30 !important;
  border-bottom: 1px solid #1e2e4a !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
}
body.dark-mode .navbar-brand img,
body.high-contrast .navbar-brand img {
  filter: brightness(0) invert(1);
}
body.dark-mode .nav-link,
body.high-contrast .nav-link {
  color: #e2e8f0 !important;
}
body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active,
body.high-contrast .nav-link:hover,
body.high-contrast .nav-link.active {
  color: #38bdf8 !important;
  background-color: rgba(56, 189, 248, 0.12) !important;
}
body.dark-mode .navbar-toggler,
body.high-contrast .navbar-toggler {
  border-color: #334563;
}
body.dark-mode .navbar-toggler-icon,
body.high-contrast .navbar-toggler-icon {
  filter: invert(1);
}

/* Fondos y contenedores */
body.dark-mode .bg-light,
body.high-contrast .bg-light,
body.dark-mode .bg-white,
body.high-contrast .bg-white {
  background-color: #101c30 !important;
}

/* Tarjetas y componentes */
body.dark-mode .card,
body.high-contrast .card,
body.dark-mode .quick-card,
body.high-contrast .quick-card,
body.dark-mode .service-box,
body.high-contrast .service-box,
body.dark-mode .doctor-card,
body.high-contrast .doctor-card,
body.dark-mode .specialty-card,
body.high-contrast .specialty-card,
body.dark-mode .feature-box,
body.high-contrast .feature-box,
body.dark-mode .insurance-badge,
body.high-contrast .insurance-badge,
body.dark-mode .list-group-item,
body.high-contrast .list-group-item {
  background: #142239 !important;
  color: #e2e8f0 !important;
  border-color: #1e3353 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .card-header,
body.high-contrast .card-header,
body.dark-mode .card-footer,
body.high-contrast .card-footer {
  background: #0f192b !important;
  border-color: #1e3353 !important;
  color: #e2e8f0 !important;
}

/* Tipografía en modo oscuro */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .section-title,
body.dark-mode .service-box-title,
body.dark-mode .doctor-name,
body.dark-mode .specialty-name,
body.dark-mode strong,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6,
body.high-contrast .section-title,
body.high-contrast .service-box-title,
body.high-contrast .doctor-name,
body.high-contrast .specialty-name,
body.high-contrast strong {
  color: #f8fafc !important;
}

body.dark-mode p,
body.dark-mode span:not(.badge):not(.service-badge):not(.doctor-badge):not(.search-chip):not(.emergency-badge),
body.dark-mode li,
body.dark-mode label,
body.dark-mode .text-dark,
body.dark-mode .article-body,
body.high-contrast p,
body.high-contrast span:not(.badge):not(.service-badge):not(.doctor-badge):not(.search-chip):not(.emergency-badge),
body.high-contrast li,
body.high-contrast label,
body.high-contrast .text-dark,
body.high-contrast .article-body {
  color: #cbd5e1 !important;
}

body.dark-mode .text-secondary,
body.dark-mode .text-muted,
body.dark-mode .quick-card p,
body.dark-mode .service-box-text,
body.dark-mode .doctor-details-list,
body.high-contrast .text-secondary,
body.high-contrast .text-muted,
body.high-contrast .quick-card p,
body.high-contrast .service-box-text,
body.high-contrast .doctor-details-list {
  color: #94a3b8 !important;
}

body.dark-mode .text-primary,
body.high-contrast .text-primary {
  color: #38bdf8 !important;
}

body.dark-mode .section-subtitle,
body.high-contrast .section-subtitle {
  color: #2dd4bf !important;
}

/* Hero buscador */
body.dark-mode .hero-search-box,
body.high-contrast .hero-search-box {
  background: #142239 !important;
  border: 1px solid #1e3353 !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
}
body.dark-mode .hero-search-input,
body.high-contrast .hero-search-input {
  background: transparent !important;
  color: #f8fafc !important;
}
body.dark-mode .hero-search-input::placeholder,
body.high-contrast .hero-search-input::placeholder {
  color: #64748b !important;
}

/* Formularios y campos de búsqueda */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.high-contrast .form-control,
body.high-contrast .form-select {
  background-color: #101c30 !important;
  border-color: #1e3353 !important;
  color: #f8fafc !important;
}
body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus,
body.high-contrast .form-control:focus,
body.high-contrast .form-select:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.25) !important;
}
body.dark-mode .form-control::placeholder,
body.high-contrast .form-control::placeholder {
  color: #64748b !important;
}
body.dark-mode .input-group-text,
body.high-contrast .input-group-text {
  background-color: #1a2a44 !important;
  border-color: #1e3353 !important;
  color: #e2e8f0 !important;
}

/* Acordeón */
body.dark-mode .accordion-sanatorio .accordion-item,
body.high-contrast .accordion-sanatorio .accordion-item {
  border-color: #1e3353 !important;
  background-color: #142239 !important;
}
body.dark-mode .accordion-sanatorio .accordion-button,
body.high-contrast .accordion-sanatorio .accordion-button {
  background: #142239 !important;
  color: #f8fafc !important;
}
body.dark-mode .accordion-sanatorio .accordion-button:not(.collapsed),
body.high-contrast .accordion-sanatorio .accordion-button:not(.collapsed) {
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
}
body.dark-mode .accordion-sanatorio .accordion-button::after,
body.high-contrast .accordion-sanatorio .accordion-button::after {
  filter: invert(1);
}
body.dark-mode .accordion-sanatorio .accordion-body,
body.high-contrast .accordion-sanatorio .accordion-body {
  background: #142239 !important;
  color: #cbd5e1 !important;
}

/* Modales */
body.dark-mode .modal-content,
body.high-contrast .modal-content {
  background-color: #142239 !important;
  border: 1px solid #1e3353 !important;
  color: #e2e8f0 !important;
}
body.dark-mode .modal-header,
body.high-contrast .modal-header {
  border-color: #1e3353 !important;
}
body.dark-mode .modal-footer,
body.high-contrast .modal-footer {
  background-color: #101c30 !important;
  border-color: #1e3353 !important;
}
body.dark-mode .modal-body .btn-outline-primary,
body.dark-mode .modal-body .btn-outline-secondary,
body.dark-mode .modal-body .btn-outline-success,
body.high-contrast .modal-body .btn-outline-primary,
body.high-contrast .modal-body .btn-outline-secondary,
body.high-contrast .modal-body .btn-outline-success {
  border-color: #1e3353 !important;
  background-color: #101c30 !important;
  color: #f8fafc !important;
}
body.dark-mode .modal-body .btn-outline-primary:hover,
body.dark-mode .modal-body .btn-outline-secondary:hover,
body.dark-mode .modal-body .btn-outline-success:hover,
body.high-contrast .modal-body .btn-outline-primary:hover,
body.high-contrast .modal-body .btn-outline-secondary:hover,
body.high-contrast .modal-body .btn-outline-success:hover {
  background-color: #1a2a44 !important;
  border-color: #38bdf8 !important;
}
body.dark-mode .modal-body strong,
body.high-contrast .modal-body strong {
  color: #f8fafc !important;
}

/* Tablas */
body.dark-mode .table,
body.high-contrast .table {
  color: #cbd5e1 !important;
  border-color: #1e3353 !important;
}
body.dark-mode .table th,
body.dark-mode .table td,
body.high-contrast .table th,
body.high-contrast .table td {
  background-color: transparent !important;
  border-color: #1e3353 !important;
  color: #e2e8f0 !important;
}
body.dark-mode .table-striped>tbody>tr:nth-of-type(odd)>*,
body.high-contrast .table-striped>tbody>tr:nth-of-type(odd)>* {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Alertas */
body.dark-mode .alert-info,
body.high-contrast .alert-info {
  background-color: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  color: #bae6fd !important;
}
body.dark-mode .alert-warning,
body.high-contrast .alert-warning {
  background-color: rgba(234, 179, 8, 0.12) !important;
  border-color: rgba(234, 179, 8, 0.3) !important;
  color: #fef08a !important;
}
body.dark-mode .alert-success,
body.high-contrast .alert-success {
  background-color: rgba(34, 197, 94, 0.12) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
  color: #bbf7d0 !important;
}
body.dark-mode .alert-danger,
body.high-contrast .alert-danger {
  background-color: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fecaca !important;
}

/* Botones outline */
body.dark-mode .btn-outline-primary,
body.high-contrast .btn-outline-primary {
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}
body.dark-mode .btn-outline-primary:hover,
body.high-contrast .btn-outline-primary:hover {
  background-color: #38bdf8 !important;
  color: #0b1320 !important;
}
body.dark-mode .btn-outline-secondary,
body.high-contrast .btn-outline-secondary {
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}
body.dark-mode .btn-outline-secondary:hover,
body.high-contrast .btn-outline-secondary:hover {
  background-color: #334155 !important;
  color: #fff !important;
}

/* Badges e iconos */
body.dark-mode .quick-card-icon,
body.dark-mode .feature-box-icon,
body.high-contrast .quick-card-icon,
body.high-contrast .feature-box-icon {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
}
body.dark-mode .doctor-badge,
body.high-contrast .doctor-badge {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
}
body.dark-mode .doctor-avatar-wrap,
body.high-contrast .doctor-avatar-wrap {
  border-color: #1e3353 !important;
  background: #101c30 !important;
}
body.dark-mode .service-badge,
body.high-contrast .service-badge {
  background: rgba(45, 212, 191, 0.15) !important;
  color: #2dd4bf !important;
}

/* Footer y Barra Móvil */
body.dark-mode .footer-sanatorio,
body.high-contrast .footer-sanatorio {
  background: #060b14 !important;
  border-top: 1px solid #1e2e4a !important;
}
body.dark-mode .mobile-bottom-nav,
body.high-contrast .mobile-bottom-nav {
  background: #101c30 !important;
  border-top: 1px solid #1e3353 !important;
}
body.dark-mode .mobile-nav-item,
body.high-contrast .mobile-nav-item {
  color: #94a3b8 !important;
}
body.dark-mode .mobile-nav-item.active,
body.dark-mode .mobile-nav-item:hover,
body.high-contrast .mobile-nav-item.active,
body.high-contrast .mobile-nav-item:hover {
  color: #38bdf8 !important;
}

/* Notificación UX Toast */
body.dark-mode .ux-toast,
body.high-contrast .ux-toast {
  background: #142239 !important;
  border: 1px solid #1e3353 !important;
  color: #f8fafc !important;
}

/* BARRA DE ACCESIBILIDAD */
.a11y-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-a11y {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-a11y:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

/* TOP INFO BAR */
.top-bar {
  background: #112d59;
  color: #e2e8f0;
  font-size: 0.82rem;
  padding: 8px 0;
}
.top-bar a {
  color: #cbd5e1;
}
.top-bar a:hover {
  color: #fff;
}
.top-bar .emergency-badge {
  background: transparent;
  color: #fff;
  padding: 0;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.top-bar .emergency-badge strong {
  font-weight: 700;
  color: #fff;
}
.top-bar .emergency-badge:hover {
  color: #38bdf8;
}

/* NAVBAR */
.navbar-sanatorio {
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar-brand img {
  height: 52px;
  max-width: 220px;
  object-fit: contain;
}
.nav-link {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--dark-text) !important;
  padding: 8px 14px !important;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary-color) !important;
  background-color: rgba(38, 86, 158, 0.08);
}
.btn-nav-turno {
  background-color: var(--primary-color);
  color: #fff !important;
  font-weight: 700;
  padding: 8px 18px !important;
  border-radius: 25px;
  box-shadow: 0 4px 10px rgba(38, 86, 158, 0.25);
}
.btn-nav-turno:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* HERO SLIDER & BUSCADOR ASISTIDO MODERNO (AURORA MESH & CURVED DIVIDER) */
.hero-section {
  position: relative;
  background: radial-gradient(130% 120% at 50% 0%, #163d76 0%, #0d2754 48%, #06152d 100%);
  color: #fff;
  padding: 70px 0 115px 0;
  overflow: hidden;
}

/* Efectos ambientales de fondo (Aurora Mesh + Dot Matrix) */
.hero-bg-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.hero-tech-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 25%, transparent 80%);
}
.hero-aurora-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.aurora-blob-1 {
  top: -12%;
  right: -6%;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.32) 0%, rgba(37, 99, 235, 0.08) 50%, transparent 70%);
  filter: blur(60px);
  animation: auroraFloat1 11s ease-in-out infinite alternate;
}
.aurora-blob-2 {
  bottom: 8%;
  left: -8%;
  width: 490px;
  height: 490px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.25) 0%, rgba(14, 165, 233, 0.06) 50%, transparent 70%);
  filter: blur(60px);
  animation: auroraFloat2 13s ease-in-out infinite alternate;
}
.aurora-blob-3 {
  top: 25%;
  left: 32%;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.18) 0%, transparent 65%);
  filter: blur(70px);
  animation: auroraFloat3 15s ease-in-out infinite alternate;
}
@keyframes auroraFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-35px, 25px) scale(1.08); }
}
@keyframes auroraFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.1); }
}
@keyframes auroraFloat3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-25px, -15px) scale(0.95); }
}

/* Divisor Curvo Orgánico Inferior */
.hero-curve-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 3;
  pointer-events: none;
}
.hero-curve-divider svg {
  display: block;
  width: 100%;
  height: 45px;
}
@media (min-width: 992px) {
  .hero-curve-divider svg {
    height: 75px;
  }
}
.hero-curve-divider path {
  fill: #ffffff;
  transition: fill 0.3s ease;
}

.hero-content {
  position: relative;
  z-index: 2;
}
.hero-content h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.5px;
}
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
}
.hero-content p {
  font-size: 1.1rem;
  opacity: 0.92;
  line-height: 1.6;
}
.hero-search-box {
  background: #ffffff;
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.5);
  position: relative;
  transition: box-shadow 0.3s ease;
}
.hero-search-box:focus-within {
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(56, 189, 248, 0.6);
}
.hero-search-input {
  border: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 12px;
  color: #2c3e50;
  width: 100%;
}
.hero-search-input:focus {
  outline: none;
}
.hero-search-btn {
  background: var(--secondary-color);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.hero-search-btn:hover {
  background: var(--secondary-dark);
}
.search-chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 3px;
  transition: all 0.2s;
  cursor: pointer;
}
.search-chip:hover {
  background: #fff;
  color: var(--primary-color);
}

/* ENLACES DE REFERENCIA HERO */
.hero-reference-links {
  font-size: 0.88rem;
}
.hero-reference-links a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  transition: all 0.2s ease;
}
.hero-reference-links a:hover {
  color: #38bdf8;
  text-decoration-thickness: 2px;
}
.hero-ref-group {
  display: inline-flex;
  align-items: center;
}
@media (max-width: 575.98px) {
  .hero-ref-group {
    flex-wrap: wrap;
    gap: 0.5rem !important;
  }
}

/* HERO SHOWCASE MODERNO (CARD 3D & FLOATING BADGES) */
.hero-showcase {
  position: relative;
  z-index: 2;
  padding: 18px 12px;
}
.hero-photo-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.2);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  background: #0f172a;
  cursor: pointer;
}
.hero-photo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 65px -12px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(56, 189, 248, 0.5);
}
.hero-main-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-photo-card:hover .hero-main-img {
  transform: scale(1.04);
}

/* Floating Badges */
.hero-float-badge {
  position: absolute;
  z-index: 4;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 10px 18px;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  transition: all 0.3s ease;
}
.hero-float-badge:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.25);
}
.float-badge-top {
  top: -14px;
  right: -14px;
}
.float-badge-bottom {
  bottom: -18px;
  left: -14px;
}
.float-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.float-badge-icon.badge-icon-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}
.float-badge-icon.badge-icon-blue {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}
.float-badge-text {
  display: flex;
  flex-direction: column;
}
.badge-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.badge-sub {
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748b;
}

/* Animaciones flotantes suaves */
@keyframes floatAnim {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
  100% { transform: translateY(0px); }
}
.animate-float {
  animation: floatAnim 4.5s ease-in-out infinite;
}
.animate-float-delayed {
  animation: floatAnim 5.2s ease-in-out infinite 2s;
}

@media (max-width: 991px) {
  .hero-showcase {
    padding: 10px 0;
    margin-top: 20px;
  }
  .hero-main-img {
    height: 280px;
  }
  .hero-float-badge {
    position: static;
    min-width: unset;
    width: 100%;
    margin-top: 12px;
  }
}

/* Modo oscuro para hero y floating badges */
body.dark-mode .hero-section,
body.high-contrast .hero-section {
  background: radial-gradient(130% 120% at 50% 0%, #0c1a2e 0%, #060f1c 50%, #02070f 100%) !important;
}
body.dark-mode .hero-curve-divider path,
body.high-contrast .hero-curve-divider path {
  fill: #0b1320 !important;
}
body.dark-mode .hero-float-badge,
body.high-contrast .hero-float-badge {
  background: rgba(20, 34, 57, 0.95) !important;
  border-color: #22344f !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55) !important;
}
body.dark-mode .hero-float-badge .badge-title,
body.high-contrast .hero-float-badge .badge-title {
  color: #f8fafc !important;
}
body.dark-mode .hero-float-badge .badge-sub,
body.high-contrast .hero-float-badge .badge-sub {
  color: #94a3b8 !important;
}
body.dark-mode .float-badge-icon.badge-icon-blue,
body.high-contrast .float-badge-icon.badge-icon-blue {
  background: rgba(56, 189, 248, 0.18) !important;
  color: #38bdf8 !important;
}

/* QUICK ACCESS CARDS */
.quick-access-section {
  margin-top: -45px;
  position: relative;
  z-index: 10;
}
.quick-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.quick-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 35px rgba(38, 86, 158, 0.16);
  border-color: var(--secondary-color);
}
.quick-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(38, 86, 158, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.quick-card.accent-card .quick-card-icon {
  background: rgba(26, 188, 156, 0.15);
  color: var(--secondary-dark);
}
.quick-card h5 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 8px;
}
.quick-card p {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 15px;
  flex-grow: 1;
}

/* SECTION TITLES */
.section-header {
  text-align: center;
  margin-bottom: 45px;
}
.section-subtitle {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--secondary-color);
  margin-bottom: 6px;
}
.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
}

/* SERVICES GRID */
.service-box {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #edf2f7;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.service-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}
.service-box-img {
  height: 200px;
  width: 100%;
  object-fit: cover;
  background-color: #e2e8f0;
}
.service-box-body {
  padding: 22px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.service-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(26, 188, 156, 0.12);
  color: var(--secondary-dark);
  align-self: flex-start;
  margin-bottom: 10px;
}
.service-box-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
}
.service-box-text {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

/* SPECIALTIES GRID */
.specialty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.specialty-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 24px 16px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.specialty-card:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff !important;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(38, 86, 158, 0.2);
  border-color: transparent;
}
.specialty-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 12px;
  transition: color 0.3s;
}
.specialty-card:hover .specialty-icon {
  color: #fff;
}
.specialty-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.specialty-hover-text {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  margin-top: 8px;
}
.specialty-card:hover .specialty-hover-text {
  opacity: 1;
  transform: translateY(0);
}

/* DOCTOR CARDS */
.doctor-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 22px;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-color);
}
.doctor-avatar-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 15px auto;
  border: 3px solid #e2e8f0;
  background: #f1f5f9;
}
.doctor-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.doctor-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 6px;
}
.doctor-specialties {
  text-align: center;
  margin-bottom: 12px;
}
.doctor-badge {
  display: inline-block;
  background: rgba(38, 86, 158, 0.08);
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin: 2px;
}
.doctor-details-list {
  font-size: 0.82rem;
  color: #475569;
  margin-top: 10px;
  padding: 0;
  list-style: none;
  flex-grow: 1;
}
.doctor-details-list li {
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.doctor-details-list i {
  color: var(--secondary-color);
  margin-top: 3px;
  width: 14px;
}

/* WHY CHOOSE US */
.feature-box {
  background: #fff;
  border-radius: 14px;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  border-bottom: 4px solid var(--primary-color);
  height: 100%;
}
.feature-box-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(38, 86, 158, 0.08);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 20px;
}
.feature-box h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* OBRAS SOCIALES BADGES */
.insurance-badge {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  text-align: center;
  font-weight: 700;
  color: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  display: block;
}
.insurance-badge:hover {
  border-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(26, 188, 156, 0.15);
}

/* FAQ ACCORDION */
.accordion-sanatorio .accordion-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px !important;
  margin-bottom: 12px;
  overflow: hidden;
}
.accordion-sanatorio .accordion-button {
  font-weight: 700;
  color: var(--primary-dark);
  padding: 18px 22px;
  background: #ffffff;
}
.accordion-sanatorio .accordion-button:not(.collapsed) {
  background: rgba(38, 86, 158, 0.05);
  color: var(--primary-color);
  box-shadow: none;
}
.accordion-sanatorio .accordion-body {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.7;
}

/* MOBILE BOTTOM NAVIGATION BAR (ERGONOMIC UX) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-around;
  padding: 8px 4px;
  z-index: 1040;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
}
@media (min-width: 992px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 8px;
  min-width: 60px;
}
.mobile-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 3px;
}
.mobile-nav-item.active, .mobile-nav-item:hover {
  color: var(--primary-color);
}
.mobile-nav-item.emergency-btn {
  color: var(--emergency-red);
}

/* FLOATING WHATSAPP BUTTON */
.btn-floating-whatsapp {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background-color: #25d366;
  color: #ffffff !important;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1035;
  transition: all 0.3s ease;
}
@media (min-width: 992px) {
  .btn-floating-whatsapp {
    bottom: 24px;
    right: 24px;
  }
}
.btn-floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* FOOTER */
.footer-sanatorio {
  background: #0f172a;
  color: #cbd5e1;
  padding-top: 60px;
  padding-bottom: 30px;
  font-size: 0.9rem;
}
.footer-logo {
  max-height: 50px;
  margin-bottom: 18px;
  filter: brightness(0) invert(1);
}
.footer-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
}
.footer-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--secondary-color);
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: #94a3b8;
}
.footer-links a:hover {
  color: #fff;
  padding-left: 5px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  margin-right: 8px;
  transition: all 0.2s ease;
}
.footer-social a:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: #64748b;
}

/* TOAST COPIED ALERT */
.ux-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 2000;
  font-weight: 600;
  display: none;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ESTILOS DE IMPRESIÓN (PRINT UX) */
@media print {
  .top-bar,
  .navbar-sanatorio,
  .footer-sanatorio,
  .btn-floating-whatsapp,
  .mobile-bottom-nav,
  .btn-print,
  .no-print {
    display: none !important;
  }
  body {
    padding: 0;
    color: #000;
    background: #fff;
  }
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}
