/*
  Estilos compartidos por todos los componentes de la libreria.
  Se cargan dentro del Shadow DOM, asi que NO heredan las clases del sitio.
  Solo heredan propiedades marcadas como `inherit` y las variables del sitio.
*/

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

:host {
  display: block;
  /* Hereda la tipografia del contenedor de Webflow donde se coloque */
  font-family: inherit;
  color: inherit;
}

/* AcordeonesPorCategoria — cosmético.
   Layout crítico (grid, sticky, listas) va inline desde el componente.
   Ítems de mes y acordeones se estilizan en Webflow: viven en light DOM.
   La tabla generada (.agp-tabla) se estiliza desde el CSS del sitio. */

.agp {
  width: 100%;
}

.agp-main {
  min-width: 0;
}

/* ---- sidebar: grupos (años) ---- */
.agp-grupo + .agp-grupo {
  margin-top: 1rem;
}

.agp-grupo__boton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0;
  margin: 0 0 0.5rem;
  background: none;
  border: 0;
  box-shadow: inset 0 -1px 0 currentColor;
  font: inherit;
  font-weight: 600;
  font-size: 1.05em;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.agp-grupo__flecha {
  width: 0.55em;
  height: 0.55em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.agp-grupo__boton[aria-expanded="true"] .agp-grupo__flecha {
  transform: rotate(-135deg);
}

/* ---- secciones ---- */
.agp-ano {
  margin: 0 0 1.5rem;
  font-size: 28px;
  line-height: 1.2;
}

.agp-seccion + .agp-ano {
  margin-top: 3.5rem;
}

.agp-seccion {
  margin: 0 0 2.5rem;
}

.agp-seccion:last-of-type {
  margin-bottom: 0;
}

.agp-titulo {
  margin: 0 0 1rem;
  font-size: 22px;
  line-height: 1.25;
}

.agp-nota {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .agp-grupo__flecha {
    transition: none;
  }
}
