/* Layout principal */
.transp-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Panel de info legal */
.transp-info {
  position: sticky;
  top: 80px;
}

.transp-law-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.transp-law-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.transp-law-card h3 i {
  color: var(--gold);
}

.transp-law-card p {
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Alerta Gobierno Abierto */
.transp-alert {
  background: var(--gold-pale);
  border: 1px solid #e8d078;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.transp-alert p {
  font-size: .8rem;
  color: var(--gray-700);
  line-height: 1.65;
  margin: 0;
}

.transp-alert a {
  color: var(--blue-light);
  font-weight: 600;
}

.transp-alert a:hover {
  color: var(--navy);
}

/* Árbol de acordeones */
.transp-tree {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

/* Nivel 1 – Año */
.year-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t);
}

.year-item.open {
  box-shadow: var(--shadow);
}

.year-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  letter-spacing: .4px;
  transition: background var(--t), color var(--t);
}

.year-btn:hover {
  background: var(--gray-50);
}

.year-item.open .year-btn {
  background: var(--navy);
  color: #fff;
}

.year-btn-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.year-btn-left i {
  color: var(--gold);
  font-size: .85rem;
}

.year-item.open .year-btn-left i {
  color: var(--gold-light);
}

.year-chevron {
  font-size: .75rem;
  transition: transform var(--t);
  color: var(--gray-400);
}

.year-item.open .year-chevron {
  transform: rotate(180deg);
  color: rgba(255, 255, 255, .6);
}
.year-item.open .year-body {
  max-height: none;      /* crece todo lo que necesite */
  overflow: visible;     /* no recorta el contenido interno */
}

/* ── Año: contenedor colapsable ── */
.year-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.year-body-inner {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

/* Nivel 2 – Mes */
.month-item {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
}

.month-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 1rem;
  font-size: .83rem;
  font-weight: 600;
  color: var(--gray-700);
  font-family: 'Inter', sans-serif;
  transition: background var(--t), color var(--t);
}

.month-btn:hover {
  background: var(--gray-50);
}

.month-item.open .month-btn {
  background: var(--navy-mid);
  color: #fff;
}

.month-btn-left {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.month-btn-left i {
  color: var(--gold);
  font-size: .65rem;
}

.month-item.open .month-btn-left i {
  color: var(--gold-light);
}

.month-chevron {
  font-size: .65rem;
  color: var(--gray-400);
  transition: transform var(--t);
}

.month-item.open .month-chevron {
  transform: rotate(180deg);
  color: rgba(255, 255, 255, .5);
}
.month-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
/* Cuando está abierto: el JS pone el valor exacto */
.month-item.open .month-body {
  overflow: visible;
}

.month-body-inner {
  padding: .6rem .85rem .75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  background: var(--gray-50);
}

/* Nivel 3 – Documento */
.doc-link {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .38rem .5rem;
  font-size: .8rem;
  color: var(--gray-700);
  border-radius: 4px;
  transition: background var(--t), color var(--t);
  text-decoration: none;
  line-height: 1.45;
}

.doc-link i {
  color: var(--blue-light);
  font-size: .65rem;
  margin-top: .25rem;
  flex-shrink: 0;
}

.doc-link:hover {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
  .transp-layout {
    grid-template-columns: 1fr;
  }

  .transp-info {
    position: static;
  }
}