/* ============================================================
 * transparencia.css — Portal de Transparencia público
 * G1 v1.2 — refactor de transparencia.php (Lote 14)
 *
 * Cromática: la página usa color SEMÁNTICAMENTE (verde=ingresos,
 * rojo=gastos, ámbar=donantes, etc.). Los tokens canónicos del
 * sistema (slate, blue, success, danger, warning) cubren la
 * mayoría. Los hex literales restantes son colores de la paleta
 * Tailwind sin equivalente exacto en _tokens.css y se mantienen
 * documentados aquí, siguiendo el patrón ya usado en
 * scientific-news.css (--amber, --evidence-high, etc.)
 * ============================================================ */

:root {
    /* ── Tier 500 (mid) — colores principales por sección ── */
    --emerald-500:  #10b981;  /* "Recaudado para investigación" / milestones completados */
    --amber-500:    #f59e0b;  /* "Donantes" / información económica */
    --cyan-500:     #06b6d4;  /* sección Accesibilidad */
    --orange-500:   #f97316;  /* gradient "ayuda directa a pacientes" */
    --indigo-500:   #6366f1;  /* gradient "gastos operativos" */

    /* ── Fondos suaves (50 tier) — sin equivalente en _tokens.css ── */
    --bg-red-soft:    #fef2f2;  /* fondos suaves de gastos */
    --bg-green-soft:  #f0fdf4;  /* fondos suaves de ingresos */
    --bg-violet-soft: #f5f3ff;  /* banner comité de evaluación */

    /* ── Tier 600-900 (oscuros) — sin equivalente en _tokens.css ── */
    --emerald-900:    #064e3b;  /* texto del banner de compromiso */
    --blue-800:       #1e40af;  /* texto de ley-ref */
    --blue-700-tw:    #1d4ed8;  /* gradient Tailwind blue-700 (≠ canon #0056a3) */
    --blue-hero-mid:  #1e3a5f;  /* color medio del gradient hero */
    --teal-700:       #0f766e;  /* gradient normativa */
    --cyan-700:       #0891b2;  /* gradient accesibilidad */
    --pink-600:       #db2777;  /* gradient contracts */
    --red-700:        #b91c1c;  /* gradient memoria */
    --violet-700:     #6d28d9;  /* heading committee banner */
}

/* ============================================================
 * 1. SCROLL & SECTIONS
 * ============================================================ */
html { scroll-behavior: smooth; }
.transp-section[id] { scroll-margin-top: 80px; }
.transp-section { padding: 50px 0; }
.transp-section:nth-child(even) { background: var(--bg-body); }

/* Layout helpers — anchuras de container por sección */
.transp-section .container--narrow  { max-width: 800px; }
.transp-section .container--medium  { max-width: 900px; }
.transp-legal-footer .container--narrow {
    max-width: 800px;
    text-align: center;
}

/* Spacing helpers usados puntualmente (en lugar de inline) */
.research-card__area-wrap { margin-top: 6px; }
.research-card__progress  { margin-bottom: 15px; }

/* ============================================================
 * 2. HERO
 * ============================================================ */
.transp-hero {
    background: linear-gradient(135deg, var(--color-slate-900), var(--blue-hero-mid));
    padding: 60px 0;
    color: white;
}
.transp-hero h1 {
    font-weight: 800;
    font-size: 2.2rem;
    margin-bottom: 10px;
}
.transp-hero p {
    opacity: 0.8;
    font-size: 1.05rem;
    max-width: 700px;
}
.transp-hero-eyebrow {
    opacity: 0.6;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

/* ============================================================
 * 3. SECTION TITLES & SUBTITLES
 * ============================================================ */
.section-title {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* Section title icons — color por temática semántica */
.section-icon-economic   { color: var(--amber-500); }
.section-icon-contracts  { color: var(--color-pink); }
.section-icon-governance { color: var(--color-violet); }
.section-icon-donor      { color: var(--color-danger); }
.section-icon-memory     { color: var(--color-danger); }
.section-icon-research   { color: var(--color-blue-400); }
.section-icon-access     { color: var(--cyan-500); }

/* ============================================================
 * 4. IMPACT CARDS (números grandes)
 * ============================================================ */
.impact-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}
.impact-card:hover { transform: translateY(-3px); }
.impact-num {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
}
.impact-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 500;
}

/* Impact number colors — semánticos por tipo de dato */
.impact-num--income       { color: var(--color-success); }
.impact-num--expense      { color: var(--color-danger); }
.impact-num--patients     { color: var(--color-blue-400); }
.impact-num--donors       { color: var(--amber-500); }
.impact-num--socios       { color: var(--color-teal); }
.impact-num--campaigns    { color: var(--color-violet); }
.impact-num--pct          { color: var(--color-teal); }
.impact-num--research-pri { color: var(--color-blue-400); }
.impact-num--research-sec { color: var(--emerald-500); }
.impact-num--research-ter { color: var(--color-violet-dark); }

/* ============================================================
 * 5. DOCUMENT CARDS (links a documentación)
 * ============================================================ */
.doc-card {
    background: white;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--bg-subtle);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}
.doc-card:hover {
    border-color: var(--color-teal);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}
.doc-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}
.doc-title {
    font-weight: 700;
    font-size: 0.95rem;
}
.doc-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Document icon gradients — color por temática */
.doc-icon--organization { background: linear-gradient(135deg, var(--color-blue-400), var(--blue-700-tw)); }
.doc-icon--governance   { background: linear-gradient(135deg, var(--color-violet), var(--color-violet-dark)); }
.doc-icon--norms        { background: linear-gradient(135deg, var(--color-teal), var(--teal-700)); }
.doc-icon--financial    { background: linear-gradient(135deg, var(--amber-500), var(--color-warning)); }
.doc-icon--contracts    { background: linear-gradient(135deg, var(--color-pink), var(--pink-600)); }
.doc-icon--memory       { background: linear-gradient(135deg, var(--color-danger), var(--red-700)); }
.doc-icon--research     { background: linear-gradient(135deg, var(--color-blue-400), var(--color-blue-500)); }
.doc-icon--complaints   { background: linear-gradient(135deg, var(--color-slate-500), var(--color-slate-600)); }
.doc-icon--access       { background: linear-gradient(135deg, var(--cyan-500), var(--cyan-700)); }

/* ============================================================
 * 6. FUND DISTRIBUTION BAR
 * ============================================================ */
.fund-bar {
    height: 22px;
    border-radius: 11px;
    overflow: hidden;
    background: var(--bg-subtle);
    margin-bottom: 8px;
}
.fund-bar-fill {
    height: 100%;
    border-radius: 11px;
    transition: width 1.5s ease;
}
.fund-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.fund-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Fund gradients — semánticos */
.fund-fill--patients { background: linear-gradient(135deg, var(--color-danger), var(--orange-500)); }
.fund-fill--ops      { background: linear-gradient(135deg, var(--color-violet), var(--indigo-500)); }

/* ============================================================
 * 7. COMMITMENT BANNER (verde "Nuestro compromiso")
 * ============================================================ */
.commitment-banner {
    background: var(--bg-green-soft);
    border-radius: 14px;
    padding: 20px;
    margin-top: 20px;
}
.commitment-banner h6 {
    font-weight: 700;
    color: var(--color-success-dark);
}
.commitment-banner p {
    color: var(--emerald-900);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================================
 * 8. LEGAL REFERENCE BOX (referencia a Ley 19/2013)
 * ============================================================ */
.ley-ref {
    background: var(--bg-blue-soft);
    border-left: 4px solid var(--color-blue-400);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    font-size: 0.85rem;
    color: var(--blue-800);
    margin-bottom: 25px;
}

/* ============================================================
 * 9. FINANCIAL TABLE (P&L simplificado)
 * ============================================================ */
.financial-table {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    max-width: 650px;
    margin: 0 auto 30px;
}
.financial-header {
    padding: 12px 20px;
    font-weight: 700;
}
.financial-header--income {
    background: var(--bg-green-soft);
    color: var(--color-success);
}
.financial-header--expense {
    background: var(--bg-red-soft);
    color: var(--color-danger);
}
.financial-row {
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--bg-subtle);
}
.financial-row__amount { font-weight: 600; }
.financial-total {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    font-weight: 800;
}
.financial-total--income {
    background: var(--bg-green-soft);
    color: var(--color-success);
}
.financial-total--expense {
    background: var(--bg-red-soft);
    color: var(--color-danger);
}
.financial-result {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 1.05rem;
}
.financial-result--positive {
    background: var(--bg-blue-soft);
    color: var(--blue-700-tw);
}
.financial-result--negative {
    background: var(--bg-red-soft);
    color: var(--color-danger);
}

/* ============================================================
 * 10. CONTRACTS BLOCK (caja blanca con texto)
 * ============================================================ */
.info-card {
    background: white;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}
.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.info-card p:last-child { margin-bottom: 0; }

/* ============================================================
 * 11. GOVERNANCE MEMBERS
 * ============================================================ */
.governance-member { text-align: center; }
.governance-member h6 {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-top: 10px;
    margin-bottom: 2px;
}
.governance-member p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.governance-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
}
.governance-avatar--president { background: linear-gradient(135deg, var(--color-danger), var(--orange-500)); }
.governance-avatar--treasurer { background: linear-gradient(135deg, var(--color-blue-400), var(--indigo-500)); }
.governance-avatar--secretary { background: linear-gradient(135deg, var(--color-teal), var(--color-success)); }

/* Committee banner (caja violeta tras los miembros) */
.committee-banner {
    background: var(--bg-violet-soft);
    border-radius: 14px;
    padding: 20px;
    margin-top: 25px;
    text-align: center;
}
.committee-banner h6 {
    font-weight: 700;
    color: var(--violet-700);
}
.committee-banner p {
    color: var(--color-violet-dark);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================================
 * 12. DONOR WALL
 * ============================================================ */
.donor-wall-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    margin: 4px;
    color: var(--text-primary);
}
.donor-wall-item__icon {
    color: var(--color-danger);
    font-size: 0.7rem;
}
.donor-cta-btn {
    background: linear-gradient(135deg, var(--color-danger), var(--orange-500));
    color: white;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
}
.donor-cta-btn:hover {
    color: white;
    opacity: 0.92;
}

/* ============================================================
 * 13. ANNUAL REPORT (memoria)
 * ============================================================ */
.memory-card {
    background: white;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}
.memory-card h5 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}
.memory-card h6 {
    font-weight: 700;
}
.memory-card h6.is-care     { color: var(--color-success); }
.memory-card h6.is-platform { color: var(--color-blue-400); }
.memory-card h6.is-mission  { color: var(--color-violet); }
.memory-card ul,
.memory-card ol {
    color: var(--color-slate-600);
    font-size: 0.9rem;
    line-height: 2;
}

/* ============================================================
 * 14. RESEARCH PROJECTS
 * ============================================================ */
.research-empty {
    background: white;
    border-radius: 14px;
    padding: 40px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    text-align: center;
}
.research-empty__icon-wrap {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--bg-blue-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.research-empty__icon-wrap i {
    font-size: 1.8rem;
    color: var(--color-blue-400);
}
.research-empty h5 {
    font-weight: 700;
    color: var(--text-primary);
}
.research-empty p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}
.research-empty__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 24px;
    background: var(--color-blue-400);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}
.research-empty__cta:hover { color: white; opacity: 0.92; }

.research-card {
    background: white;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    /* border-left aplicado inline porque es data-driven ($rpColor) */
}
.research-card__title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.research-card__meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.research-card__area {
    padding: 3px 10px;
    background: var(--bg-blue-soft);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-blue-400);
}
.research-card__desc {
    color: var(--color-slate-600);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}
.research-card__website {
    font-size: 0.85rem;
    color: var(--color-blue-400);
    font-weight: 600;
    text-decoration: none;
}
.research-card__progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}
.research-card__raised {
    font-weight: 700;
    color: var(--text-primary);
}
.research-card__goal { color: var(--color-slate-400); }
.research-card__donors {
    font-size: 0.8rem;
    color: var(--color-slate-400);
    margin-top: 4px;
}

/* Status badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.status-badge--completed {
    background: var(--color-success-soft);
    color: var(--color-success-dark);
}
.status-badge--ongoing {
    background: var(--bg-blue-soft);
    color: var(--color-blue-400);
}

/* Milestones */
.milestones-block {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--bg-subtle);
}
.milestones-block h6 {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.milestones-list {
    display: grid;
    gap: 8px;
}
.milestone-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}
.milestone-row__title {
    flex: 1;
    color: var(--color-slate-600);
}
.milestone-row__title.is-completed {
    text-decoration: line-through;
    opacity: 0.7;
}
.milestone-row__date {
    color: var(--color-slate-400);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.milestone-row__amount {
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}
.milestone-icon {
    flex-shrink: 0;
}
.milestone-icon--completed   { color: var(--emerald-500); }
.milestone-icon--in-progress { color: var(--amber-500); }
.milestone-icon--pending     { color: var(--color-slate-300); }

/* ============================================================
 * 15. ACCESSIBILITY SECTION
 * ============================================================ */
.access-card {
    background: white;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}
.access-card h6 {
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 25px;
    margin-bottom: 10px;
}
.access-card h6:first-child { margin-top: 0; margin-bottom: 15px; }
.access-card p,
.access-card ul {
    color: var(--color-slate-600);
    font-size: 0.9rem;
}
.access-card ul { line-height: 2; }
.access-card p:last-child { margin-bottom: 0; }

/* ============================================================
 * 16. LEGAL FOOTER (banda inferior negra)
 * ============================================================ */
.transp-legal-footer {
    background: var(--color-slate-900);
    color: white;
    padding: 35px 0;
}
.transp-legal-footer p { margin: 0; }
.transp-legal-footer__main {
    opacity: 0.7;
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.transp-legal-footer__sub {
    opacity: 0.5;
    font-size: 0.8rem;
}
