/*
Theme Name: CBQ Bomberos Quilicura
Theme URI: https://bomberosquilicura.cl
Author: Cuerpo de Bomberos de Quilicura
Description: Tema institucional para el sitio web del Cuerpo de Bomberos de Quilicura. Estructura inspirada en el patrón típico de sitios de bomberos (topbar + header + slider + noticias + cifras + footer de color), con paleta amarillo/blanco propia de Quilicura.
Version: 2.0
Text Domain: cbq-bomberos
*/

/* =========================================
   1. PALETA DE COLORES INSTITUCIONAL
   Amarillo + blanco predominante (equivalente al
   naranjo/blanco de CBS, adaptado a Quilicura).
   Cambia solo estos valores si necesitas ajustar el tono.
========================================= */
:root {
  --amarillo-cbq: #FFC20E;     /* amarillo institucional principal */
  --amarillo-oscuro: #E0A800;  /* hover / detalles */
  --texto: #434343;            /* gris oscuro para textos, igual que CBS */
  --texto-footer: #2B2B2B;     /* texto oscuro sobre fondo amarillo (buen contraste) */
  --gris-claro: #F2F2F2;       /* fondo de secciones alternas */
  --gris-medio: #DDDDDD;       /* líneas separadoras */
  --blanco: #FFFFFF;
  --sombra: rgba(0, 0, 0, 0.12);
}

/* =========================================
   2. TIPOGRAFÍA
   Montserrat para texto y Figtree para títulos,
   igual combinación que usa cbs.cl (fuentes libres de Google Fonts).
========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Figtree', 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  color: var(--texto);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.contenedor {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================
   3. TOPBAR (barra superior delgada)
========================================= */
.cbq-topbar {
  background: var(--gris-claro);
  border-bottom: 1px solid var(--gris-medio);
}

.cbq-topbar .contenedor {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  height: 38px;
  align-items: center;
}

.cbq-topbar a {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--texto);
  text-transform: uppercase;
}

.cbq-topbar a:hover { color: var(--amarillo-oscuro); }

/* =========================================
   4. HEADER PRINCIPAL (blanco, con menú desplegable)
========================================= */
.cbq-header {
  background: var(--blanco);
  box-shadow: 0 2px 8px var(--sombra);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cbq-header .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
}

.cbq-logo img { height: 60px; }
.cbq-logo span {
  color: var(--texto);
  font-family: 'Figtree', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
}

.cbq-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--texto);
  font-size: 1.8rem;
  cursor: pointer;
}

/* Menú principal con submenús desplegables (igual patrón que CBS) */
.cbq-menu {
  display: flex;
  gap: 26px;
}

.cbq-menu > li {
  position: relative;
}

.cbq-menu > li > a {
  color: var(--texto);
  font-weight: 700;
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  padding: 10px 0;
  display: inline-block;
  border-bottom: 3px solid transparent;
  transition: border-color .2s, color .2s;
}

.cbq-menu > li > a:hover,
.cbq-menu > li.current-menu-item > a {
  color: var(--amarillo-oscuro);
  border-color: var(--amarillo-cbq);
}

.cbq-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--blanco);
  min-width: 220px;
  box-shadow: 0 8px 16px var(--sombra);
  border-top: 3px solid var(--amarillo-cbq);
  padding: 8px 0;
}

.cbq-menu li:hover > .sub-menu { display: block; }

.cbq-menu .sub-menu a {
  display: block;
  padding: 10px 18px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--texto);
}

.cbq-menu .sub-menu a:hover { background: var(--gris-claro); color: var(--amarillo-oscuro); }

/* =========================================
   5. HERO / SLIDER PRINCIPAL con puntos de navegación
========================================= */
.cbq-slider {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: var(--texto);
}

.cbq-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.cbq-slide.activo { opacity: 1; }

.cbq-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.75) 100%);
}

.cbq-slide-texto {
  position: absolute;
  bottom: 90px;
  left: 0;
  right: 0;
  z-index: 2;
  color: var(--blanco);
  text-align: center;
  padding: 0 20px;
}

.cbq-slide-texto span.badge {
  display: inline-block;
  background: var(--amarillo-cbq);
  color: var(--texto-footer);
  font-weight: 800;
  font-size: .75rem;
  letter-spacing: .05em;
  padding: 5px 14px;
  border-radius: 3px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.cbq-slide-texto h1 {
  font-size: 2.3rem;
  color: var(--blanco);
  margin-bottom: 10px;
  text-shadow: 0 2px 6px rgba(0,0,0,.4);
}

.cbq-slide-texto p { font-size: 1.1rem; }

/* puntos (dots) de navegación del slider */
.cbq-slider-dots {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cbq-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--blanco);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.cbq-dot.activo { background: var(--amarillo-cbq); border-color: var(--amarillo-cbq); }

/* =========================================
   6. FRANJA DE ACCESOS DE URGENCIA
========================================= */
.cbq-accesos {
  background: var(--texto-footer);
}

.cbq-accesos ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.cbq-accesos li {
  flex: 1 1 200px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.1);
}

.cbq-accesos li:last-child { border-right: none; }

.cbq-accesos a {
  display: block;
  color: var(--blanco);
  padding: 16px 10px;
  font-weight: 700;
  font-size: .9rem;
  transition: background .2s, color .2s;
}

.cbq-accesos a:hover { background: var(--amarillo-cbq); color: var(--texto-footer); }

/* =========================================
   7. CIFRAS INSTITUCIONALES (como en CBS)
========================================= */
.cbq-cifras {
  background: var(--amarillo-cbq);
}

.cbq-cifras-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
  padding: 40px 0;
}

.cbq-cifra .numero {
  font-family: 'Figtree', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--texto-footer);
  line-height: 1;
}

.cbq-cifra .etiqueta {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--texto-footer);
  margin-top: 6px;
}

/* =========================================
   8. SECCIÓN NOTICIAS con etiquetas de categoría
========================================= */
.cbq-seccion { padding: 60px 0; }
.cbq-seccion.gris { background: var(--gris-claro); }

.cbq-titulo-seccion {
  text-align: center;
  margin-bottom: 40px;
}

.cbq-titulo-seccion h2 {
  font-size: 1.8rem;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.cbq-titulo-seccion h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--amarillo-cbq);
}

.cbq-noticias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.cbq-noticia-card {
  background: var(--blanco);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 10px var(--sombra);
  transition: transform .2s;
  border: 1px solid var(--gris-medio);
}

.cbq-noticia-card:hover { transform: translateY(-5px); }

.cbq-noticia-card img { height: 190px; object-fit: cover; width: 100%; }

.cbq-noticia-info { padding: 18px; }

.cbq-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.cbq-tag {
  display: inline-block;
  background: var(--gris-claro);
  color: var(--texto);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  border-left: 3px solid var(--amarillo-cbq);
}

.cbq-noticia-info .fecha { color: var(--amarillo-oscuro); font-size: .8rem; font-weight: 700; }
.cbq-noticia-info h3 { font-size: 1.05rem; margin: 8px 0; }
.cbq-noticia-info p { font-size: .9rem; color: #666; }

/* =========================================
   9. SECCIÓN COMPAÑÍAS
========================================= */
.cbq-companias-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.cbq-compania-card {
  background: var(--blanco);
  border: 1px solid var(--gris-medio);
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 3px 10px var(--sombra);
  transition: transform .2s;
}

.cbq-compania-card:hover { transform: translateY(-5px); }

.cbq-compania-card img { height: 150px; object-fit: cover; width: 100%; }

.cbq-compania-info { padding: 16px; }
.cbq-compania-info .numero {
  display: inline-block;
  background: var(--amarillo-cbq);
  color: var(--texto-footer);
  padding: 3px 10px;
  border-radius: 3px;
  font-size: .8rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.cbq-compania-info h3 { font-size: 1rem; }

/* =========================================
   10. FOOTER (fondo amarillo sólido, como el naranjo de CBS)
========================================= */
.cbq-footer {
  background: var(--amarillo-cbq);
  color: var(--texto-footer);
  padding: 50px 0 20px;
}

.cbq-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.cbq-footer h4 {
  margin-bottom: 14px;
  color: var(--texto-footer);
}

.cbq-footer a { color: var(--texto-footer); font-weight: 600; }
.cbq-footer a:hover { text-decoration: underline; }

.cbq-footer-bottom {
  border-top: 1px solid rgba(0,0,0,.15);
  padding-top: 18px;
  text-align: center;
  font-size: .85rem;
  color: var(--texto-footer);
}

/* =========================================
   11. RESPONSIVE
========================================= */
@media (max-width: 900px) {
  .cbq-noticias-grid { grid-template-columns: repeat(2, 1fr); }
  .cbq-companias-grid { grid-template-columns: repeat(2, 1fr); }
  .cbq-footer-grid { grid-template-columns: 1fr; }
  .cbq-cifras-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .cbq-topbar { display: none; }
}

@media (max-width: 700px) {
  .cbq-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 90px;
    left: 0;
    right: 0;
    background: var(--blanco);
    padding: 20px;
    gap: 4px;
    box-shadow: 0 8px 16px var(--sombra);
  }
  .cbq-menu.abierto { display: flex; }
  .cbq-menu .sub-menu { position: static; box-shadow: none; border-top: none; padding-left: 14px; }
  .cbq-menu-toggle { display: block; }
  .cbq-noticias-grid { grid-template-columns: 1fr; }
  .cbq-companias-grid { grid-template-columns: 1fr; }
  .cbq-cifras-grid { grid-template-columns: repeat(2, 1fr); }
  .cbq-slide-texto h1 { font-size: 1.5rem; }
}
