/* ═══════════════ EJES.CSS — Página de Ejes Productivos ═══════════════ */
/* Paleta: hereda variables de styles.css (verde provincial + dorado El Oro) */

/* ── Page Hero (compacto, fondo oscuro como ejes-preview del index) ── */
.page-hero {
    background: var(--verde-dark);
    padding: 130px 0 56px;
    color: var(--white);
    position: relative;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(26, 122, 90, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 15%, rgba(198, 160, 48, 0.06) 0%, transparent 50%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin: 12px 0 14px;
    line-height: 1.15;
    color: var(--white);
}
.page-hero-desc {
    font-size: 1.05rem;
    opacity: 0.75;
    max-width: 660px;
    line-height: 1.6;
}

/* ── Filtros ── */
.ejes-filters {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
    background: var(--white);
}
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
}
.filter-btn {
    background: var(--white);
    border: 1px solid var(--gray-200);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-body);
    color: var(--gray-600);
}
.filter-btn:hover {
    border-color: var(--verde-pref);
    color: var(--verde-pref);
}
.filter-btn--active {
    background: var(--verde-pref);
    color: var(--white);
    border-color: var(--verde-pref);
}
.filter-btn small {
    opacity: 0.7;
    font-size: 0.72rem;
}

/* ── Acordeón de Ejes ── */
.ejes-accordion {
    padding: 32px 0 60px;
    background: var(--off-white);
}

/* Separador de sección transversal */
.ejes-section-divider {
    margin: 40px 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}
.ejes-section-divider h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--verde-pref);
}
.ejes-section-divider p {
    font-size: 0.88rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ── Bloque de eje ── */
.eje-block {
    background: var(--white);
    border-radius: var(--r-md);
    margin-bottom: 12px;
    box-shadow: var(--shadow-xs);
    border-left: 4px solid var(--eje-color, var(--verde-pref));
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.eje-block:hover {
    box-shadow: var(--shadow-sm);
}

.eje-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    text-align: left;
}
.eje-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Ícono SVG del eje (replica el estilo del index) */
.eje-icon-sm {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--eje-color, var(--verde-pref));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.eje-icon-sm svg {
    width: 22px;
    height: 22px;
}

.eje-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--gray-800);
    margin: 0;
}
.eje-badge {
    background: var(--eje-color, var(--verde-pref));
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.02em;
}
.eje-chevron {
    transition: transform 0.3s;
    color: var(--gray-300);
    flex-shrink: 0;
}
.eje-block--open .eje-chevron {
    transform: rotate(180deg);
    color: var(--verde-pref);
}
.eje-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.eje-block--open .eje-body {
    max-height: 8000px;
}
.medidas-list {
    padding: 0 24px 24px;
}

/* ── Acordeón anidado: Medidas ── */
.medida {
    border: 1px solid var(--gray-100);
    border-radius: var(--r-sm);
    margin-bottom: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.medida:hover {
    border-color: var(--gray-200);
}
.medida-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--gray-50);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    text-align: left;
    gap: 12px;
}
.medida-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.medida-code {
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.medida-name {
    font-size: 0.88rem;
    color: var(--gray-700);
    font-weight: 500;
    line-height: 1.3;
}
.medida-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.medida-puntaje {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--verde-pref);
    font-weight: 700;
}
.medida-prio {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.prio-max { background: #fde8e8; color: #9b2c2c; }
.prio-alta { background: var(--oro-pale); color: var(--oro-deep); }
.prio-media { background: #e8f5e9; color: #2e7d32; }
.prio-baja { background: var(--gray-100); color: var(--gray-600); }
.medida-chevron {
    transition: transform 0.25s;
    color: var(--gray-300);
}
.medida--open .medida-chevron {
    transform: rotate(180deg);
}
.medida--open .medida-header {
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

/* ── Cuerpo de medida expandida ── */
.medida-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.medida--open .medida-body {
    max-height: 2000px;
}
.medida-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 14px 6px;
}
.meta-chip {
    background: var(--gray-50);
    padding: 4px 12px;
    border-radius: var(--r-sm);
    font-size: 0.78rem;
    color: var(--gray-600);
    border: 1px solid var(--gray-100);
}
.meta-chip strong {
    color: var(--verde-pref);
}
.medida-section {
    padding: 6px 14px;
}
.medida-section h4 {
    font-size: 0.78rem;
    color: var(--verde-pref);
    margin: 0 0 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.medida-section p {
    font-size: 0.86rem;
    color: var(--gray-700);
    line-height: 1.6;
    margin: 0 0 10px;
}
.actores-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-bottom: 12px;
}
.actor-tag {
    background: var(--gray-50);
    color: var(--verde-pref);
    font-size: 0.76rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid var(--gray-100);
}

/* ── Bloque de medidas transversales (sin acordeón padre) ── */
.trans-measures-block {
    background: var(--white);
    border-radius: var(--r-md);
    margin-bottom: 12px;
    box-shadow: var(--shadow-xs);
    border-left: 4px solid var(--eje-color, #6A1B9A);
    overflow: hidden;
}
.trans-measures-block .medidas-list--open {
    padding: 16px 24px 24px;
}

/* ── Empty state ── */
.no-results {
    text-align: center;
    color: var(--gray-500);
    padding: 20px;
    font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .eje-header { padding: 14px 16px; }
    .eje-title { font-size: 1.05rem; }
    .eje-icon-sm { width: 36px; height: 36px; }
    .eje-icon-sm svg { width: 18px; height: 18px; }
    .medida-header { flex-direction: column; align-items: flex-start; }
    .medida-header-right { width: 100%; justify-content: flex-start; margin-top: 6px; }
    .filters-bar { flex-direction: column; align-items: flex-start; }
}
