/* =========================================================
   Cooperativa Eléctrica de Guerrico — hoja de estilos
   Paleta y tipografía pensadas para una cooperativa de
   energía de pueblo: verde del campo, cobre de los
   conductores, trigo de la llanura circundante.
   ========================================================= */

:root {
  /* ---- color ---- */
  --cielo:        #2D6A3A; /* verde cooperativo — cabecera, pie, textos fuertes */
  --cielo-2:      #3A8048; /* variante para degradés / hover sobre cielo */
  --cobre:        #C1692C; /* cobre del conductor — acento primario, CTA */
  --cobre-oscuro: #9C4F1E;
  --alfalfa:      #5B7A4C; /* verde de alfalfa — estados positivos, chips */
  --trigo:        #F4EEDD; /* trigal pálido — fondo general */
  --papel:        #FFFDF8; /* blanco cálido — tarjetas, paneles */
  --linea:        #CBB98B; /* color de la "línea eléctrica" divisoria */
  --tinta:        #262220; /* grafito — texto de cuerpo */
  --tinta-suave:  #5B564E; /* texto secundario */
  --borde:        #E4D9BC;
  --alerta:       #B3401E;

  /* ---- tipografía ---- */
  --f-display: 'Fraunces', 'Georgia', serif;
  --f-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* ---- layout ---- */
  --ancho-maximo: 1180px;
  --radio: 6px;
  --sombra: 0 10px 30px rgba(26, 60, 42, 0.10);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f-body);
  background: var(--trigo);
  color: var(--tinta);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--cobre-oscuro); text-decoration-thickness: 1.5px; }
a:hover { color: var(--cobre); }

:focus-visible {
  outline: 3px solid var(--cobre);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--cielo);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--tinta); }
.lead { font-size: 1.15rem; color: var(--tinta-suave); max-width: 60ch; }

.eyebrow {
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--cobre-oscuro);
  font-weight: 600;
}

.container {
  max-width: var(--ancho-maximo);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.seccion { padding: 4.5rem 0; }
.seccion--ajustada { padding: 3rem 0; }
.seccion--panel { background: var(--trigo); }

.seccion--historia .container { max-width: 120ch; }
.seccion--historia .container {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.15);
  padding: 3rem 3.5rem;
}
.seccion--historia h2 { text-align: center; }
.seccion--historia p {
  font-size: 1.2rem;
  text-align: justify;
  line-height: 1.7;
}
@media (max-width: 640px) {
  .seccion--historia .container { padding: 2rem 1.5rem; border-radius: 16px; }
  .seccion--historia p { font-size: 1.05rem; text-align: left; }
}

/* =========================================================
   Divisor "línea eléctrica" — elemento de firma del sitio.
   Un cable con leve catenaria y aisladores, a modo de poste
   a poste, separando secciones como los tendidos del pueblo.
   ========================================================= */
.tendido {
  display: block;
  width: 100%;
  height: 28px;
  color: var(--linea);
}
.tendido--oscuro { color: rgba(255,255,255,0.28); }
.tendido path { stroke: currentColor; }
.tendido circle { fill: currentColor; }

/* =========================================================
   Cabecera / navegación — panel de tablero
   ========================================================= */
.cabecera {
  background: #012B4C;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.nav-principal .container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.7rem;
  padding-bottom: 0.6rem;
}
.nav-principal__fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.marca {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
}
.marca__icono {
  width: 48px; height: 48px;
  flex-shrink: 0;
}
.marca__texto {
  font-family: var(--f-display);
  font-size: 1.6rem;
  line-height: 1.2;
}
.marca__texto strong { font-weight: 600; }
.marca__destacado { font-size: 1.8rem; }

.menu {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0.2rem 0 0;
}
.menu a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radio);
  transition: background 0.15s ease, color 0.15s ease;
}
.menu a:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* interruptor: punto que se "enciende" en cobre en la página activa */
.menu .interruptor {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.menu a[aria-current="page"] {
  color: #fff;
  background: rgba(193, 105, 44, 0.22);
}
.menu a[aria-current="page"] .interruptor {
  background: var(--cobre);
  box-shadow: 0 0 0 3px rgba(193, 105, 44, 0.3);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radio);
  width: 42px; height: 38px;
  cursor: pointer;
  position: relative;
}
.menu-toggle span, .menu-toggle::before, .menu-toggle::after {
  content: "";
  position: absolute;
  left: 9px; right: 9px;
  height: 2px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle::before { top: 12px; }
.menu-toggle span { top: 18px; }
.menu-toggle::after { top: 24px; }
.menu-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }
.menu-toggle[aria-expanded="true"] span { opacity: 0; }

@media (max-width: 880px) {
  .menu-toggle { display: block; }
  .nav-principal__fila { flex-wrap: wrap; }
  .menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0.5rem 0 0.25rem;
    gap: 0.1rem;
  }
  .menu a { justify-content: center; padding: 0.55rem 0.75rem; }
  .menu.abierto { display: flex; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url("../img/coop.jpg") center / cover no-repeat;
  color: #fff;
  padding: 4.5rem 0 3rem;
  height: min(360px, 45vh);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
.hero .eyebrow { color: #F5D742; font-size: 1.8rem; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,0.35); }
.hero h1 { color: #fff; }
.hero .lead { color: #fff; text-align: center; margin-inline: auto; text-shadow: 0 1px 3px rgba(0,0,0,0.3); font-size: 1.5rem; }
.hero__acciones { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.6rem; }

.hero--simple .container { grid-template-columns: 1fr; text-align: left; }
.hero--simple { padding: 4.5rem 0 3rem; }

@media (max-width: 880px) {
  .hero .container { grid-template-columns: 1fr; }
}

.hero__panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 1.75rem;
}
.hero__panel h3 { color: #fff; font-family: var(--f-mono); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--linea); margin-bottom: 1rem; }
.hero__stat { display: flex; justify-content: space-between; align-items: baseline; padding: 0.6rem 0; border-bottom: 1px dashed rgba(255,255,255,0.18); }
.hero__stat:last-child { border-bottom: none; }
.hero__stat b { font-family: var(--f-display); font-size: 1.5rem; color: #fff; font-weight: 500; }
.hero__stat span { font-size: 0.85rem; color: rgba(255,255,255,0.65); }

/* =========================================================
   Botones
   ========================================================= */
.boton {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.3rem;
  border-radius: var(--radio);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.boton:hover { transform: translateY(-1px); }
.boton--cobre { background: var(--cobre); color: #fff; }
.boton--cobre:hover { background: var(--cobre-oscuro); color: #fff; }
.boton--fantasma { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.boton--fantasma:hover { background: rgba(255,255,255,0.1); color: #fff; }
.boton--linea { background: transparent; color: var(--cobre-oscuro); border-color: var(--cobre-oscuro); }
.boton--linea:hover { background: var(--cobre); color: #fff; border-color: var(--cobre); }

/* =========================================================
   Accesos rápidos (tablero de fichas tipo llave térmica)
   ========================================================= */
.tablero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
@media (max-width: 980px) { .tablero { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tablero { grid-template-columns: 1fr; } }

.ficha {
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--tinta);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ficha:hover {
  box-shadow: var(--sombra);
  border-color: var(--cobre);
  transform: translateY(-3px);
  color: var(--tinta);
}
.ficha__llave {
  width: 34px; height: 34px;
  border-radius: 6px;
  background: var(--trigo);
  border: 1px solid var(--borde);
  display: flex; align-items: center; justify-content: center;
  color: var(--cobre-oscuro);
  transition: background 0.15s ease, color 0.15s ease;
}
.ficha:hover .ficha__llave { background: var(--cobre); color: #fff; }
.ficha__llave svg { width: 18px; height: 18px; }
.ficha h3 { margin-bottom: 0.15rem; font-size: 1.05rem; }
.ficha p { color: var(--tinta-suave); font-size: 0.92rem; margin: 0; }
.ficha__ir { font-family: var(--f-mono); font-size: 0.78rem; color: var(--cobre-oscuro); letter-spacing: 0.03em; }

/* =========================================================
   Tarjetas genéricas / noticias / comunidad
   ========================================================= */
.grilla {
  display: grid;
  gap: 1.75rem;
}
.grilla--3 { grid-template-columns: repeat(3, 1fr); }
.grilla--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grilla--3, .grilla--2 { grid-template-columns: 1fr; } }

.tarjeta {
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tarjeta__media {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--trigo), var(--linea));
  display: flex; align-items: center; justify-content: center;
  color: var(--cobre-oscuro);
}
.tarjeta__cuerpo { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.tarjeta__fecha { font-family: var(--f-mono); font-size: 0.75rem; color: var(--tinta-suave); text-transform: uppercase; letter-spacing: 0.05em; }
.tarjeta h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.tarjeta p { color: var(--tinta-suave); font-size: 0.92rem; }
.tarjeta__mas { margin-top: auto; font-size: 0.88rem; font-weight: 600; text-decoration: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(91, 122, 76, 0.14);
  color: var(--alfalfa);
  width: fit-content;
}
.chip--cobre { background: rgba(193, 105, 44, 0.14); color: var(--cobre-oscuro); }
.chip--alerta { background: rgba(179, 64, 30, 0.12); color: var(--alerta); }

/* =========================================================
   Paneles informativos / valores / historia
   ========================================================= */
.panel-info {
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 1.75rem;
}

.linea-tiempo { border-left: 2px solid var(--linea); margin-left: 0.4rem; padding-left: 1.75rem; display: flex; flex-direction: column; gap: 2rem; }
.hito { position: relative; }
.hito::before {
  content: "";
  position: absolute; left: -2.06rem; top: 0.3rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--cobre); border: 3px solid var(--trigo);
}
.hito__anio { font-family: var(--f-mono); color: var(--cobre-oscuro); font-weight: 600; font-size: 0.85rem; }

/* =========================================================
   Tablas tarifarias
   ========================================================= */
.tabla-wrap { overflow-x: auto; border: 1px solid var(--borde); border-radius: 10px; background: var(--papel); }
table.tarifas { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 560px; }
table.tarifas caption { text-align: left; padding: 1.1rem 1.25rem 0; font-family: var(--f-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--tinta-suave); }
table.tarifas thead th {
  background: var(--cielo);
  color: #fff;
  text-align: left;
  padding: 0.85rem 1.1rem;
  font-weight: 600;
  font-size: 0.85rem;
}
table.tarifas tbody td { padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--borde); font-family: var(--f-mono); }
table.tarifas tbody td:first-child { font-family: var(--f-body); font-weight: 600; }
table.tarifas tbody tr:last-child td { border-bottom: none; }
table.tarifas tbody tr:hover td { background: var(--trigo); }

/* =========================================================
   Formularios
   ========================================================= */
.formulario { display: grid; gap: 1.1rem; }
.campo { display: flex; flex-direction: column; gap: 0.4rem; }
.campo label { font-size: 0.85rem; font-weight: 600; color: var(--cielo); }
.campo input, .campo select, .campo textarea {
  font-family: var(--f-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--papel);
  color: var(--tinta);
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  border-color: var(--cobre);
}
.formulario__fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 620px) { .formulario__fila { grid-template-columns: 1fr; } }

/* =========================================================
   Contacto — datos institucionales
   ========================================================= */
.datos-contacto { display: grid; gap: 1.25rem; }
.dato { display: flex; gap: 0.9rem; align-items: flex-start; }
.dato__icono {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 8px;
  background: var(--trigo);
  color: var(--cobre-oscuro);
  display: flex; align-items: center; justify-content: center;
}
.dato__icono svg { width: 18px; height: 18px; }
.dato h4 { margin: 0 0 0.15rem; font-family: var(--f-body); color: var(--cielo); font-size: 0.98rem; }
.dato p { margin: 0; color: var(--tinta-suave); font-size: 0.92rem; }

.mapa-marcador {
  aspect-ratio: 16/9;
  border-radius: 10px;
  border: 1px solid var(--borde);
  background:
    repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(203,185,139,0.35) 24px),
    repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(203,185,139,0.35) 24px),
    var(--papel);
  display: flex; align-items: center; justify-content: center;
  color: var(--tinta-suave);
  font-family: var(--f-mono); font-size: 0.85rem; text-align: center; padding: 1rem;
}

/* =========================================================
   Sección banda cobre (CTA)
   ========================================================= */
.banda-cta {
  background: var(--cobre);
  color: #fff;
  padding: 3rem 0;
}
.banda-cta .container { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.banda-cta h2 { color: #fff; margin: 0 0 0.3rem; }
.banda-cta p { color: rgba(255,255,255,0.88); margin: 0; }

/* =========================================================
   Pie de página
   ========================================================= */
.pie { background: var(--cielo); color: rgba(255,255,255,0.78); padding: 3.5rem 0 0; font-size: 1rem; }
.pie .container { display: grid; grid-template-columns: 1.3fr 1fr 1.05fr; gap: 3rem; padding-bottom: 2.5rem; }
@media (max-width: 880px) { .pie .container { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
@media (max-width: 560px) { .pie .container { grid-template-columns: 1fr; } }
.pie h4 { color: #fff; font-family: var(--f-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 1.25rem; }
.pie .pie__contacto h4 { margin: 1rem 0 0.5rem; }
.pie__descripcion { color: rgba(255,255,255,0.85); font-size: 0.95rem; line-height: 1.65; max-width: 40ch; }
.pie__marca { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1rem; }
.pie__marca svg { width: 38px; height: 38px; color: #F5D742; }
.pie__marca strong { font-family: var(--f-display); color: #fff; font-size: 1.25rem; line-height: 1.2; }
.pie__contacto { display: flex; flex-direction: column; gap: 0.55rem; }
.pie__item { display: flex; align-items: flex-start; gap: 0.55rem; margin: 0; color: rgba(255,255,255,0.85); font-size: 0.95rem; line-height: 1.5; }
.pie__item svg { width: 15px; height: 15px; flex: none; margin-top: 0.2em; color: #F5D742; }
.pie__item strong { color: #fff; font-weight: 600; }
.pie__item a { color: #F5D742; text-decoration: none; }
.pie__item a:hover { text-decoration: underline; }
.pie__etiqueta { margin: 0.35rem 0 0; font-family: var(--f-mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; color: #F5D742; }
.pie .pie__base { border-top: 1px solid rgba(255,255,255,0.12); padding: 1.25rem 0; font-size: 0.82rem; display: flex; justify-content: center; text-align: center; color: rgba(255,255,255,0.55); line-height: 1.6; }

/* =========================================================
   Migas de pan / cabecera de sección interior
   ========================================================= */
.migas { font-family: var(--f-mono); font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-bottom: 0.8rem; }
.migas a { color: rgba(255,255,255,0.7); text-decoration: none; }
.migas a:hover { color: #fff; }

.encabezado-seccion { margin-bottom: 2.5rem; }
.encabezado-seccion .lead { margin-top: 0.6rem; }

/* utilidades */
.centrado { text-align: center; }
.mt-0 { margin-top: 0; }
.solo-lectura-nota { font-size: 0.85rem; color: var(--tinta-suave); font-style: italic; }

/* =========================================================
   Carrusel de imágenes
   ========================================================= */
.carrusel { position: relative; max-width: 960px; margin: 0 auto; }
.seccion--historia .carrusel { margin-top: 2.5rem; }
.carrusel__vista { overflow: hidden; border-radius: var(--radio); box-shadow: var(--sombra); background: var(--papel); }
.carrusel__pista { display: flex; transition: transform 0.45s ease; }
.carrusel__slide { flex: 0 0 100%; margin: 0; position: relative; }
.carrusel__slide img { width: 100%; height: 440px; object-fit: cover; display: block; }
.carrusel__slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0; padding: 0.8rem 1.2rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  color: #fff; font-size: 0.95rem;
}
.carrusel__boton {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--tinta);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  box-shadow: var(--sombra); display: grid; place-items: center;
}
.carrusel__boton:hover { background: #fff; color: var(--cobre-oscuro); }
.carrusel__boton--atras { left: 12px; }
.carrusel__boton--adelante { right: 12px; }
.carrusel__puntos { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.carrusel__punto {
  width: 10px; height: 10px; border-radius: 50%; border: 0;
  background: var(--borde); cursor: pointer; padding: 0;
}
.carrusel__punto[aria-selected="true"] { background: var(--cobre); }
@media (max-width: 640px) {
  .carrusel__slide img { height: 260px; }
  .carrusel__boton { width: 38px; height: 38px; }
}