/* =============================================
   TRANSPARENCIA — Izquierda Española
   ============================================= */

@font-face {
    font-family: 'RedditSans';
    src: url('/wp-content/themes/astra-child/fonts/RedditSans-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}
@font-face {
    font-family: 'RedditSans';
    src: url('/wp-content/themes/astra-child/fonts/RedditSans-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
}

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

/* Romper el contenedor que fuerza Astra */
.transp-page,
.transp-page ~ *,
#content .transp-page,
.ast-container .transp-page,
.site-content .transp-page {
    width: 100%;
}

/* Forzar que el wrapper de Astra no limite el ancho */
#page #content,
#page .ast-container,
.site-content > .ast-container,
.entry-content,
.post-content {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

.transp-page {
    font-family: 'RedditSans', sans-serif;
    background: #f7f5f2;
    color: #1a1a1a;
    overflow-x: hidden;
}

/* ── Container ── */
.transp-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* ── HERO ── */
.transp-hero {
    background: #e52c21;
    color: white;
    position: relative;
    padding: 44px 0 52px;
    overflow: hidden;
}

.transp-hero::before {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}

.transp-hero::after {
    content: '';
    position: absolute;
    left: 40%;
    bottom: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

.transp-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5vw;
    position: relative;
    z-index: 1;
}

.transp-hero-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}

.transp-hero-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 20px;
    color: white !important;
}

.transp-hero-sub {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.65;
    color: rgba(255,255,255,0.82);
    max-width: 560px;
}

.transp-hero-stripe {
    display: none;
}

/* ── SELECTOR ── */
.transp-selector-wrap {
    background: white;
    border-bottom: 1px solid #e8e4e0;
    position: sticky;
    top: 68px;
    z-index: 100;
}

.transp-selector-wrap .transp-container {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 60px;
}

.transp-selector-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
    flex-shrink: 0;
}

.transp-year-tabs {
    display: flex;
    gap: 4px;
}

.transp-year-tab {
    font-family: 'RedditSans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 20px;
    border: 1.5px solid transparent;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.18s;
    letter-spacing: 0.01em;
}

.transp-year-tab:hover {
    background: #f7f5f2;
    color: #1a1a1a;
}

.transp-year-tab.activo {
    background: #e52c21;
    color: white;
    border-color: #e52c21;
}

/* ── MAIN CONTENT ── */
.transp-main {
    padding: 56px 5vw;
}

/* ── RESUMEN NARRATIVO ── */
.transp-narrative {
    background: white;
    border-radius: 16px;
    padding: 36px 40px;
    margin-bottom: 40px;
    border-left: 5px solid #e52c21;
    position: relative;
    overflow: hidden;
}

.transp-narrative::after {
    content: '"';
    position: absolute;
    right: 32px;
    top: -8px;
    font-size: 140px;
    font-weight: 900;
    color: #f7f5f2;
    line-height: 1;
    pointer-events: none;
    font-family: Georgia, serif;
}

.transp-narrative-year {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #e52c21;
    margin-bottom: 10px;
}

.transp-narrative p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    max-width: 720px;
    position: relative;
    z-index: 1;
}

/* ── MÉTRICAS GRID ── */
.transp-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.transp-metric-card {
    background: white;
    border-radius: 14px;
    padding: 28px 28px 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}

.transp-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.transp-metric-card.acento {
    background: #e52c21;
    color: white;
}

.transp-metric-card.deficit {
    background: #1a1a1a;
    color: white;
}

.transp-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 17px;
}

.transp-metric-card:not(.acento):not(.deficit) .transp-metric-icon {
    background: #f7f5f2;
}

.transp-metric-card.acento .transp-metric-icon {
    background: rgba(255,255,255,0.2);
}

.transp-metric-card.deficit .transp-metric-icon {
    background: rgba(255,255,255,0.12);
}

.transp-metric-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #888;
}

.transp-metric-card.acento .transp-metric-label,
.transp-metric-card.deficit .transp-metric-label {
    color: rgba(255,255,255,0.65);
}

.transp-metric-valor {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #1a1a1a;
    transition: all 0.6s;
}

.transp-metric-card.acento .transp-metric-valor,
.transp-metric-card.deficit .transp-metric-valor {
    color: white;
}

.transp-metric-sub {
    font-size: 0.78rem;
    color: #aaa;
    margin-top: 6px;
}

.transp-metric-card.acento .transp-metric-sub,
.transp-metric-card.deficit .transp-metric-sub {
    color: rgba(255,255,255,0.55);
}

/* ── DOS COLUMNAS ── */
.transp-dos-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 720px) {
    .transp-dos-col { grid-template-columns: 1fr; }
}

/* ── PANEL GENÉRICO ── */
.transp-panel {
    background: white;
    border-radius: 16px;
    padding: 32px;
}

.transp-panel-titulo {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #e52c21;
    margin-bottom: 20px;
}

/* ── GRÁFICO BARRAS ── */
.transp-chart-wrap {
    position: relative;
    width: 100%;
    height: 280px;
}

/* ── DESGLOSE LISTA ── */
.transp-desglose-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0ede9;
}

.transp-desglose-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.transp-desglose-barra-wrap {
    flex: 1;
    height: 6px;
    background: #f0ede9;
    border-radius: 3px;
    overflow: hidden;
}

.transp-desglose-barra {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    width: 0;
}

.transp-desglose-nombre {
    font-size: 0.88rem;
    font-weight: 500;
    color: #333;
    min-width: 160px;
}

.transp-desglose-valor {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a1a1a;
    min-width: 90px;
    text-align: right;
}

/* ── SECCIÓN DEUDA ── */
.transp-deuda-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .transp-deuda-grid { grid-template-columns: 1fr; }
}

.transp-prestamo-card {
    border: 1.5px solid #e8e4e0;
    border-radius: 12px;
    padding: 18px 20px;
}

.transp-prestamo-num {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #e52c21;
    margin-bottom: 10px;
}

.transp-prestamo-dato {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.transp-prestamo-desc {
    font-size: 0.78rem;
    color: #888;
    margin-top: 4px;
}

.transp-prestamo-estado {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0ede9;
}

/* ── DONACIONES ── */
.transp-don-total {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 20px;
}

.transp-don-cifra {
    font-size: 2.4rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.03em;
}

.transp-don-desc {
    font-size: 0.9rem;
    color: #888;
}

.transp-don-lista {
    list-style: none;
}

.transp-don-lista li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0ede9;
    font-size: 0.9rem;
    color: #444;
}

.transp-don-lista li:last-child { border-bottom: none; }

.transp-don-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e52c21;
    flex-shrink: 0;
}

/* ── DESCARGA PDF (botón inline en selector) ── */
.transp-btn-pdf-inline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    flex-shrink: 0;
    font-family: 'RedditSans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e52c21 !important;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #e52c21;
    transition: background 0.18s, color 0.18s;
    letter-spacing: 0.01em;
}

.transp-btn-pdf-inline:hover {
    background: #e52c21;
    color: white !important;
}

.transp-btn-pdf-inline svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

/* ── DESCARGA PDF (caja grande — oculta, reemplazada por botón inline) ── */
.transp-descarga-wrap {
    display: none;
}

.transp-descarga-texto h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.transp-descarga-texto p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
}

.transp-btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #e52c21;
    color: white !important;
    text-decoration: none;
    font-family: 'RedditSans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.18s, transform 0.18s;
    flex-shrink: 0;
}

.transp-btn-pdf:hover {
    background: #c9251a;
    transform: translateY(-1px);
    color: white !important;
}

.transp-btn-pdf svg {
    width: 18px;
    height: 18px;
    stroke: white;
    fill: none;
}

/* ── Botón PDF compacto en la barra del selector ── */
.transp-btn-pdf-inline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    background: transparent;
    color: #e52c21 !important;
    text-decoration: none;
    font-family: 'RedditSans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1.5px solid #e52c21;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    flex-shrink: 0;
    white-space: nowrap;
}

.transp-btn-pdf-inline:hover {
    background: #e52c21;
    color: white !important;
}

.transp-btn-pdf-inline svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    transition: stroke 0.18s;
}

/* ── NOTA LEGAL ── */
.transp-nota {
    font-size: 0.78rem;
    color: #aaa;
    line-height: 1.6;
    border-top: 1px solid #e8e4e0;
    padding-top: 24px;
    margin-bottom: 48px;
}

/* ── ANIMACIÓN ENTRADA ── */
.transp-fade-in {
    animation: transpFadeIn 0.4s ease both;
}

@keyframes transpFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.transp-fade-in:nth-child(1) { animation-delay: 0ms; }
.transp-fade-in:nth-child(2) { animation-delay: 60ms; }
.transp-fade-in:nth-child(3) { animation-delay: 120ms; }
.transp-fade-in:nth-child(4) { animation-delay: 180ms; }
.transp-fade-in:nth-child(5) { animation-delay: 240ms; }
.transp-fade-in:nth-child(6) { animation-delay: 300ms; }

/* ── Responsive ── */
@media (max-width: 860px) {
    .transp-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .transp-hero { padding: 48px 0 56px; }
    .transp-narrative { padding: 24px 24px; }
    .transp-panel { padding: 24px 20px; }
    .transp-main { padding: 36px 5vw; }
    .transp-metrics { grid-template-columns: 1fr; }
    .transp-selector-wrap .transp-container { flex-wrap: wrap; height: auto; padding: 12px 5vw; gap: 10px; }
    .transp-btn-pdf-inline { margin-left: 0; }
}