/* ============================================================
   AGRUS DATA · agrus.css
   Base de tema compartida (variables, header y dashboard).
   El footer trae su propio CSS en footer.js (componente portátil).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,400;0,600;0,700;0,800;1,500&family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  /* Marca */
  --green:        #76b82a;
  --green-bright: #8fcb3c;
  --green-deep:   #4e7d1a;
  --ink:          #232a1c;
  --night:        #1a1f15;
  --paper:        #ffffff;
  --mist:         #f4f6f1;
  --line:         #e3e7dd;
  --muted:        #6a7363;

  /* Tipografía */
  --display: 'Bitter', Georgia, serif;
  --sans:    'Montserrat', system-ui, sans-serif;

  /* Escala */
  --maxw: 1240px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(35, 42, 28, .08);
  --shadow-lg: 0 24px 60px rgba(35, 42, 28, .14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0; }

a { color: inherit; text-decoration: none; }

.container { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }

/* ============================================================
   HEADER  (reutilizable: copia el bloque <header class="site-header">)
   ------------------------------------------------------------
   Variantes:
     .site-header                -> sólido (claro), para páginas internas
     .site-header.is-transparent -> transparente sobre el hero (home)
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background .3s ease, box-shadow .3s ease;
}

.site-header.is-transparent {
  position: absolute;
  inset: 0 0 auto 0;
  background: transparent;
  border-bottom: none;
  color: #fff;
}

.site-header__inner {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
}

/* Logo */
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; }
.brand__mark { width: 34px; height: 34px; color: var(--green); flex: none; }
.is-transparent .brand__mark { color: #fff; }
.brand__name {
  font-family: var(--sans);
  font-size: 1.35rem;
  letter-spacing: .04em;
  font-weight: 800;
}

/* Navegación */
.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 6px;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav__link:hover { color: var(--green-deep); }
.is-transparent .nav__link:hover { color: #fff; }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

/* Dropdown Serviços */
.nav__item { position: relative; }
.nav__caret { width: 12px; height: 12px; transition: transform .25s ease; }
.nav__item:hover .nav__caret { transform: rotate(180deg); }
.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 250px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .22s ease;
}
.nav__item:hover .dropdown,
.nav__item:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 8px;
  font-size: .82rem; font-weight: 500; color: var(--ink);
  transition: background .15s ease, color .15s ease;
}
.dropdown a:hover { background: var(--mist); color: var(--green-deep); }
.dropdown a::before {
  content: '›'; color: var(--green); font-weight: 700; font-size: 1.1rem;
}

/* Acción de usuario */
.nav__user {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid currentColor; margin-left: 8px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.nav__user:hover { background: var(--green); border-color: var(--green); color: #fff; }
.is-transparent .nav__user:hover { color: #fff; }
.nav__user svg { width: 20px; height: 20px; }

/* Botón hamburguesa (móvil) */
.nav__toggle {
  display: none; width: 44px; height: 44px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  padding: 10px;
}
.nav__toggle svg { width: 100%; height: 100%; }

@media (max-width: 980px) {
  .nav__toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 84px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); color: var(--ink);
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
  }
  .nav.is-open { max-height: 520px; padding: 12px; }
  .nav:not(.is-open) { padding-block: 0; }
  .nav__link { color: var(--ink); }
  .nav__link::after { display: none; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; padding-left: 18px; min-width: 0;
    display: none;
  }
  .nav__item.is-open .dropdown { display: block; }
  .nav__user { align-self: flex-start; color: var(--ink); }
}

/* ============================================================
   HERO  (usado en header.html para previsualizar como la home)
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(20,28,12,.55), rgba(20,28,12,.25) 35%, rgba(20,28,12,.6)),
    url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=2000&q=80') center/cover no-repeat,
    #2b3a1c;
}
.hero__content { width: min(100% - 48px, 880px); padding: 80px 0; }
.hero h1 {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: .01em;
  font-size: clamp(2.1rem, 5.5vw, 4rem);
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.hero__rule { width: 340px; max-width: 80%; height: 2px; background: rgba(255,255,255,.55); margin: 28px auto; }
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 720px; margin: 0 auto 36px; color: rgba(255,255,255,.92); }
.btn-cta {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .8rem;
  padding: 16px 34px;
  border-radius: 40px;
  box-shadow: 0 12px 30px rgba(118,184,42,.4);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn-cta:hover { background: var(--green-bright); transform: translateY(-2px); box-shadow: 0 16px 38px rgba(118,184,42,.5); }

/* Flechas carrusel del hero (decorativas) */
.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s ease;
}
.hero__arrow:hover { background: #fff; }
.hero__arrow svg { width: 22px; height: 22px; }
.hero__arrow--prev { left: 24px; }
.hero__arrow--next { right: 24px; }
@media (max-width: 700px) { .hero__arrow { display: none; } }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash {
  background: var(--mist);
  min-height: calc(100vh - 84px);
  padding: 36px 0 64px;
}

.dash__head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 16px; margin-bottom: 28px;
}
.dash__head .eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--green-deep); margin-bottom: 6px;
}
.dash__head h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--ink); }
.dash__head p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
.dash__date {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 16px; font-size: .82rem; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow);
}
.dash__date svg { width: 16px; height: 16px; color: var(--green); }

/* KPI cards */
.kpi-grid {
  display: grid; gap: 18px; margin-bottom: 22px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 980px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .kpi-grid { grid-template-columns: 1fr; } }

.kpi {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--green);
}
.kpi__top { display: flex; align-items: center; justify-content: space-between; }
.kpi__icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(118,184,42,.12); color: var(--green-deep);
}
.kpi__icon svg { width: 22px; height: 22px; }
.kpi__label { font-size: .76rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.kpi__value { font-family: var(--display); font-weight: 700; font-size: 2rem; color: var(--ink); margin: 8px 0 2px; }
.kpi__value small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.kpi__delta { font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.kpi__delta.up { color: var(--green-deep); }
.kpi__delta.down { color: #c0492f; }

/* Panels */
.panels {
  display: grid; gap: 18px;
  grid-template-columns: 1.65fr 1fr;
}
@media (max-width: 980px) { .panels { grid-template-columns: 1fr; } }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel__head h2 { font-size: 1.15rem; color: var(--ink); }
.panel__head .tag { font-size: .72rem; font-weight: 700; color: var(--green-deep); background: rgba(118,184,42,.12); padding: 5px 10px; border-radius: 20px; }
.panel canvas { width: 100% !important; }

.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Sensores / tabla */
.sensors { display: grid; gap: 12px; }
.sensor {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px;
}
.sensor__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sensor__dot.ok { background: var(--green); box-shadow: 0 0 0 4px rgba(118,184,42,.18); }
.sensor__dot.warn { background: #e0a82e; box-shadow: 0 0 0 4px rgba(224,168,46,.18); }
.sensor__dot.bad { background: #c0492f; box-shadow: 0 0 0 4px rgba(192,73,47,.18); }
.sensor__name { font-weight: 600; font-size: .86rem; }
.sensor__meta { font-size: .74rem; color: var(--muted); }
.sensor__val { margin-left: auto; font-family: var(--display); font-weight: 700; font-size: 1.05rem; }

/* Tabla de alertas */
.dash-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.dash-table th {
  text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line);
}
.dash-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: var(--mist); }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.pill.ok { background: rgba(118,184,42,.14); color: var(--green-deep); }
.pill.warn { background: rgba(224,168,46,.16); color: #97670f; }
.pill.bad { background: rgba(192,73,47,.14); color: #a8381f; }

.section-gap { margin-top: 18px; }

/* Accesibilidad */
:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   FOOTER  (antes footer.js — ahora estilos en el tema)
   ============================================================ */
.site-footer { background: var(--night); color: #cdd3c4; font-family: var(--sans); }
.site-footer__inner {
  width: min(100% - 48px, var(--maxw)); margin-inline: auto;
  padding: 72px 0 40px; display: grid; gap: 40px;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
}
.site-footer h4 { font-family: var(--display); color: #fff; font-size: 1.35rem; font-weight: 700; margin: 0 0 22px; }
.site-footer__brand { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.site-footer__brand svg { width: 30px; height: 30px; color: #fff; }
.site-footer__brand span { font-weight: 800; font-size: 1.2rem; letter-spacing: .05em; color: #fff; }
.site-footer p, .site-footer li { font-size: .86rem; line-height: 1.7; color: #aeb6a2; margin: 0; }
.site-footer__purpose { margin-bottom: 26px; max-width: 340px; }
.site-footer__info { display: grid; gap: 14px; }
.site-footer__info dt { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; font-weight: 600; margin-bottom: 2px; }
.site-footer__info dd { margin: 0; font-size: .86rem; color: #aeb6a2; }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.site-footer__list a { color: #aeb6a2; font-size: .88rem; display: inline-flex; align-items: center; gap: 8px; transition: color .18s ease, transform .18s ease; }
.site-footer__list a::before { content: '›'; color: var(--green); font-weight: 700; }
.site-footer__list--plain a::before { display: none; }
.site-footer__list a:hover { color: var(--green-bright); transform: translateX(3px); }
.site-footer__partners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 300px; }
.site-footer__partner { background: #fff; border-radius: 8px; height: 62px; display: grid; place-items: center; color: var(--night); font-weight: 800; font-size: .7rem; letter-spacing: .02em; text-align: center; padding: 6px; transition: transform .18s ease, box-shadow .18s ease; }
.site-footer__partner:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.site-footer__partner small { display: block; font-weight: 600; font-size: .6rem; color: var(--green); }
.site-footer__social { display: flex; justify-content: center; gap: 14px; padding: 24px 0 4px; }
.site-footer__social a { width: 42px; height: 42px; border-radius: 8px; background: #2a3122; color: #fff; display: grid; place-items: center; transition: background .18s ease, transform .18s ease; }
.site-footer__social a:hover { background: var(--green); transform: translateY(-3px); }
.site-footer__social svg { width: 18px; height: 18px; }
.site-footer__bottom { border-top: 1px solid #2a3122; text-align: center; padding: 22px 0; font-size: .78rem; letter-spacing: .06em; color: #8c9580; }
@media (max-width: 900px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__inner { grid-template-columns: 1fr; } .site-footer__partners { max-width: 260px; } }
/* Breadcrumbs */
.breadcrumb {
  background: #f8faf6;
  padding: 0.8rem 0;
  border-bottom: 1px solid #eef1ea;
  font-size: 0.85rem;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: #b0b8a8;
}
.breadcrumb a {
  color: #4e7d1a;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb [aria-current="page"] {
  color: #4a5243;
  font-weight: 600;
}

/* Post detail */
/* .post-detail {
  max-width: 950px;

  margin: 0 auto;
}
.post-detail__header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.post-detail__meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  color: #6a7363;
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.post-detail__tag {
  background: #76b82a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
}
.post-detail__image {
  margin: 1.5rem 0;
  border-radius: 16px;
  overflow: hidden;
}
.post-detail__image img {
  /* width: 100%;
  height: auto;

  width: 900px;
  height: 500px;
  display: block;
}
.post-detail__resumo {
  font-size: 1.1rem;
  color: #4a5243;
  border-left: 4px solid #76b82a;
  padding-left: 1.2rem;
  margin: 1.5rem 0;
}
.post-detail__content {
  font-size: 1rem;
  line-height: 1.7;
  color: #2c3028;
}
.post-detail__content h2,
.post-detail__content h3 {
  margin-top: 2rem;
}
.post-detail__content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1rem 0;
}
.post-detail__footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eef1ea;
} */
 /* ============================================================
   POST DETAIL - PUBLICACIONES
   ============================================================ */

.post-detail {
  max-width: 950px;
  margin: 0 auto;
  padding: 30px 0;
}


/* Cabecera publicación */
.post-detail__header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}


.post-detail__meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  color: #6a7363;
  font-size: 0.9rem;
  flex-wrap: wrap;
}


/* Etiqueta */
.post-detail__tag {
  background: #76b82a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
}


/* ============================================================
   IMAGEN PRINCIPAL
   Tamaño fijo visual: 900x500
   ============================================================ */

.post-detail__image {
  width: 100%;
  margin: 1.5rem auto;
  border-radius: 16px;
  overflow: hidden;
}


.post-detail__image img {

  width: 900px;
  height: 700px;

  max-width: 100%;

  object-fit: cover;

  display: block;

  margin: 0 auto;
}


/* ============================================================
   RESUMEN
   ============================================================ */

.post-detail__resumo {

  font-size: 1.1rem;
  color: #4a5243;

  border-left: 4px solid #76b82a;

  padding-left: 1.2rem;

  margin: 1.5rem 0;
}


/* ============================================================
   CONTENIDO DE LA PUBLICACIÓN
   ============================================================ */

.post-detail__content {

  font-size: 1rem;
  line-height: 1.7;

  color: #2c3028;

}


.post-detail__content h2,
.post-detail__content h3 {

  margin-top: 2rem;

}




.post-detail__content img {

  width: 700px;

  height: 500px;

  max-width: 100%;

  object-fit: cover;

  display: block;

  margin: 25px auto;

  border-radius: 12px;

}


/* ============================================================
   FOOTER PUBLICACIÓN
   ============================================================ */

.post-detail__footer {

  margin-top: 2.5rem;

  padding-top: 1.5rem;

  border-top: 1px solid #eef1ea;

}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media(max-width:700px){

  .post-detail{
    padding:20px;
  }


  .post-detail__header h1{

    font-size:1.7rem;

  }


  .post-detail__image img{

    height:300px;

  }


  .post-detail__content img{

    height:220px;

  }

}
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.5rem;
  padding: 1rem 0;
}
.pager a, .pager .current {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8db;
  font-weight: 600;
  font-size: 0.85rem;
  color: #4a5442;
  text-decoration: none;
  transition: all 0.2s;
}
.pager a:hover {
  background: #76b82a;
  color: #fff;
  border-color: #76b82a;
}
.pager .current {
  background: #76b82a;
  color: #fff;
  border-color: #76b82a;
}