/* ==========================================================================
   CLÍNICA GRUMEDSO - SISTEMA DE DISEÑO Y HOJA DE ESTILOS PRINCIPAL
   ========================================================================== */

:root {
  /* Paleta Corporativa Identificada / Diseñada para Grumedso */
  --primary: #0A3D62;        /* Azul Médico Profundo */
  --primary-hover: #082E4B;
  --secondary: #1E88E5;      /* Azul Clínico Asistencial */
  --secondary-soft: #E3F2FD;
  --accent: #00B894;         /* Verde Médico / Esperanza de Recuperación */
  --accent-soft: rgba(0, 184, 148, 0.15);
  --dark: #1E293B;           /* Texto Principal Slate Dark */
  --light: #F8FAFC;          /* Fondo Claro Neutro */
  --white: #FFFFFF;
  --gray-subtle: #E2E8F0;
  --text-muted: #64748B;
  
  /* Fuentes */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Transiciones & Sombras */
  --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(10, 61, 98, 0.1), 0 8px 10px -6px rgba(10, 61, 98, 0.05);
}

/* Reseteo y Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--dark);
  background-color: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

/* Espaciados Personalizados */
.py-6 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.mt-6 {
  margin-top: 4.5rem;
}

.max-w-600 {
  max-width: 600px;
}

.max-w-650 {
  max-width: 650px;
}

/* Tipografía y Encabezados */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fw-extrabold {
  font-weight: 800;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-top: 0.5rem;
}

.tracking-wide {
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

/* Barra Superior */
.topbar {
  background-color: var(--primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.topbar .social-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition-fast);
}

.topbar .social-links a:hover {
  color: var(--accent);
}

/* Navegación y Header */
.site-header {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.brand-badge {
  width: 44px;
  height: 44px;
  background-color: var(--secondary-soft);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  display: block;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}

.navbar .nav-link {
  font-weight: 600;
  color: var(--dark);
  padding: 0.5rem 1rem;
  transition: var(--transition-fast);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--secondary) !important;
}

/* Botones Personalizados */
.btn-primary-custom {
  background-color: var(--secondary);
  color: var(--white);
  border: none;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  transition: var(--transition-fast);
}

.btn-primary-custom:hover {
  background-color: #1565C0;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(30, 136, 229, 0.25);
}

.btn-outline-primary-custom {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  transition: var(--transition-fast);
}

.btn-outline-primary-custom:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0A3D62 0%, #154e7d 100%), url('../img/hero.jpg') center/cover no-repeat;
  position: relative;
  min-height: 80vh;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(0, 184, 148, 0.15) 0%, transparent 50%),
              linear-gradient(to right, rgba(10, 61, 98, 0.95) 45%, rgba(10, 61, 98, 0.65) 100%);
}

.bg-accent-soft {
  background-color: rgba(0, 184, 148, 0.2);
}

.text-accent {
  color: var(--accent) !important;
}

/* Barra de Confianza */
.trust-strip {
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-subtle);
}

.trust-icon {
  font-size: 2rem;
  color: var(--secondary);
}

/* Tarjetas de Servicios */
.service-card {
  transition: var(--transition-fast);
  border-radius: 16px;
  background-color: var(--white);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover) !important;
}

.service-icon-box {
  width: 54px;
  height: 54px;
  background-color: var(--secondary-soft);
  color: var(--secondary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.service-link {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s ease;
}

.service-link:hover {
  gap: 0.7rem;
  color: var(--primary);
}

/* Tarjetas de Especialidades */
.specialty-card {
  border-radius: 16px;
  transition: var(--transition-fast);
  background-color: var(--white);
}

.specialty-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover) !important;
  border-color: var(--secondary) !important;
}

.specialty-icon {
  font-size: 2.2rem;
  color: var(--secondary);
}

/* Banner de Páginas Internas */
.page-title-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #15578a 100%);
}

/* Galería e Instalaciones */
.gallery-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.gallery-thumb-placeholder {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #edf2f7;
  color: var(--text-muted);
  font-weight: 600;
}

.gallery-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 61, 98, 0.75);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.gallery-card:hover .gallery-hover-overlay {
  opacity: 1;
}

/* Placeholder de Imagen Nosotros y Doctores */
.about-image-placeholder {
  min-height: 380px;
  background: linear-gradient(145deg, #e6edf2 0%, #d8e3eb 100%);
  border-radius: 20px;
  border: 2px dashed #b9cddb;
}

.doctor-avatar-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: var(--secondary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, #062b47 100%);
}

/* Contacto y Formularios */
.contact-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--secondary-soft);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.form-control, .form-select {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--gray-subtle);
}

.form-control:focus, .form-select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.15);
}

/* Botón Flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 16px rgba(37, 211, 102, 0.35);
  z-index: 1040;
  text-decoration: none;
  transition: var(--transition-fast);
}

.whatsapp-float:hover {
  background-color: #20BA5A;
  color: var(--white);
  transform: scale(1.08) rotate(5deg);
}

/* Botón Volver Arriba */
.back-to-top {
  position: fixed;
  bottom: 95px;
  right: 30px;
  width: 45px;
  height: 45px;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1030;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: var(--transition-fast);
}

.back-to-top:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
}

.back-to-top.show {
  display: flex;
}

/* Footer */
.footer {
  background-color: #0d1b2a;
}

.text-secondary-text {
  color: #94A3B8;
}

.footer-links a {
  color: #94A3B8;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--white);
  transform: translateX(3px);
}

.contact-info-list li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: #94A3B8;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition-fast);
}

.social-icon:hover {
  background-color: var(--secondary);
  color: var(--white);
}

/* Animaciones */
.reveal-fade {
  animation: fadeIn 0.8s ease-out forwards;
}

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

/* Ajustes Responsive */
@media (max-width: 991px) {
  .site-header .navbar-nav {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.8rem;
  }
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    font-size: 28px;
  }
  .back-to-top {
    bottom: 82px;
    right: 24px;
    width: 40px;
    height: 40px;
  }
}