/* ==========================================================================
   SOLUCIONES HOSPITALARIAS — CTA FINAL & FOOTER INSTITUCIONAL
   Versión: 1.0 (Atmósfera Celestial Abierta, Quick Pills & Footer Oficial)
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. CTA FINAL
   -------------------------------------------------------------------------- */
.cta-final-section {
  position: relative;
  width: 100%;
  padding: clamp(5rem, 10vh, 8.5rem) 0 clamp(4rem, 8vh, 6rem);
  background: radial-gradient(circle at 50% 20%, #F0F8FF 0%, #DCEEFE 60%, #C7E4FC 100%);
  overflow: hidden;
  z-index: var(--z-base);
  text-align: center;
}

/* Nubes Volumétricas Lentas del CTA Final */
.cta-clouds-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.cta-cloud-left {
  position: absolute;
  top: 10%;
  left: -15%;
  width: 55vw;
  height: 60vh;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(45px);
  animation: slow-cloud-drift 40s ease-in-out infinite alternate;
}

.cta-cloud-right {
  position: absolute;
  bottom: 5%;
  right: -15%;
  width: 55vw;
  height: 60vh;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(45px);
  animation: slow-cloud-drift 35s ease-in-out infinite alternate-reverse;
}

.cta-sun-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 450px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95) 0%, rgba(56, 182, 255, 0.15) 50%, rgba(255, 255, 255, 0) 75%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
}

.cta-container {
  position: relative;
  z-index: 3;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  box-sizing: border-box;
}

/* Título y Subtítulo */
.cta-heading {
  font-family: var(--font-ui);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--color-brand-blue-deep);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
  text-transform: uppercase;
}

.cta-subhead {
  font-family: var(--font-ui);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: var(--line-height-snug);
  max-width: 680px;
  margin: 0 auto clamp(2rem, 4vh, 3rem);
}

/* Selector Rápido de Necesidad (Quick Pills) */
.cta-quick-selector {
  margin-bottom: clamp(2.5rem, 4.5vh, 3.5rem);
}

.quick-selector-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand-blue);
  margin-bottom: var(--space-2);
  display: block;
}

.cta-pills-grid {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.cta-pill-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 74, 173, 0.12);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-brand-blue-deep);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--duration-fast) var(--ease-natural);
}

.cta-pill-option:hover {
  background: #FFFFFF;
  border-color: var(--color-brand-cyan);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 74, 173, 0.1);
}

.cta-pill-option.active {
  background: var(--color-brand-blue);
  color: #FFFFFF;
  border-color: var(--color-brand-blue);
  box-shadow: 0 6px 20px rgba(0, 74, 173, 0.25);
  transform: translateY(-2px);
}

/* Bloque de Acciones Principales */
.cta-actions-cluster {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: clamp(2.5rem, 5vh, 4rem);
  flex-wrap: wrap;
}

.btn-cta-whatsapp {
  padding: 1.15rem 2.6rem;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.04em;
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.35), 0 0 24px rgba(37, 211, 102, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-cta-whatsapp:hover {
  background-color: var(--color-whatsapp-hover);
  box-shadow: 0 16px 45px rgba(37, 211, 102, 0.5), 0 0 35px rgba(37, 211, 102, 0.3);
  transform: translateY(-3px) scale(1.02);
}

.btn-cta-whatsapp svg {
  width: 1.4rem;
  height: 1.4rem;
}

.btn-cta-catalog {
  padding: 1.05rem 2rem;
  font-size: var(--text-sm);
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-brand-blue-deep);
  border: 1.5px solid rgba(0, 74, 173, 0.15);
}

.btn-cta-catalog:hover {
  background: #FFFFFF;
  border-color: var(--color-brand-cyan);
  color: var(--color-brand-blue);
  box-shadow: 0 8px 24px rgba(0, 74, 173, 0.12);
  transform: translateY(-2px);
}

/* Tarjeta de Información de Contacto Directo */
.cta-direct-contact-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  box-shadow: 0 20px 50px -10px rgba(0, 45, 110, 0.1);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  text-align: center;
}

.contact-item-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.contact-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 74, 173, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-blue);
  margin-bottom: 0.2rem;
}

.contact-item-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.contact-item-title {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-brand-blue);
}

.contact-item-value {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-brand-blue-deep);
  line-height: 1.4;
  text-decoration: none;
}

.contact-item-value:hover {
  color: var(--color-brand-cyan);
}

/* --------------------------------------------------------------------------
   02. FOOTER INSTITUCIONAL
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-brand-blue-deep);
  color: #FFFFFF;
  padding: clamp(3.5rem, 6vh, 5rem) 0 2rem;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.footer-container {
  max-width: var(--container-max-w);
  margin: 0 auto;
  padding: 0 var(--space-4);
  box-sizing: border-box;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(2rem, 3.5vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 4vh, 3.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Columna Marca */
.footer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo-link {
  display: inline-block;
  margin-bottom: var(--space-3);
}

.footer-logo-img {
  height: 42px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1); /* Renderizado blanco impoluto */
}

.footer-tagline {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-3);
  max-width: 320px;
}

.footer-badge-experience {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem 0.9rem;
  background: rgba(56, 182, 255, 0.12);
  border: 1px solid rgba(56, 182, 255, 0.3);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-brand-cyan);
}

/* Columnas de Enlaces */
.footer-col-title {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: var(--space-3);
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-nav-link {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-natural);
}

.footer-nav-link:hover {
  color: var(--color-brand-cyan);
}

/* Columna Cobertura y Contacto */
.footer-contact-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.footer-contact-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-contact-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-brand-cyan); /* Azul Cian de alta luminosidad */
  display: block;
}

.footer-contact-text {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: #FFFFFF; /* Blanco impoluto de máximo contraste */
  line-height: 1.5;
  margin: 0;
}

.footer-phone-link {
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-natural);
}

.footer-phone-link:hover {
  color: var(--color-brand-cyan);
}

.footer-coverage-text {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: #FFFFFF;
  line-height: 1.5;
  margin-bottom: var(--space-3);
}

.footer-coverage-text strong {
  color: var(--color-brand-cyan);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: var(--text-xs);
  display: inline-block;
  margin-bottom: 0.2rem;
}

.footer-social-links {
  display: flex;
  gap: var(--space-2);
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.55rem 1.1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-natural);
}

.footer-social-btn:hover {
  background: #1877F2; /* Facebook brand color */
  border-color: #1877F2;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.4);
}

.footer-social-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Fila Inferior de Copyright & Legal */
.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.8rem;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer-legal-links {
  display: flex;
  gap: var(--space-3);
}

.footer-legal-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-natural);
}

.footer-legal-link:hover {
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   03. MODAL INSTITUCIONAL DE POLÍTICAS Y LEGAL
   -------------------------------------------------------------------------- */
.institutional-legal-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 15, 30, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.institutional-legal-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.legal-modal-card {
  background: #FFFFFF;
  border-radius: 28px;
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(56, 182, 255, 0.25);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.institutional-legal-modal.is-open .legal-modal-card {
  transform: scale(1) translateY(0);
}

.legal-modal-header {
  padding: 1.8rem 2.2rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(0, 74, 173, 0.08);
}

.legal-modal-tag {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-brand-cyan);
  display: block;
  margin-bottom: 0.25rem;
}

.legal-modal-title {
  font-family: var(--font-ui);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 800;
  color: var(--color-brand-blue-deep);
  margin: 0;
  line-height: 1.2;
}

.legal-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 74, 173, 0.06);
  color: var(--color-brand-blue-deep);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-natural);
  flex-shrink: 0;
}

.legal-modal-close:hover {
  background: var(--color-brand-blue-deep);
  color: #FFFFFF;
}

.legal-modal-nav-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem 2.2rem;
  background: #F8FBFE;
  border-bottom: 1px solid rgba(0, 74, 173, 0.06);
  overflow-x: auto;
}

.legal-tab-btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-brand-blue);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-natural);
}

.legal-tab-btn:hover {
  background: rgba(56, 182, 255, 0.1);
}

.legal-tab-btn.active {
  background: var(--color-brand-blue);
  color: #FFFFFF;
}

.legal-modal-body {
  padding: 1.8rem 2.2rem;
  overflow-y: auto;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.legal-modal-body p {
  margin: 0 0 1rem;
}

.legal-modal-body strong {
  color: var(--color-brand-blue-deep);
}

.legal-modal-body ul {
  padding-left: 1.2rem;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.legal-modal-body li {
  line-height: 1.5;
}

.legal-modal-footer {
  padding: 1.2rem 2.2rem;
  background: #F8FBFE;
  border-top: 1px solid rgba(0, 74, 173, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legal-modal-meta {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.btn-legal-confirm {
  padding: 0.55rem 1.6rem;
  background: var(--color-brand-blue);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-natural);
}

.btn-legal-confirm:hover {
  background: var(--color-brand-blue-deep);
  transform: translateY(-1px);
}

/* Responsive CTA & Footer */
@media (max-width: 992px) {
  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
  .cta-direct-contact-card {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

@media (max-width: 640px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom-row {
    flex-direction: column;
    text-align: center;
  }
}
