:root {
    --bg-main: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --indigo-400: #6366f1;
    --indigo-500: #4f46e5;
    --emerald-400: #10b981;
    --rose-400: #f43f5e;
    --slate-800: #cbd5e1;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Safari */
     -khtml-user-select: none;   /* Konqueror HTML */
       -moz-user-select: none;   /* Old versions of Firefox */
        -ms-user-select: none;   /* Internet Explorer/Edge */
            user-select: none;   /* Non-prefixed version */
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--slate-800);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Background elements */
.bg-elements {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.glow-1 {
    top: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: rgba(99, 102, 241, 0.1);
}

.glow-2 {
    top: 20%;
    right: -10%;
    width: 30%;
    height: 50%;
    background: rgba(52, 211, 153, 0.05);
}

.glow-3 {
    bottom: -10%;
    left: 20%;
    width: 50%;
    height: 30%;
    background: rgba(251, 113, 133, 0.05);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
    transition: opacity 0.5s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.view-hidden {
    display: none !important;
    opacity: 0;
}

.view-active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header-main {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.lang-toggle {
    display: flex;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.06);
    padding: 0.25rem;
    border-radius: 999px;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn.active {
    background: white;
    color: var(--text-main);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.flag-icon {
    width: 18px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header {
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.title {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 900;
    line-height: 0.8;
    margin-bottom: 0;
    letter-spacing: -0.05em;
    mix-blend-mode: difference;
    flex-shrink: 0;
}

.gradient-text {
    background: linear-gradient(to right, var(--indigo-400), var(--emerald-400), var(--rose-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 500px;
    line-height: 1.6;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
    padding-left: 2.5rem;
}

.italic {
    font-style: italic;
    color: var(--text-main);
    font-weight: 500;
}

/* Dashboard Controls (Stats + Mood) */
.dashboard-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 5rem;
    width: 100%;
}

/* Stats */
.stats-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 0 0 auto;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-items: start;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem 0.1rem 1rem;
    border-radius: 1rem;
    position: relative;
    border: 1px solid transparent;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -0.5rem;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.stat-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.stat-active {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.stat-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.filter-dot {
    width: 6px;
    height: 6px;
    background: var(--indigo-400);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--indigo-400);
}

/* Divisor HTML eliminado */
.stat-divider {
    display: none;
}

.text-emerald {
    color: var(--emerald-400);
}

.text-rose {
    color: var(--rose-400);
}

.text-indigo {
    color: var(--indigo-400);
}

/* Mood Widget */
.mood-widget {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 350px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mood-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: max-content;
}

.mood-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.mood-score-text {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mood-bar-container {
    position: relative;
    height: 20px;
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.mood-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, var(--rose-400), #fbbf24, var(--emerald-400));
    border-radius: 999px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
}

.mood-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    transition: left 1s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    z-index: 10;
    line-height: 1;
}

.mood-history-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.25rem;
    height: 45px;
    min-width: 100px;
    padding-top: 0;
    border-top: none;
}

.history-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.history-bar {
    width: 100%;
    border-radius: 3px;
    min-height: 4px;
    transition: height 1s ease, background-color 0.5s ease;
    opacity: 0.7;
}

.history-bar:hover {
    opacity: 1;
}

.history-date {
    font-size: 0.45rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    flex: 1;
}

/* Components: Card */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 2.5rem;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

/* Gradient Borders by Source */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2.5rem;
    padding: 2px;
    background: rgba(0, 0, 0, 0.05);
    /* default border */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.6s ease;
}

.card[data-source="El Correo"]::before {
    background: linear-gradient(135deg, #ef4444, #000000);
}

.card[data-source="Gasteiz Hoy"]::before {
    background: linear-gradient(135deg, #22c55e, #ef4444);
}

.card[data-source="Diario de Noticias"]::before {
    background: linear-gradient(135deg, #3b82f6, #ffffff);
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

.card-img-wrap {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: transform 1s ease, opacity 0.5s ease;
}

.card:hover .card-img {
    transform: scale(1.08);
    opacity: 1;
}

.img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0.8;
    transition: opacity 0.5s;
}

.card:hover .img-overlay {
    opacity: 0.5;
}

.card-top-badges {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.card-source-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

.badge-category {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

.sentiment-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 1;
    box-shadow: 0 0 10px currentColor;
}

.dot-positiva {
    background: var(--emerald-400);
    color: var(--emerald-400);
}

.dot-negativa {
    background: var(--rose-400);
    color: var(--rose-400);
}

.dot-neutral {
    background: var(--text-muted);
    color: var(--text-muted);
}

.source-text {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-content {
    padding: 2.5rem 2rem;
    position: relative;
}

.card-date {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.card:hover .card-title {
    color: var(--indigo-500);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateY(0);
}

.card:hover .card-footer {
    opacity: 1;
    transform: translateY(0);
}

.read-more {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--indigo-400);
}

.line {
    width: 40px;
    height: 1px;
    background: rgba(99, 102, 241, 0.5);
    transition: width 0.4s;
}

.card:hover .line {
    width: 60px;
}

/* Detail View */
.nav-back {
    margin-bottom: 4rem;
    z-index: 10;
    position: relative;
}

.back-link {
    background: none;
    border: none;
    font-family: inherit;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    transition: color 0.3s;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0;
}

.back-link:hover {
    color: var(--indigo-500);
}

.icon-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px);
}

.back-link:hover .icon-circle {
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateX(-4px);
    background: rgba(0, 0, 0, 0.1);
}

/* Fixed Detail Nav */
#nav-back {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 2000;
    margin-bottom: 0;
}

.back-link {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.6rem 1.25rem 0.6rem 0.6rem;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Card Read Status */
.card-read {
    opacity: 0.6;
    filter: saturate(0.8);
}

.card-read:hover {
    opacity: 0.9;
    filter: saturate(1);
}

.read-tag {
    color: var(--indigo-400);
    font-weight: 900;
    margin-left: 0.5rem;
    opacity: 0.8;
}

.hero-wrap {
    position: relative;
    height: 500px;
    border-radius: 3.5rem;
    overflow: hidden;
    margin-bottom: 4rem;
    display: flex;
    align-items: flex-end;
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%);
    opacity: 0.7;
    transition: filter 1s;
}

.hero-wrap:hover .hero-img {
    filter: grayscale(0%);
    opacity: 0.9;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-dark) 0%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 4rem;
    width: 100%;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.badge-source {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    background: var(--text-main);
    color: var(--bg-main);
    padding: 0.35rem 1rem;
    border-radius: 4px;
}

.badge-sentiment {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.25em;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: white;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.article-body {
    max-width: 760px;
    margin: 0 auto;
}

.meta-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 2.5rem;
    margin-bottom: 4rem;
}

.paragraph {
    font-size: 1.35rem;
    line-height: 1.85;
    color: #334155;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.paragraph::selection {
    background: rgba(99, 102, 241, 0.4);
    color: white;
}

.paragraph:first-of-type::first-letter {
    float: left;
    font-size: 6rem;
    line-height: 0.8;
    font-weight: 900;
    padding-right: 1rem;
    color: var(--indigo-500);
    margin-top: 0.3rem;
}

.article-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-note {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-style: italic;
}

.source-link {
    color: var(--indigo-400);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: color 0.3s;
}

.source-link:hover {
    color: var(--indigo-500);
}

.source-link svg {
    transition: transform 0.3s;
}

.source-link:hover svg {
    transform: translateX(4px);
}

/* Main Footer */
.footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 8rem;
}

.footer-right {
    display: flex;
    gap: 2rem;
}

.footer-right span {
    opacity: 0.5;
    transition: opacity 0.3s;
    cursor: pointer;
}

.footer-right span:hover {
    opacity: 1;
    color: var(--indigo-500);
}

/* Ad Card */
.card-ad {
    background: rgba(255, 255, 255, 0.4);
    border: 1px dashed var(--slate-800);
    border-radius: 2.5rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.ad-label {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    opacity: 0.5;
}

.ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .hero-wrap {
        height: 400px;
        border-radius: 2.5rem;
    }

    .hero-content {
        padding: 3rem 2rem;
    }
}

@media (max-width: 768px) {
    #nav-back {
        position: relative;
        top: auto;
        left: auto;
        margin: 1.5rem 1rem 0.5rem 1rem;
        width: fit-content;
        z-index: 10;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .dashboard-controls {
        gap: 1.5rem;
    }

    .stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 2rem;
        width: 100%;
    }

    .stat-divider {
        display: none;
    }

    .footer {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .hero-wrap {
        height: auto;
        min-height: 400px;
    }

    .paragraph {
        font-size: 1.15rem;
    }

    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 480px) {
    #nav-back {
        margin: 1rem 0.5rem 0 0.5rem;
    }

    .container {
        padding: 1.5rem 0.5rem;
    }

    .article-body {
        width: 100%;
        max-width: 100%;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-main {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        width: 100%;
        padding-left: 0.5rem;
    }

    .title {
        font-size: 2.5rem;
        margin-bottom: 0;
        line-height: 0.95;
        flex-shrink: 0;
    }

    .subtitle {
        font-size: 0.72rem;
        padding-left: 0;
        border-left: none;
        max-width: 100%;
        line-height: 1.3;
        margin: 0;
        flex: 1;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-content {
        padding: 1.5rem;
    }

    .card-img-wrap {
        height: 200px;
    }

    .mood-widget {
        min-width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .hero-content {
        padding: 1.5rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .dashboard-controls {
        margin-bottom: 2rem;
        gap: 0.5rem;
    }

    .stats-group {
        width: 100%;
        gap: 0.1rem;
    }

    .stats {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.4rem;
        width: 100%;
    }

    .stat-item {
        padding: 0.3rem 0.1rem 0 0.1rem;
        align-items: center;
        text-align: center;
    }

    .stat-item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: -0.2rem;
        top: 20%;
        height: 60%;
        width: 1px;
        background: rgba(0, 0, 0, 0.1);
        display: block;
    }

    .stat-item:nth-child(odd)::after {
        display: none;
    }

    .stat-label {
        font-size: 0.52rem;
        letter-spacing: 0.02em;
    }

    .stat-value {
        font-size: 1.4rem;
        gap: 0.2rem;
        justify-content: center;
    }

    .filter-dot {
        width: 4px;
        height: 4px;
    }

    .categories-bar {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.4rem;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        margin-bottom: 1.5rem;
    }

    .category-btn {
        padding: 0.45rem 0;
        font-size: 0.55rem;
        font-weight: 600;
        text-transform: none;
        letter-spacing: -0.01em;
        gap: 0.2rem;
        justify-content: center;
        text-align: center;
        border-radius: 8px;
        box-sizing: border-box;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-back {
        margin-bottom: 2rem;
    }

    .article-footer {
        margin-top: 3rem;
        padding-top: 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Podcast Section */
.podcast-section {
    margin-bottom: 5rem;
    width: 100%;
}

.podcast-container {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 2.5rem;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.podcast-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.podcast-badge {
    background: #1DB954;
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.podcast-badge svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.podcast-title-wrap {
    display: flex;
    flex-direction: column;
}

.podcast-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.podcast-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.spotify-embed {
    width: 100%;
    border-radius: 1.5rem;
    overflow: hidden;
    height: 161px;
    /* Altura exacta para que no salga scroll en Anchor */
}

.spotify-embed iframe {
    display: block;
    border: none;
}

@media (max-width: 480px) {
    .podcast-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .podcast-container {
        padding: 1.5rem;
        border-radius: 2rem;
    }
}
/* Categories Bar */
.categories-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
    width: 100%;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1);
}

.category-btn.active {
    background: var(--text-main);
    color: var(--bg-main);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.2);
}

.category-btn.cat-empty {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
    filter: grayscale(1);
}

/* Specific Category Colors on Active */
.category-btn.active[data-category="Economía"] {
    background: linear-gradient(135deg, #10b981, #047857);
}
.category-btn.active[data-category="Sociedad"] {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}
.category-btn.active[data-category="Deportes"] {
    background: linear-gradient(135deg, #f59e0b, #b45309);
}
.category-btn.active[data-category="Cultura"] {
    background: linear-gradient(135deg, #8b5cf6, #5b21b6);
}

/* Footer */
.footer {
    margin-top: 6rem;
    padding: 3rem 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-left {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mobile overrides for categories - MUST come after base .category-btn */
@media (max-width: 480px) {
    .categories-bar {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.4rem;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        margin-top: -0.9rem;
        margin-bottom: 0.25rem;
    }

    .category-btn {
        padding: 0.4rem 0.15rem;
        font-size: 0.5rem;
        font-weight: 600;
        text-transform: none;
        letter-spacing: -0.02em;
        gap: 0;
        justify-content: center;
        text-align: center;
        border-radius: 8px;
        box-sizing: border-box;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
    }
}
