/* =========================================================
   COMPONENTS.CSS – LIMPIO / ÚNICO / SIN DUPLICADOS
   Proyecto: Clima Pergamino
   ========================================================= */


/* ===============================
   CARDS
   =============================== */

.card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-body{
  padding: 16px;
}

.card-title{
  font-size: 16px;
  font-weight: var(--fw-extrabold);
  margin: 0 0 6px;
}

.card-sub{
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}


/* ===============================
   GRID (servicios, bloques)
   =============================== */

.grid{
  display: grid;
  gap: 14px;
}

@media (min-width: 650px){
  .grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px){
  .grid{
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ===============================
   SERVICE ITEM
   =============================== */

.service{
  display: flex;
  align-items: center;
  gap: 14px;
}

.service-ico{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-2);
  display: grid;
  place-items: center;
  font-weight: var(--fw-extrabold);
}

.service-ico{
  /* ...lo que ya tenés... */
  color: var(--brand-amber, #F2B233); /* ocre */
}

.service-ico svg{
  width: 26px;
  height: 26px;
  display: block;
}


/* ===============================
   BUTTONS
   =============================== */

.btn{
  height: var(--btn-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: var(--fw-extrabold);
  gap: 10px;
  transition:
    background var(--t) var(--e),
    transform var(--t-fast) var(--e);
}

.btn:active{
  transform: scale(.99);
}

.btn-primary{
  background: var(--brand);
  color: #1b1b1b;
}

.btn-primary:hover{
  background: var(--brand-600);
}

.btn-ghost{
  background: var(--white);
  border-color: var(--line);
}

.btn-ghost:hover{
  background: #F2F4F7;
}


/* ===============================
   HEADER – CLON pergamino.ar (mobile)
   =============================== */

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 10px 18px rgba(15,23,42,.06);
}

.topbar-inner{
  height: 118px;          /* muni se ve alto */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;        /* muni deja mucho aire lateral */
}

.brand{
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  min-width: 0;
}

/* En la muni el logo es GRANDE */
.brand-muni{
  height: 80px;           /* clave */
  width: auto;
  display: block;
}

/* Si mostrás clima al lado, que sea más chico */
.brand-clima{
  height: 80px;
  width: auto;
  display: block;
}

/* Hamburguesa: 3 rayas ocre, sin círculo */
.hamburger{
  background: transparent;
  border: 0;
  padding: 12px 10px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger span{
  display: block;
  width: 25px;            /* en muni son más cortas */
  height: 2px;            /* finitas */
  border-radius: 2px;
  background: var(--brand-amber, #F2B233);
}

/* Ajuste para pantallas muy chicas */
@media (max-width: 420px){
  .topbar-inner{ height: 112px; padding: 0 18px; }
  .brand-muni{ height: 52px; }
  .brand-clima{ height: 52px; }
  .hamburger span{ width: 28px; }
}


/* ===============================
   BRAND (logos)
   =============================== */

.brand{
  display: flex;
  align-items: center;
  gap: 28px;
  text-decoration: none;
  min-width: 0;
}

.brand-muni{
  height: 85px;
  width: auto;
  display: block;
}

.brand-clima{
  height: 85px;
  width: auto;
  display: block;
}

/* ===============================
   DRAWER (menú mobile)
   =============================== */

.drawer{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.drawer.is-open{
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel{
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(360px, 92vw);
  background: #fff;
  transform: translateX(100%);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
}

.drawer.is-open .drawer-panel{
  transform: translateX(0);
}

.drawer-head{
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.drawer-title{
  font-weight: var(--fw-extrabold);
}

.drawer-close{
  border: 0;
  background: transparent;
  font-size: 22px;
  padding: 8px;
  cursor: pointer;
}

.drawer-nav{
  padding: 12px;
  display: grid;
  gap: 8px;
}

.drawer-nav a{
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(15,23,42,.92);
  font-weight: 700;
}

.drawer-nav a:hover{
  background: rgba(15,23,42,.05);
}


/* ===============================
   MOBILE AJUSTES
   =============================== */

@media (max-width: 768px){
  .topbar-inner{
    height: 96px;
    padding: 0 16px;
  }

  .brand{
    gap: 18px;
  }

  .brand-muni{
    height: 85px;
  }

  .brand-clima{
    height: 50px;
  }

  .hamburger span{
    width: 28px;
  }
}

/* ===============================
   Header – Marca Clima Pergamino
   =============================== */

.brand-clima-text{
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

/* ícono */
.brand-icon{
  width: 50px;
  height: 50px;
  display: block;
}

/* texto completo */
.brand-text{
  font-family: 'Roboto', 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1;
  white-space: nowrap;
}

/* “clima” */
.brand-clima-word{
  color: #111; /* negro legible */
}

/* “pergamino” */
.brand-perga-word{
  color: var(--brand-amber, #F2B233); /* ocre municipal */
}

/* FIX: Leaflet arriba del header */
.topbar{
  position: sticky;
  top: 0;
  z-index: 9999; /* más alto que Leaflet */
}

/* Asegura que el mapa no genere overlays por encima del header */
.leaflet-container{
  z-index: 0 !important;
}

/* Leaflet usa panes con z-index propios: los bajamos dentro del mapa */
.leaflet-pane,
.leaflet-top,
.leaflet-bottom,
.leaflet-control,
.leaflet-tooltip,
.leaflet-popup{
  z-index: 10 !important;
}
