/* ======================================================
   CLÍNICA MÉDICA NICOYANA — style.css
   Paleta tomada del diseño de referencia (CLINIX)
   ====================================================== */

:root {
  /* Paleta principal (réplica de la muestra) */
  --color-white:        #ffffff;
  --color-text:         #2c3e50;
  --color-navy:         #1b3a5c;       /* azul oscuro del logo y títulos */
  --color-blue-line:    #5b8dbf;       /* línea separadora azul del header */
  --color-blue-band:    #2f4a6e;       /* fondo de la franja inferior (separador) */
  --color-blue-medium:  #486590;       /* cuadro inferior tipo A (más oscuro) */
  --color-blue-light:   #6489b4;       /* cuadro inferior tipo B (más claro) */
  --color-hero-1:       #e8f0f8;       /* gradiente hero claro */
  --color-hero-2:       #c0d4e8;       /* gradiente hero medio */

  /* Colores sociales */
  --color-fb:           #3b5998;
  /* Instagram usa gradiente, ver clase .instagram */

  /* Tipografía */
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Reset básico ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* =========================================
   HEADER
   ========================================= */
.site-header {
  background: var(--color-white);
  position: relative;
  z-index: 10;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.logo-link {
  flex-shrink: 0;
  display: block;
}
.logo {
  height: 60px;
  width: auto;
  transition: opacity 0.2s ease;
}
.logo-link:hover .logo { opacity: 0.85; }

/* Navegación principal */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
}
.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.3px;
  padding: 22px 4px;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--color-blue-line); }
.main-nav a.active { color: var(--color-navy); }
.main-nav a.active::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 0;
  height: 3px;
  background: var(--color-blue-line);
}

/* Extras (sociales + Colaboradores) */
.header-extras {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.social:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}
.social.facebook { background: var(--color-fb); }
.social.instagram {
  background:
    radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.btn-colaboradores {
  background: var(--color-navy);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  transition: background 0.2s ease, transform 0.2s ease;
  margin-left: 6px;
}
.btn-colaboradores:hover {
  background: var(--color-blue-line);
  transform: translateY(-1px);
}

/* Línea azul debajo del header */
.header-divider {
  height: 2px;
  background: var(--color-blue-line);
  width: 100%;
}

/* =========================================
   HERO — banner de horario y contacto centrado en marco celeste
   ========================================= */
.hero {
  background: linear-gradient(135deg, var(--color-hero-1) 0%, #d4e1f0 50%, var(--color-hero-2) 100%);
  padding: 32px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
  position: relative;
  overflow: hidden;
}

/* Detalles decorativos suaves de fondo (mantienen la sensación celeste) */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(91, 141, 191, 0.18) 0%, transparent 70%);
  top: -90px; left: -90px;
}
.hero::after {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(91, 141, 191, 0.14) 0%, transparent 70%);
  bottom: -120px; right: -120px;
}

.hero-banner-link {
  position: relative;            /* sobre los círculos decorativos */
  display: block;
  width: 100%;
  max-width: 1200px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(27, 58, 92, 0.06),
    0 14px 44px rgba(27, 58, 92, 0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  text-decoration: none;
  font-size: 0;                  /* elimina espacio fantasma bajo el img */
}
.hero-banner-link:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 3px rgba(27, 58, 92, 0.08),
    0 18px 52px rgba(27, 58, 92, 0.28);
}

.hero-banner {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================================
   FRANJA INFERIOR — 4 cuadros de colores (sin contenido)
   ========================================= */
.services-strip {
  background: var(--color-blue-band);
}
.services-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;                              /* fallback para navegadores antiguos */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;                                   /* separador fino entre los 4 cuadros */
}
.service-box {
  min-height: 150px;
  flex: 1 1 calc(25% - 2px);                  /* fallback flex */
  transition: filter 0.2s ease;
}
.service-box-a { background: var(--color-blue-medium); }
.service-box-b { background: var(--color-blue-light); }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 22px 32px;
  text-align: center;
  font-size: 13.5px;
  letter-spacing: 0.3px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .main-nav ul { gap: 24px; }
  .main-nav a { font-size: 14px; }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 20px;
  }
  .main-nav {
    order: 3;
    flex-basis: 100%;
    border-top: 1px solid #e8eef4;
    padding-top: 8px;
  }
  .main-nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
  }
  .main-nav a { padding: 8px 4px; }
  .main-nav a.active::after { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .header-inner { padding: 10px 14px; gap: 10px; }
  .logo { height: 44px; }
  .main-nav ul { gap: 12px; }
  .main-nav a { font-size: 13px; }
  .btn-colaboradores { font-size: 12px; padding: 7px 12px; }
  .social { width: 28px; height: 28px; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service-box { min-height: 110px; }
  .hero { padding: 16px 12px; min-height: auto; }
  .hero-banner-link { border-radius: 8px; }
}
