/* ── FUENTES ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;700&display=swap');

/* ── BASE ─────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    font-family: 'Outfit', sans-serif;
    color: #E8E8EE;
    max-width: 100%;
    overflow-x: clip;
    background-color: #050608;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at 10% 10%, rgba(255, 99, 33, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(30, 127, 216, 0.03) 0%, transparent 50%),
        #050608;
    min-height: 100vh;
}

main {
    max-width: 100%;
    overflow-x: clip;
    padding: 0 20px 40px;
}

/* ── TIPOGRAFÍA ───────────────────────────────────── */
h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #F1F1F5;
    margin-bottom: 0.2rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #E2E2EB;
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #CCCCDA;
}

/* ── TICKER MODERNO ────────────────────────────── */
.ticker-wrap {
    background: #0D0F14;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-badge {
    background: #FF6321;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.ticker-scroll {
    overflow: hidden;
    flex: 1;
}

.ticker-text {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 40s linear infinite;
    font-size: 0.85rem;
    color: #B0B0C0;
    font-weight: 500;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* ── TAB NAVIGATION ────────────────────────────── */
.tab-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    background: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin: 20px auto 4rem auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    width: fit-content;
    max-width: calc(100vw - 40px);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    position: sticky;
    top: 10px;
    z-index: 100;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    border-radius: 20px;
    padding: 12px 32px;
    background: transparent;
    color: #8B949E;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid transparent;
    height: auto;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.tab-btn.active {
    background: rgba(255, 99, 33, 0.1);
    color: #FF6321;
    border: 1px solid rgba(255, 99, 33, 0.3);
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 99, 33, 0.1);
}

/* ── TAB PANELS ────────────────────────────────── */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ── PAGE HERO ──────────────────────────────────── */
.page-hero {
    margin-bottom: 32px;
}

.page-hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #FF6321;
    margin-bottom: 6px;
}

.page-hero-title {
    font-size: 2rem;
    font-weight: 900;
    color: #F4F4F8;
    letter-spacing: -0.8px;
    line-height: 1.2;
    margin: 0 0 6px;
}

.page-hero-sub {
    font-size: 0.9rem;
    color: #6B7280;
    margin: 0;
}

/* ── SECTION HEADER ──────────────────────────────── */
.sec-head {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6B7280;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── COLUMN GRIDS ──────────────────────────────── */
.cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.cols-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

/* ── METRIC CARD ─────────────────────────────────── */
.metric-card {
    background: #12151E;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 22px 20px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #FF6321, #FF9158);
    border-radius: 3px 0 0 3px;
}

.metric-card:hover {
    border-color: rgba(255, 99, 33, 0.35);
    transform: translateY(-2px);
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #8B949E;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.metric-delta {
    font-size: 0.78rem;
    color: #6B7280;
    margin-top: 4px;
}

/* ── CARDS ────────────────────────────────────────── */
.card {
    background: #12151E;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 16px;
}

.card-accent {
    border-left: 3px solid #FF6321;
}

.card-green {
    border-left: 3px solid #10B981;
}

.card-blue {
    border-left: 3px solid #3B82F6;
}

.card-red {
    border-left: 3px solid #EF4444;
}

/* ── DATO PILL ────────────────────────────────────── */
.dato-pill {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #12151E;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: #C4C4D4;
    line-height: 1.5;
}

.dato-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── PROGRESS BARS ────────────────────────────────── */
.prog-wrap {
    margin-bottom: 16px;
}

.prog-label {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.85rem;
    color: #9CA3AF;
    margin-bottom: 6px;
    font-weight: 500;
    gap: 10px;
}

/* ── PROY GRID ───────────────────────────────────── */
.proy-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.prog-bar-bg {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    height: 8px;
    overflow: hidden;
}

.prog-bar-fill {
    height: 100%;
    border-radius: 50px;
}

/* ── CONSULTA CARD ────────────────────────────────── */
.consulta-card {
    background: #12151E;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 22px 20px 6px;
    margin-bottom: 8px;
}

.consulta-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6B7280;
    margin-bottom: 6px;
}

.consulta-winner {
    font-size: 1.3rem;
    font-weight: 800;
    color: #F4F4F8;
    margin-bottom: 2px;
}

.consulta-votes {
    font-size: 0.82rem;
    color: #6B7280;
    font-variant-numeric: tabular-nums;
    margin-bottom: 14px;
}

/* ── CANDIDATE ROW (consultas) ─────────────────────── */
.cand-row {
    margin-bottom: 14px;
}

.cand-row-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
    gap: 10px;
}

.cand-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #D1D1D1;
}

.cand-winner {
    color: #F4F4F8;
    font-weight: 800;
}

.cand-votes {
    font-size: 0.78rem;
    color: #6B7280;
    font-variant-numeric: tabular-nums;
}

.cand-bar-bg {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    height: 6px;
    overflow: hidden;
}

.cand-bar-fill {
    height: 100%;
    border-radius: 50px;
}

/* ── BLOG / ANÁLISIS ─────────────────────────────── */
.blog-hero {
    text-align: center;
    padding: 56px 20px 40px;
    margin-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-hero-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #FF6321;
    margin-bottom: 16px;
}

.blog-hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    color: #F4F4F8;
    margin-bottom: 14px;
}

.blog-hero-sub {
    font-size: 1.15rem;
    color: #6B7280;
    font-style: italic;
}

.blog-card {
    background: #12151E;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 36px;
    margin-bottom: 24px;
    border-left: 3px solid #FF6321;
}

.blog-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #F4F4F8;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.blog-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #9CA3AF;
}

.blog-verdict {
    background: rgba(255, 99, 33, 0.07);
    border-left: 3px solid #FF6321;
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
    font-size: 0.95rem;
    color: #FFA07A;
    font-style: italic;
}

/* ── EXPANDER ─────────────────────────────────────── */
details.expander {
    background: #12151E;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    margin-bottom: 6px;
    overflow: hidden;
}

details.expander>summary {
    padding: 12px 18px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #F4F4F8;
    background: #12151E;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

details.expander>summary::-webkit-details-marker {
    display: none;
}

details.expander>summary::after {
    content: '›';
    margin-left: auto;
    font-size: 1.2rem;
    color: #FF6321;
    transition: transform 0.2s;
    transform: rotate(90deg);
}

details.expander[open]>summary::after {
    transform: rotate(-90deg);
}

details.expander>summary:hover {
    color: #FF6321;
    background: rgba(255, 99, 33, 0.05);
}

details.expander>.expander-body {
    padding: 0 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── PARTIDO CARD ─────────────────────────────────── */
.pc-wrap {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 14px;
    overflow: hidden;
}

.pc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #12151E;
    flex-wrap: wrap;
    gap: 10px;
}

.pc-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pc-curules-box {
    border-radius: 10px;
    padding: 8px 14px;
    text-align: center;
    min-width: 60px;
}

.pc-curules-num {
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
}

.pc-curules-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.pc-name {
    font-size: 1rem;
    font-weight: 800;
    color: #F4F4F8;
}

.pc-tipo {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 3px;
}

.pc-right {
    text-align: right;
}

.pc-votos {
    font-size: 0.95rem;
    font-weight: 700;
    color: #D1D1D1;
    font-variant-numeric: tabular-nums;
}

.pc-pct {
    font-size: 0.72rem;
    color: #4B5563;
    margin-top: 2px;
}

.pc-bar-bg {
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
}

.pc-senators {
    background: #0E1018;
    padding: 14px 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pc-senator-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #374151;
    margin-bottom: 8px;
}

.pc-chip {
    display: inline-block;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    padding: 4px 10px;
    margin: 2px 2px;
    font-size: 0.77rem;
    color: #9CA3AF;
}

.pc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pc-row-name {
    font-size: 0.82rem;
    color: #D1D1D1;
}

.pc-row-votes {
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pc-list-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 12px 14px;
    margin-top: 8px;
    overflow: hidden;
}

.pc-votes-note {
    font-size: 0.68rem;
    color: #6B7280;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.pc-table-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 0 0 10px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pc-table-head-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: #4B5563;
    font-weight: 700;
}

.pc-table-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pc-table-row:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.pc-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #F4F4F8;
    font-size: 0.76rem;
    font-weight: 800;
    margin-right: 10px;
    vertical-align: middle;
}

.pc-candidate-name {
    color: #F4F4F8;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
}

.pc-candidate-meta {
    color: #7C8798;
    font-size: 0.8rem;
    margin-top: 5px;
    line-height: 1.35;
}

.pc-candidate-votes {
    text-align: right;
    color: #F4F4F8;
    font-size: 0.98rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pc-candidate-votes-note {
    color: #6B7280;
    font-size: 0.72rem;
    margin-top: 4px;
    text-align: right;
}

/* ── CHAT PREMIUM ────────────────────────────────── */
.chat-hero {
    background: linear-gradient(135deg, #0D1117 0%, #050608 100%);
    border: 1px solid rgba(255, 99, 33, 0.2);
    border-radius: 24px;
    padding: 8px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.chat-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 99, 33, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.chat-hero-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 20px rgba(255, 99, 33, 0.3));
    animation: float 3s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.chat-hero-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #F4F4F8;
    margin: 0 0 8px;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #FFFFFF, #FF6321);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chat-hero-sub {
    font-size: 0.82rem;
    color: #8B949E;
    margin: 0;
    max-width: 500px;
    line-height: 1.5;
}

.chat-badge {
    display: inline-block;
    background: rgba(255, 99, 33, 0.1);
    color: #FF6321;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 99, 33, 0.2);
}

.chat-shell {
    background: linear-gradient(180deg, rgba(18, 21, 30, 0.82) 0%, rgba(10, 12, 18, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 6px;
    border-radius: 14px;
    margin: 10px 0 8px;
}

.chat-messages {
    height: 180px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: #1E2535 transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #1E2535;
    border-radius: 2px;
}

.chat-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-bubble {
    max-width: 80%;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.7;
}

.chat-message.user .chat-bubble {
    background: rgba(255, 99, 33, 0.12);
    border: 1px solid rgba(255, 99, 33, 0.2);
    color: #F4F4F8;
    border-radius: 14px 14px 4px 14px;
}

.chat-message.assistant .chat-bubble {
    background: #12151E;
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #D1D1D1;
    border-radius: 14px 14px 14px 4px;
}

.chat-bubble p {
    margin: 0 0 8px;
}

.chat-bubble p:last-child {
    margin-bottom: 0;
}

.chat-bubble strong {
    color: #F4F4F8;
}

.chat-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.88rem;
}

.chat-bubble th {
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 10px;
    text-align: left;
    color: #9CA3AF;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-bubble td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input-wrap {
    display: flex;
    padding: 6px;
    gap: 6px;
    margin-top: 6px;
}

#chat-input {
    flex: 1;
    background: #12151E;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #E8E8EE;
    font-size: 0.85rem;
    padding: 8px 12px;
    min-height: 36px;
    max-height: 80px;
    transition: border-color 0.2s;
    outline: none;
}

#chat-input:focus {
    border-color: rgba(255, 99, 33, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 99, 33, 0.08);
}

#chat-input::placeholder {
    color: #4B5563;
}

#chat-send-btn {
    background: #FF6321;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 20px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-send-btn:hover {
    background: #e55510;
    transform: translateY(-1px);
}

#chat-send-btn:disabled {
    background: #2D3748;
    cursor: not-allowed;
    transform: none;
}

.chat-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.suggestion-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6B7280;
    margin-bottom: 4px;
}

.suggestion-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    color: #9CA3AF;
    font-size: 0.88rem;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    width: 100%;
}

.suggestion-btn:hover {
    background: rgba(255, 99, 33, 0.08);
    border-color: rgba(255, 99, 33, 0.2);
    color: #F4F4F8;
}

.chat-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 8px 0;
}

.chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FF6321;
    animation: typing-dot 1.4s infinite;
    opacity: 0.4;
}

.chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-dot {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* ── PROMO DIALOG (MODAL) ──────────────────────── */
.promo-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.promo-overlay.active {
    display: flex;
}

.promo-dialog {
    background: #12151E;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    position: relative;
}

.promo-dialog h2 {
    font-size: 1.5rem;
    font-weight: 900;
    color: #F4F4F8;
    margin: 0 0 12px;
}

.promo-dialog p {
    color: #8B949E;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 20px;
}

.promo-dialog .info-box {
    background: rgba(30, 127, 216, 0.08);
    border: 1px solid rgba(30, 127, 216, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #93C5FD;
    margin-bottom: 24px;
    line-height: 1.5;
}

.promo-dialog .info-box a {
    color: #FF6321;
    text-decoration: none;
    font-weight: 700;
}

.btn-primary {
    display: block;
    width: 100%;
    background: #FF6321;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary:hover {
    background: #e55510;
    transform: translateY(-1px);
}

/* ── ANALYSIS SECTION ──────────────────────────── */
.analysis-hero {
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.analysis-backdrop-year {
    position: absolute;
    top: -50px;
    left: -20px;
    font-size: 15rem;
    color: rgba(255, 99, 33, 0.03);
    font-weight: 900;
    pointer-events: none;
    z-index: 0;
    font-family: 'Outfit', sans-serif;
}

.analysis-summary-card {
    background: linear-gradient(135deg, rgba(255, 99, 33, 0.1) 0%, rgba(30, 127, 216, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 50px;
    margin-bottom: 40px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    max-width: 100%;
    box-sizing: border-box;
}

.analysis-summary-icon {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 12rem;
    opacity: 0.04;
    font-weight: 900;
    transform: rotate(15deg);
}

/* ── MASTER CARD / INICIO HERO ─────────────────── */
.master-card {
    background: radial-gradient(circle at top right, rgba(255, 99, 33, 0.1) 0%, transparent 40%),
        radial-gradient(circle at bottom left, rgba(30, 127, 216, 0.1) 0%, transparent 40%),
        linear-gradient(135deg, #0D1117 0%, #050608 100%);
    border-radius: 0;
    padding: 80px 40px;
    width: 100%;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.master-card-badge {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: #FF6321;
    background: rgba(255, 99, 33, 0.1);
    padding: 12px 30px;
    border-radius: 100px;
    border: 1px solid rgba(255, 99, 33, 0.3);
    margin-bottom: 40px;
    box-shadow: 0 0 40px rgba(255, 99, 33, 0.15);
}

.master-card-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 0.9;
    margin-bottom: 2rem;
    background: linear-gradient(180deg, #FFFFFF 40%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    width: 100%;
}

.master-card-subtitle {
    font-size: clamp(1rem, 3vw, 1.6rem);
    color: #8B949E;
    max-width: 850px;
    margin-bottom: clamp(2rem, 5vh, 70px);
    line-height: 1.5;
    font-weight: 300;
    padding: 0 20px;
}

.stats-hub {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 5vw, 100px);
    margin-bottom: clamp(20px, 8vh, 100px);
    padding: clamp(20px, 5vw, 60px) clamp(10px, 8vw, 100px);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    width: 90%;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: clamp(1.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: #F4F4F8;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-value.accent {
    color: #FF6321;
}

.stat-label {
    font-size: clamp(0.5rem, 2vw, 0.85rem);
    color: #484F58;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.nav-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 40px 30px;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #FF6321;
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.nav-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.nav-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #F4F4F8;
    margin-bottom: 10px;
}

.nav-desc {
    font-size: 0.9rem;
    color: #8B949E;
    line-height: 1.4;
}

/* ── INFO BOX ────────────────────────────────────── */
.info-box-blue {
    background: rgba(30, 127, 216, 0.08);
    border: 1px solid rgba(30, 127, 216, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    color: #93C5FD;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.info-box-orange {
    background: rgba(255, 99, 33, 0.07);
    border: 1px solid rgba(255, 99, 33, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    color: #FFA07A;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.info-box-green {
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    color: #6EE7B7;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* ── CUSTOM FOOTER ───────────────────────────────── */
.custom-footer {
    margin-top: 20px;
    padding: 30px 20px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.custom-footer a:hover {
    color: #FF6321 !important;
}

/* ── DIVIDER ─────────────────────────────────────── */
.divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 24px 0;
}

/* ── CAPTION ──────────────────────────────────────── */
.caption {
    color: #4B5563;
    font-size: 0.78rem;
    margin-top: 8px;
}

/* ── FACTOR CARD ─────────────────────────────────── */
.factor-card {
    background: #0E1018;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-left: 3px solid #FF6321;
}

.factor-name {
    font-weight: 700;
    color: #FF6321;
    font-size: 0.9rem;
}

.factor-desc {
    color: #9CA3AF;
    font-size: 0.87rem;
    line-height: 1.6;
    margin-top: 4px;
}

/* ── SCROLLBAR GLOBAL ────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #1E2535;
    border-radius: 3px;
}

/* ── RESPONSIVE ───────────────────────────────────── */
.mobile-only {
    display: none;
}

.magico-subtext {
    font-size: 0.85rem;
    color: #6B7280;
    margin-left: 32px;
    margin-top: 4px;
}

@media (max-width: 1024px) {
    .master-card-title {
        font-size: 5rem;
        letter-spacing: -3px;
    }

    .stats-hub {
        gap: 40px;
        padding: 40px;
    }

    .stat-value {
        font-size: 3rem;
    }

    .cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .magico-subtext {
        margin-left: 0;
        margin-top: 8px;
        font-size: 0.75rem;
    }

    main {
        padding: 0 12px 40px;
    }

    .master-card {
        padding: 60px 16px;
        min-height: auto;
    }

    .master-card-title {
        font-size: 3.5rem;
        letter-spacing: -2px;
    }

    .master-card-subtitle {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }

    .stats-hub {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px;
        margin-bottom: 50px;
        border-radius: 20px;
        width: 100%;
    }

    .stat-value {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .nav-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .nav-item {
        padding: 25px;
        border-radius: 20px;
    }

    .nav-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .tab-nav {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 15px;
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        margin-bottom: 2rem;
        padding: 8px;
        gap: 8px;
        overflow-x: visible;
        position: static;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 0.82rem;
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
        min-width: 0;
        text-align: center;
    }

    .chat-hero {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 10px;
    }

    .chat-hero-icon {
        font-size: 2.2rem;
        margin-bottom: 5px;
    }

    .chat-hero-sub {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .master-card-badge {
        font-size: 0.7rem;
        padding: 8px 20px;
        letter-spacing: 2px;
    }

    .analysis-hero {
        margin-bottom: 28px;
    }

    .analysis-backdrop-year {
        font-size: 6rem;
        left: 0;
        top: -5px;
    }

    .analysis-summary-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .analysis-summary-icon {
        font-size: 5rem;
        top: -6px;
        right: -6px;
    }

    .cols-2,
    .cols-3,
    .cols-4,
    .proy-grid {
        grid-template-columns: 1fr;
    }

    .prog-label,
    .cand-row-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .cand-votes,
    .prog-label span:last-child {
        font-size: 0.8rem;
    }

    .metric-value {
        font-size: 1.4rem;
    }

    .metric-label {
        font-size: 0.65rem;
    }

    .pc-table-row,
    .pc-table-head {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .pc-candidate-votes,
    .pc-candidate-votes-note {
        text-align: left;
    }

    .pc-candidate-votes {
        font-size: 0.9rem;
    }

    .res-header-title {
        font-size: 2.5rem !important;
        letter-spacing: -2px !important;
    }

    .res-header-sub {
        font-size: 0.65rem !important;
        letter-spacing: 3px !important;
    }
}