/* =========================================================
   FZ Panorama Jóvenes - Vista infografía v2
   Reemplaza completamente assets/panorama.css
   ========================================================= */

.fzpj-panorama,
.fzpj-panorama * {
    box-sizing: border-box;
}

.fzpj-panorama {
    --fzpj-blue-950: #0b2f6b;
    --fzpj-blue-900: #123d7c;
    --fzpj-blue-700: #2366b5;
    --fzpj-men: #1679c9;
    --fzpj-women: #e4559b;
    --fzpj-dark: #12170e;
    --fzpj-text: #132033;
    --fzpj-muted: #50627a;
    --fzpj-soft: #eef4fb;
    --fzpj-card: #ffffff;
    --fzpj-border: rgba(15, 23, 42, .11);
    
    display: block;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: clamp(10px, 1.4vw, 22px) clamp(10px, 1.4vw, 22px) 0;

    color: var(--fzpj-text);
    font-family: inherit;
    background: transparent;

}

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

.fzpj-panorama * {
    min-width: 0;
}

/* HERO */
.fzpj-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    padding: clamp(18px, 2.2vw, 34px) clamp(22px, 3vw, 48px);
    border-radius: 24px;
    background:
        radial-gradient(circle at 88% 32%, rgba(255,255,255,.16), transparent 25%),
        linear-gradient(135deg, var(--fzpj-blue-950), var(--fzpj-blue-700));
    color: #fff;
    box-shadow: var(--fzpj-shadow);
    overflow: hidden;
}

.fzpj-hero-text {
    flex: 1 1 auto;
    min-width: 0;
}

.fzpj-kicker {
    margin: 0 0 8px;
    color: rgba(255,255,255,.86);
    font-size: .72rem;
    line-height: 1.2;
    letter-spacing: .22em;
    text-transform: uppercase;
    font-weight: 800;
}

.fzpj-hero h2 {
    margin: 0;
    max-width: 1020px;
    color: #fff !important;
    font-size: clamp(2rem, 3.6vw, 4.4rem);
    line-height: 1.02;
    font-weight: 300;
    letter-spacing: -.035em;
}

.fzpj-hero h2 span,
.fzpj-hero h2 strong,
.fzpj-hero h2 em {
    color: #fff !important;
}

.fzpj-hero h2 span {
    display: inline;
}

.fzpj-hero h2 strong {
    display: inline;
    font-weight: 900;
}

.fzpj-hero h2 em {
    display: inline-block;
    margin-left: .18em;
    font-style: normal;
    font-weight: 300;
    white-space: nowrap;
}

.fzpj-cutoff {
    display: inline-flex;
    width: auto;
    margin: 14px 0 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    color: #fff !important;
    font-size: .8rem;
    line-height: 1;
    font-weight: 800;
}

.fzpj-hero-mark {
    flex: 0 0 auto;
    width: clamp(62px, 8vw, 96px);
    height: clamp(62px, 8vw, 96px);
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: clamp(2.2rem, 4vw, 3.7rem);
    line-height: 1;
    transform: rotate(12deg);
}

/* LAYOUT */
.fzpj-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 18px;
}

.fzpj-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    gap: 18px;
    align-items: stretch;
}

.fzpj-duo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.fzpj-rates-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

/* CARDS */
.fzpj-card,
.fzpj-empty-card,
.fzpj-index-card {
    border: 1px solid var(--fzpj-border);
    border-radius: 24px;
    background: var(--fzpj-card);
    box-shadow: var(--fzpj-shadow);
}

.fzpj-card,
.fzpj-empty-card {
    padding: clamp(18px, 2vw, 26px);
}

.fzpj-card h3 {
    margin: 0;
    color: #24344a;
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
    line-height: 1.16;
    font-weight: 800;
}

.fzpj-empty-card {
    display: grid;
    place-items: center;
    min-height: 170px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-weight: 800;
}

.fzpj-card-primary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    background: linear-gradient(135deg, #fff, #f1f7ff);
}

.fzpj-card-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: var(--fzpj-blue-700);
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

.fzpj-metric-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.fzpj-metric-row strong {
    color: var(--fzpj-blue-950);
    font-size: clamp(2rem, 3.6vw, 3.9rem);
    line-height: .9;
    font-weight: 900;
}

.fzpj-metric-row span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 999px;
    background: var(--fzpj-blue-700);
    color: #fff;
    font-weight: 900;
    line-height: 1;
}

.fzpj-card-education .fzpj-stat-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.fzpj-stat-block {
    padding: 16px 18px;
    border-radius: 18px;
    background: #eef4fb;
}

.fzpj-stat-block span {
    display: block;
    color: #40516a;
    font-size: .9rem;
    font-weight: 800;
}

.fzpj-stat-block strong {
    display: block;
    margin-top: 7px;
    color: var(--fzpj-blue-950);
    font-size: clamp(1.9rem, 3vw, 3rem);
    line-height: .95;
    font-weight: 900;
}

.fzpj-gender-row,
.fzpj-mini-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.fzpj-men,
.fzpj-women,
.fzpj-total,
.fzpj-big-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 13px;
    color: #fff;
    font-size: .92rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.fzpj-men { background: var(--fzpj-men); }
.fzpj-women { background: var(--fzpj-women); }
.fzpj-total { background: var(--fzpj-blue-700); }
.fzpj-total strong { margin-left: 6px; }

/* SECCIONES ANCHAS */
.fzpj-card-full {
    width: 100%;
}

.fzpj-section-header {
    margin: calc(clamp(18px, 2vw, 26px) * -1) calc(clamp(18px, 2vw, 26px) * -1) 20px;
    padding: 17px 20px;
    border-radius: 24px 24px 0 0;
    background: var(--fzpj-blue-950) !important;
    color: #fff;
    text-align: center;
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    font-weight: 900;
    line-height: 1.1;
}

.fzpj-segment-bar {
    display: flex;
    width: 100%;
    min-height: 48px;
    overflow: hidden;
    border-radius: 16px;
    background: transparent;
}

.fzpj-segment {
    display: grid;
    place-items: center;
    min-width: 38px;
    color: #fff;
    font-size: .86rem;
    font-weight: 900;
    text-shadow: 0 1px 7px rgba(0,0,0,.28);
}

.fzpj-legend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 26px;
    margin-top: 18px;
}

.fzpj-legend-item {
    display: grid;
    grid-template-columns: 13px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    color: #475569;
    font-size: .95rem;
}

.fzpj-legend-item i {
    width: 13px;
    height: 13px;
    border-radius: 999px;
}

.fzpj-legend-item strong {
    color: #111827;
    font-weight: 900;
}

.fzpj-reason-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.fzpj-reason-item {
    padding: clamp(16px, 2vw, 26px);
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .06);
}

.fzpj-reason-item h3 {
    margin: 0;
    color: #2f4158;
    font-size: clamp(1.1rem, 1.8vw, 1.7rem);
    line-height: 1.05;
}

.fzpj-jobs-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 26px;
}

.fzpj-jobs-list li {
    color: var(--fzpj-blue-700);
    font-size: clamp(.95rem, 1.25vw, 1.08rem);
    font-weight: 900;
}

.fzpj-jobs-list li span {
    color: #475569;
    font-weight: 700;
}

.fzpj-jobs-list li strong {
    display: inline-block;
    margin-left: 6px;
    color: var(--fzpj-blue-950);
    font-weight: 900;
}

/* TARJETAS CENTRALES Y TASAS */
.fzpj-small-metric-card,
.fzpj-rate-card {
    text-align: center;
    background: linear-gradient(180deg, #fff, #f9fbff);
}

.fzpj-small-metric-card .fzpj-gender-row,
.fzpj-rate-card .fzpj-mini-metrics {
    justify-content: center;
}

.fzpj-big-pill {
    margin: 18px auto 0;
    width: fit-content;
    min-height: 42px;
    padding: 9px 20px;
    background: var(--fzpj-blue-700);
    border-radius: 13px;
    font-size: clamp(1.3rem, 2.1vw, 2.05rem);
}

.fzpj-rate-card h3 {
    text-align: center;
    color: #26384d;
}

.fzpj-source,
.fzpj-note {
    margin: 14px 0 0;
    color: #64748b;
    font-size: .85rem;
    line-height: 1.45;
}


/* FOOTER */
.fzpj-footer {
    margin-top: 18px;
    padding: 20px clamp(18px, 2vw, 26px);
    border: 1px solid var(--fzpj-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 35, 70, .055);
}

.fzpj-logo-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px 26px;
}

.fzpj-logo-item {
    min-height: 42px;
    display: grid;
    place-items: center;
    color: #475569;
    font-weight: 800;
}

.fzpj-logo-item img {
    display: block;
    max-height: 46px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.fzpj-logo-item a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.fzpj-general-source,
.fzpj-footer-note {
    text-align: center;
}

/* ÍNDICE */
.fzpj-index-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.fzpj-index-card {
    display: block;
    padding: 22px;
    color: #142033;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}

.fzpj-index-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 45px rgba(15, 35, 70, .12);
}

.fzpj-index-card span {
    display: block;
    color: var(--fzpj-blue-700);
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 900;
}

.fzpj-index-card strong {
    display: block;
    margin-top: 8px;
    color: #111827;
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1;
}

.fzpj-index-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.fzpj-index-mini em,
.fzpj-index-card small {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef6ff;
    color: var(--fzpj-blue-700);
    font-style: normal;
    font-size: .82rem;
    font-weight: 800;
}

.fzpj-error {
    padding: 16px;
    border-radius: 14px;
    background: #fff4f4;
    color: #9f1239;
    font-weight: 700;
}




/* RESPONSIVE POR CONTENEDOR */
@container fzpjPanorama (max-width: 980px) {
    .fzpj-top-grid,
    .fzpj-duo-grid,
    .fzpj-rates-grid {
        grid-template-columns: 1fr !important;
    }

    .fzpj-card-education .fzpj-stat-stack,
    .fzpj-reason-grid,
    .fzpj-legend-grid,
    .fzpj-index-grid {
        grid-template-columns: 1fr !important;
    }

    .fzpj-hero h2 {
        font-size: clamp(1.8rem, 6cqw, 3.1rem);
    }
}

@container fzpjPanorama (max-width: 620px) {

    .fzpj-hero {
        padding: 20px 18px;
        border-radius: 18px;
    }

    .fzpj-kicker {
        font-size: .62rem;
        letter-spacing: .16em;
    }

    .fzpj-hero h2 {
        font-size: clamp(1.45rem, 8cqw, 2.25rem);
        line-height: 1.08;
    }

    .fzpj-hero h2 em {
        margin-left: 0;
        display: block;
    }

    .fzpj-cutoff {
        margin-top: 12px;
        padding: 5px 10px;
        font-size: .72rem;
    }

    .fzpj-hero-mark {
        display: none;
    }

    .fzpj-body,
    .fzpj-top-grid,
    .fzpj-duo-grid,
    .fzpj-rates-grid,
    .fzpj-reason-grid,
    .fzpj-index-grid {
        gap: 14px;
    }

    .fzpj-card,
    .fzpj-empty-card,
    .fzpj-footer,
    .fzpj-index-card {
        border-radius: 18px;
        padding: 16px;
    }

    .fzpj-card-primary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fzpj-card-icon {
        width: 54px;
        border-radius: 16px;
        font-size: 1.9rem;
    }

    .fzpj-metric-row strong {
        font-size: 2rem;
    }

    .fzpj-card-education .fzpj-stat-stack {
        gap: 10px;
    }

    .fzpj-stat-block {
        padding: 12px;
        border-radius: 14px;
    }

    .fzpj-stat-block strong {
        font-size: 1.55rem;
    }

    .fzpj-section-header {
        margin: -16px -16px 14px;
        padding: 12px 14px;
        border-radius: 18px 18px 0 0;
        font-size: .95rem;
    }

    .fzpj-segment-bar {
        min-height: 42px;
        border-radius: 12px;
    }

    .fzpj-segment {
        min-width: 30px;
        padding: 7px 2px;
        font-size: .62rem;
    }

    .fzpj-legend-item {
        grid-template-columns: 10px 1fr auto;
        gap: 8px;
        font-size: .78rem;
    }

    .fzpj-jobs-list {
        gap: 9px;
        padding-left: 18px;
        font-size: .82rem;
        line-height: 1.32;
    }

    .fzpj-reason-item {
        padding: 14px;
        border-radius: 16px;
    }

    .fzpj-reason-item h3,
    .fzpj-card h3 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .fzpj-gender-row,
    .fzpj-mini-metrics {
        justify-content: center;
        gap: 8px;
    }

    .fzpj-men,
    .fzpj-women,
    .fzpj-total,
    .fzpj-big-pill {
        min-height: 34px;
        padding: 8px 9px;
        border-radius: 11px;
        font-size: .78rem;
        flex: 1 1 auto;
    }

    .fzpj-big-pill {
        flex: 0 1 auto;
        font-size: 1.05rem;
        padding-inline: 14px;
    }

    .fzpj-source,
    .fzpj-note {
        font-size: .72rem;
        line-height: 1.35;
        text-align: center;
    }

    .fzpj-logo-row {
        gap: 10px 14px;
    }

    .fzpj-logo-item img {
        max-height: 34px;
        max-width: 110px;
    }

    .fzpj-logo-item {
        min-height: 32px;
        font-size: .72rem;
    }
}

/* FALLBACK RESPONSIVE POR PANTALLA */
@media (max-width: 980px) {
    .fzpj-top-grid,
    .fzpj-duo-grid,
    .fzpj-rates-grid,
    .fzpj-card-education .fzpj-stat-stack,
    .fzpj-reason-grid {
        grid-template-columns: 1fr;
    }

    .fzpj-index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .fzpj-index-grid {
        grid-template-columns: 1fr;
    }

    .fzpj-hero-mark {
        display: none;
    }

    .fzpj-hero h2 em {
        display: block;
        margin-left: 0;
    }
}

/* =========================================================
   Convención hombre / mujer en Educación superior
   ========================================================= */

.fzpj-higher-gender-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 16px;
}

.fzpj-higher-gender-line .fzpj-gender-row {
    margin-top: 0;
}

.fzpj-gender-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.fzpj-legend-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 9px;
    color: #ffffff;
    font-size: .95rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.fzpj-legend-men {
    background: var(--fzpj-men);
}

.fzpj-legend-women {
    background: var(--fzpj-women);
}

/* Mobile */
@media (max-width: 640px) {
    .fzpj-higher-gender-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .fzpj-gender-legend {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-left: 0;
    }

    .fzpj-legend-pill {
        min-height: 34px;
        padding: 8px 12px;
        font-size: .85rem;
    }
}
/* Título con ícono en una sola línea */
.fzpj-title-with-icon {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    line-height: 1.15 !important;
}

.fzpj-title-with-icon .fzpj-card-icon {
    flex: 0 0 auto !important;
    display: inline-grid !important;
    width: 30px !important;
    height: 30px !important;
    place-items: center !important;
    border-radius: 9px !important;
    font-size: 1.15rem !important;
    line-height: 1 !important;
}

.fzpj-title-with-icon span:last-child {
    display: inline !important;
    min-width: 0 !important;
}

/* =========================================================
   FIX MOBILE FOOTER - quitar espacio blanco después de logos
   ========================================================= */

@media (max-width: 760px) {
    .fzpj-panorama .fzpj-body {
        margin-bottom: 0 !important;
    }

    .fzpj-panorama .fzpj-footer {
        margin-top: 14px !important;
        margin-bottom: 0 !important;
        padding: 14px 16px 10px !important;
        min-height: 0 !important;
    }

    .fzpj-panorama .fzpj-logo-row {
        margin: 0 !important;
        padding: 0 !important;
        gap: 8px 12px !important;
    }

    .fzpj-panorama .fzpj-logo-item {
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .fzpj-panorama .fzpj-logo-item img {
        max-height: 30px !important;
        max-width: 105px !important;
        margin: 0 !important;
    }

    .fzpj-panorama .fzpj-general-source {
        margin: 8px 0 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    .elementor-widget-shortcode:has(.fzpj-panorama),
    .elementor-shortcode:has(.fzpj-panorama) {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* =========================================================
   FIX FINAL MOBILE FOOTER - Panorama Jóvenes
   ========================================================= */

@media (max-width: 767px) {
    html body .fzpj-panorama,
    html body .fzpj-panorama-v2 {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        background: transparent !important;
    }

    html body .fzpj-panorama-v2 .fzpj-body {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    html body .fzpj-panorama-v2 .fzpj-footer {
        margin: 12px 0 0 !important;
        padding: 12px 12px 6px !important;
        min-height: 0 !important;
        height: auto !important;
        line-height: 1 !important;
    }

    html body .fzpj-panorama-v2 .fzpj-logo-row {
        margin: 0 !important;
        padding: 0 !important;
        gap: 6px 10px !important;
        line-height: 0 !important;
    }

    html body .fzpj-panorama-v2 .fzpj-logo-item {
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
    }

    html body .fzpj-panorama-v2 .fzpj-logo-item img {
        display: block !important;
        max-height: 26px !important;
        max-width: 100px !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        object-fit: contain !important;
    }

    html body .fzpj-panorama-v2 .fzpj-general-source {
        margin: 6px 0 0 !important;
        padding: 0 !important;
        font-size: .68rem !important;
        line-height: 1.1 !important;
    }

    html body .elementor-shortcode,
    html body .elementor-widget-shortcode,
    html body .elementor-widget-shortcode .elementor-widget-container {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        min-height: 0 !important;
        height: auto !important;
    }
}
