@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --bg-color: #fdfdfd;
    --navy: #001d3d;
    --navy-light: #003566;
    --accent: #e85d04;
    --gold: #ffc300;
    --text-dark: #1a1c20;
    --text-muted: #5a5e66;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow-soft: 0 0 40px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 0 60px rgba(0, 0, 0, 0.16);
    --radius-lg: 24px;
    --radius-md: 16px;
    --font-heading: 'Sora', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-news: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 110px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global Link Reset */
a, a:visited, a:active, a:focus {
    text-decoration: none;
    color: inherit;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* NAVBAR */
.main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Basic hardware acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.nav-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    background: var(--navy);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 10px;
    font-size: 1.2rem;
}

.brand-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--navy);
}

.brand-text span {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 10px;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.search-box:focus-within {
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--accent);
}

.search-input {
    border: none;
    background: transparent;
    padding: 6px 8px;
    width: 180px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-dark);
    outline: none;
}

.search-btn,
.search-clear {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    padding: 4px;
}

.search-btn:hover {
    color: var(--accent);
}

.search-clear {
    opacity: 0;
    pointer-events: none;
    padding: 2px;
}

.search-clear.visible {
    opacity: 1;
    pointer-events: all;
}

.search-clear:hover {
    color: #e63946;
}

.services-explorer {
    padding: 3rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 29, 61, 0.02) 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.services-explorer .content-wrapper {
    max-width: 1450px;
    /* Wider container for services to fit 4 cards per row */
}

.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.section-title span {
    color: var(--accent);
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto 0;
    border-radius: 10px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    max-width: 1420px;
    /* Increased to allow 4 cards of 320px (1352px total + padding) */
    margin: 0 auto;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1.5rem;
    background: rgba(0, 29, 61, 0.08);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    width: 320px;
    /* Restored to original size */
    flex: 0 0 320px;
    height: 100px;
    /* Fixed height to keep them uniform */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(232, 93, 4, 0.2);
    background: rgba(0, 29, 61, 0.12);
}

.service-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--white);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s;
}

.service-card:hover .service-icon {
    background: var(--accent);
    color: var(--white);
    transform: rotate(-10deg) scale(1.1);
}

.service-info h3 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    font-weight: 800;
    transition: all 0.3s;
}

.service-card:hover h3 {
    color: var(--accent);
}

.service-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-action {
    display: none;
    /* Removed for a more compact look */
}

@media (max-width: 768px) {
    .services-explorer {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .service-card {
        width: 100%;
        flex: 0 0 100%;
        height: auto;
        min-height: 100px;
    }
}

/* HERO SECTION */
.hero-explorer {
    margin-top: 64px;
    height: 300px;
    position: relative;
    background: url('../images/hero.jpg') top/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

@media (max-width: 768px) {
    .hero-explorer {
        margin-top: 105px;
        height: 250px;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 29, 61, 0.6) 0%, rgba(0, 29, 61, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 1.5rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-title .hero-accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    font-weight: 300;
}

/* MAIN CONTENT */
.content-wrapper {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.section-divider {
    width: 60px;
    height: 5px;
    background: var(--accent);
    border-radius: 10px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* NEWS GRID */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    /* Added for stretched link */
    -webkit-tap-highlight-color: transparent;
}

.news-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-strong);
}

.news-card-image {
    width: 100%;
    height: 240px;
    position: relative;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.6s ease;
}

.news-card:hover .news-card-image img {
    scale: 1.1;
}



.news-card-body {
    padding: 0.4rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
    /* Keep tags above the stretched link */
}

.tag-item {
    cursor: pointer;
    transition: color 0.3s ease;
}

.tag-item:hover,
.tag-item.active {
    color: var(--accent);
}

.tag-item.active {
    font-weight: 700;
}

.news-card-date {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: lowercase;
    margin-bottom: 0.8rem;
    letter-spacing: normal;
}

.news-card-title {
    font-family: var(--font-news);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: #222;
    cursor: pointer;
    transition: color 0.3s;
}

.news-card-title a,
.news-card-title a:visited,
.news-card-title a:active,
.news-card-title a:focus {
    text-decoration: none !important;
    color: #222 !important;
    outline: none !important;
}

.news-card:hover .news-card-title,
.news-card:hover .news-card-title a {
    color: var(--accent) !important;
}

.news-card-excerpt {
    color: #222;
    font-family: var(--font-news);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-btn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--navy);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.news-btn-more:hover {
    /* gap: 15px; Displacement removed */
    color: var(--accent);
}

.back-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: transparent;
    color: var(--text-dark) !important;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--navy);
}

.back-badge:hover {
    background: var(--navy);
    color: #ffffff !important;
    transform: none;
    /* Eliminado el desplazamiento */
    box-shadow: 0 10px 25px rgba(0, 29, 61, 0.3);
    border-color: var(--navy);
}

/* Utilities */
.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 29, 61, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-container {
    background: var(--white);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    /* Clips everything inside, including children's scrollbars */
    display: flex;
    flex-direction: column;
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }

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

.close-modal-btn {
    position: fixed;
    /* Changed to fixed so it stays over the content */
    top: 25px;
    right: 25px;
    background: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    z-index: 2100;
    /* Higher than modal-container */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: var(--navy);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    /* Custom scrollbar to keep corners rounded */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
    background-clip: padding-box;
}

.modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.photo-credit {
    font-size: 1rem;
    color: #888;
    margin-bottom: 0.2rem;
    display: inline-block;
}

.news-card .photo-credit {
    margin-top: -1.2rem;
    margin-bottom: 0.8rem;
}

.modal-body .photo-credit {
    padding: 0.3rem 3rem 0;
}

.modal-content-wrap {
    padding: 2rem 3rem 3rem;
    /* Reduced top padding to account for credit */
}

.modal-header {
    margin-bottom: 1.5rem;
}



.modal-title {
    font-family: var(--font-news);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    color: #222;
    margin-top: 0.2rem;
    margin-bottom: 1rem;
}

.modal-date {
    font-weight: 600;
    color: var(--accent);
    font-size: 1.05rem;
}

.modal-summary {
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.4;
    color: #222;
    margin: 0 0 1.5rem 0;
    font-family: var(--font-news);
}

.news-detail-container .modal-summary {
    color: rgba(0, 0, 0, 0.8);
    font-size: 1.3rem;
}

.modal-text {
    font-family: var(--font-news);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.8;
    color: #222;
    white-space: normal;
    text-align: left;
    margin-top: 1.5rem;
}

.drop-cap {
    float: left;
    font-size: 3.8rem;
    line-height: 0.85;
    font-weight: 900;
    margin-right: 0.6rem;
    margin-top: 0.3rem;
    color: inherit;
    font-family: var(--font-news);
    text-transform: uppercase;
}

/* FOOTER */
.main-footer {
    background: linear-gradient(175deg, #001d3d 0%, #00152d 60%, #000d1f 100%);
    color: var(--white);
    padding: 0 0 0;
    position: relative;
    overflow: hidden;
    margin-top: 8rem;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 15%;
    right: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 195, 0, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: footerGlowPulse 8s ease-in-out infinite;
}

.main-footer::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(232, 93, 4, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: footerGlowPulse 10s ease-in-out infinite reverse;
}

@keyframes footerGlowPulse {

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

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

/* Footer Wave */
.footer-wave {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    margin-bottom: 0;
}

.footer-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 55px;
}

.footer-wave .shape-fill {
    fill: var(--bg-color);
}

.footer-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* ─── Main Grid ─── */
.footer-grid-modern {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1fr 1fr;
    gap: 3rem;
    margin-top: 4rem;
    margin-bottom: 3.5rem;
}

/* ─── Column Headings ─── */
.footer-heading {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
}

/* ─── Brand Column ─── */
.footer-brand-col .brand {
    margin-bottom: 0;
}

.footer-logo {
    background: var(--navy);
    color: var(--gold);
    border: 1px solid rgba(255, 195, 0, 0.2);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.footer-brand-text {
    color: var(--white);
    letter-spacing: -0.5px;
}

.footer-col-modern {
    overflow: hidden;
}

.footer-tagline {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.6);
    max-width: 360px;
}

.footer-badges-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 1.5rem;
}

.footer-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.45);
    transition: all 0.3s ease;
    cursor: default;
}

.footer-badge-pill:hover {
    border-color: rgba(255, 195, 0, 0.3);
    color: var(--gold);
    background: rgba(255, 195, 0, 0.05);
}

.footer-badge-pill svg {
    opacity: 0.6;
}

.footer-badge-pill:hover svg {
    opacity: 1;
    stroke: var(--gold);
}

/* ─── Navigation Links ─── */
.footer-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.6rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-nav-link:last-child {
    border-bottom: none;
}

.footer-nav-link svg {
    opacity: 0.4;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.footer-nav-link:hover {
    color: var(--white);
    padding-left: 6px;
}

.footer-nav-link:hover svg {
    opacity: 1;
    stroke: var(--gold);
}

/* ─── Tags Cloud ─── */
.footer-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    column-gap: 20px;
    row-gap: 4px;
    margin-left: -12px;
    /* Hide leading dots via overflow:hidden on parent */
}

.footer-cloud-tag {
    display: inline-block;
    position: relative;
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.8;
    padding-left: 12px;
}

.footer-cloud-tag::before {
    content: "·";
    position: absolute;
    left: -4px;
    color: rgba(255, 255, 255, 0.15);
    font-weight: 300;
}

.footer-cloud-tag:hover {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-cloud-tag.active {
    color: var(--gold);
    font-weight: 700;
}

/* ─── Contact Column ─── */
.footer-contact-modern {
    display: flex;
    flex-direction: column;
}

.footer-contact-intro {
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
}

.footer-email-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-email-link:hover {
    color: var(--white);
}

.footer-email-link svg {
    flex-shrink: 0;
}

/* ─── Bottom Bar ─── */
.footer-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.8rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0;
}

.footer-bottom-left {
    flex: 1;
}

.footer-copyright-text {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-copyright-text strong {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

.footer-bottom-center {
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-legal-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 20px;
}

.footer-legal-link {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.footer-legal-link:hover {
    color: var(--white);
}

.footer-legal-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.footer-legal-link:hover::after {
    width: 100%;
}

.footer-legal-dot {
    color: rgba(255, 255, 255, 0.15);
    font-size: 1rem;
    line-height: 1;
}

.footer-bottom-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.footer-top-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.footer-top-btn:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(255, 195, 0, 0.25);
}

/* ─── Responsive Footer ─── */
@media (max-width: 1024px) {
    .footer-grid-modern {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .footer-brand-col {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-brand-col .brand {
        justify-content: center;
    }

    .footer-tagline {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-badges-row {
        align-items: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .footer-container {
        padding: 0 1.5rem;
    }

    .footer-grid-modern {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .footer-brand-col {
        grid-column: auto;
    }

    .footer-brand-col .brand {
        justify-content: center;
    }

    .footer-tagline {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-badges-row {
        align-items: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-nav-link {
        justify-content: center;
    }

    .footer-nav-link:hover {
        padding-left: 0;
    }

    .footer-tags-cloud {
        justify-content: flex-start;
        padding-left: 12px;
        /* Offset the negative margin to look centered-ish */
    }

    .footer-contact-intro {
        text-align: center;
    }

    .footer-email-link {
        align-self: center;
    }

    .footer-bottom-bar {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
        padding: 1.5rem 0 2rem;
    }

    .footer-bottom-left,
    .footer-bottom-right {
        justify-content: center;
        flex: auto;
    }

    .footer-bottom-center {
        order: -1;
        /* Copyright at the top on mobile */
        flex: auto;
    }

    .footer-legal-group {
        margin-right: 0;
        margin-bottom: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-bottom-right {
        flex-direction: column;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .section-divider {
        margin: 0 auto;
    }

    .nav-date {
        display: none;
    }

    .search-input {
        width: 120px;
    }

    .modal-container {
        max-height: 100vh;
        border-radius: var(--radius-md);
        /* Added rounded corners on mobile too */
    }

    .modal-content-wrap {
        padding: 1.5rem;
    }

    .modal-body .photo-credit {
        padding: 0.3rem 1.5rem 0;
    }

    .modal-title {
        font-size: 1.8rem;
    }

    .modal-text {
        text-align: left;
    }
}

/* PAGINATION */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 6rem;
    padding-bottom: 5rem;
}

.pagination-unified-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.2rem 1rem;
    border-radius: 35px;
    border: 1px solid rgba(0, 29, 61, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.badge-top {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.badge-bottom {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
}

.badge-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.5rem;
}

.badge-divider-v {
    width: 1px;
    height: 40px;
    background: rgba(0, 29, 61, 0.18);
}

.badge-divider-h {
    width: 95%;
    height: 1px;
    background: rgba(0, 29, 61, 0.18);
}

.badge-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.pagination-jump-form,
.date-filter-form {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pagination-input {
    width: 85px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--white);
    text-align: center;
    font-weight: 800;
    font-size: 1.0rem;
    color: var(--navy);
    outline: none;
    transition: all 0.3s ease;
}

/* Force spin buttons (up/down arrows) to be always visible in Webkit browsers */
.pagination-input::-webkit-inner-spin-button,
.pagination-input::-webkit-outer-spin-button {
    opacity: 1 !important;
    cursor: pointer;
}

.date-input {
    width: 155px;
    font-size: 1.1rem;
    padding: 0 10px;
}

.pagination-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

.jump-submit,
.date-reset {
    min-width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: var(--navy) !important;
    color: var(--gold) !important;
    padding: 0 !important;
}

.date-reset {
    background: rgba(0, 29, 61, 0.05) !important;
    color: var(--navy) !important;
}

.jump-submit:hover {
    background: var(--accent) !important;
    color: var(--white) !important;
}

.date-reset:hover {
    background: #ff4d4d !important;
    color: var(--white) !important;
}

@media (max-width: 991px) {
    .pagination-unified-badge {
        padding: 1.5rem;
        width: 100%;
        max-width: 450px;
    }

    .badge-bottom {
        flex-direction: column;
        gap: 1.5rem;
    }

    .badge-divider-v {
        width: 80%;
        height: 1px;
    }

    .badge-section {
        padding: 0;
        width: 100%;
    }
}

.pagination-btn {
    min-width: 45px;
    height: 45px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--white);
    color: var(--navy);
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--navy-light);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 29, 61, 0.15);
    border-color: var(--navy-light);
}

.pagination-btn.active {
    background: var(--navy);
    color: var(--gold);
    border-color: var(--navy);
    transform: scale(1.1);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.pagination-dot {
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 2px;
    padding: 0 4px;
}

/* LANGUAGE SWITCHER */
.lang-switcher {
    display: flex;
    gap: 0;
    align-items: center;
    margin-left: 0.5rem;
    font-family: var(--font-body);
}

.lang-btn {
    color: var(--navy);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 29, 61, 0.1);
    background: rgba(0, 29, 61, 0.03);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.lang-flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
    color: var(--accent);
    background: var(--white);
    border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

@media (max-width: 991px) {
    .nav-date {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-navbar {
        height: auto;
        min-height: 105px;
        background: var(--white);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding-top: env(safe-area-inset-top);
        align-items: flex-start;
        transition: none !important;
    }

    .nav-container {
        padding: 8px 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        justify-content: flex-start;
        height: auto;
        min-height: 105px;
        transition: none !important;
    }

    .nav-actions {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        transition: none !important;
    }

    .nav-date {
        display: block !important;
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-muted);
        white-space: nowrap;
    }

    .search-box {
        flex: 1;
        max-width: 180px;
    }

    .search-input {
        width: 100%;
        font-size: 0.85rem;
    }

    .lang-switcher {
        position: absolute;
        top: 18px;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 1.1rem;
    }

    .search-box {
        padding: 2px 6px;
    }

    .search-input {
        width: 80px;
        font-size: 0.8rem;
    }

    .lang-switcher {
        margin-left: 0;
    }

    .lang-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
        gap: 4px;
    }

    .lang-flag {
        width: 16px;
        height: 10px;
    }
}

@media (max-width: 360px) {
    .brand-text {
        display: none;
    }
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(0, 29, 61, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    padding: 1.2rem 2rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cookieSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.5s ease;
}

@keyframes cookieSlideUp {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.cookie-banner.hide {
    transform: translate(-50%, 100px);
    opacity: 0;
    pointer-events: none;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.cookie-text h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: var(--gold);
}

.cookie-text p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin: 0;
}

.cookie-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
}

.cookie-btn {
    padding: 0.7rem 1.4rem;
    border-radius: 12px;
    border: none;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.cookie-btn.primary {
    background: var(--accent);
    color: var(--white);
}

.cookie-btn.primary:hover {
    background: #ff7b22;
    /* A slightly lighter orange for hover */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(232, 93, 4, 0.3);
}

@media (max-width: 600px) {
    .cookie-content {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
    }

    .cookie-banner {
        bottom: 20px;
        padding: 1.5rem;
        width: calc(100% - 40px);
    }

    .cookie-actions {
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
    }
}

/* MOBILE ANCHOR AD */
.mobile-anchor-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: white;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 1024px) {
    .mobile-anchor-ad {
        display: none;
    }
}

/* Subir el banner de cookies en móvil para no tapar el anuncio */
@media (max-width: 1023px) {
    .cookie-banner {
        bottom: 75px !important;
    }
}

/* STATS BANNER */
.stats-banner {
    margin: 3rem auto;
    max-width: 66%;
    background: rgba(0, 29, 61, 0.08);
    border-radius: var(--radius-md);
    padding: 1.5rem 2.5rem;
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stats-banner:hover {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    border-color: rgba(232, 93, 4, 0.3);
    transform: translateY(-5px);
}

.stats-banner-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(232, 93, 4, 0.03) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.stats-banner-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.stats-banner-icon {
    width: 44px;
    height: 44px;
    background: rgba(232, 93, 4, 0.06);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

#stats-banner-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: var(--navy);
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

#stats-banner-title::after {
    display: none;
}

#stats-banner-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 500px;
    line-height: 1.4;
}

.stats-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--white);
    padding: 0.8rem;
    min-width: 48px;
    height: 48px;
    justify-content: center;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid var(--accent);
    box-shadow: 0 4px 12px rgba(232, 93, 4, 0.15);
}

.stats-banner:hover #stats-banner-title {
    color: var(--accent) !important;
}

.stats-btn svg {
    transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
    .stats-banner-content {
        grid-template-columns: auto 1fr;
    }

    .stats-banner-action {
        display: none;
    }
}

@media (max-width: 768px) {
    .stats-banner {
        padding: 1.5rem;
        margin: 1.5rem 1rem;
        text-align: left;
        max-width: none;
    }

    .stats-banner-content {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 1.2rem;
        align-items: center;
    }

    .stats-banner-icon {
        margin: 0;
        width: 40px;
        height: 40px;
    }

    #stats-banner-title {
        font-size: 1.2rem;
    }

    #stats-banner-desc {
        font-size: 0.85rem;
    }
}

/* BANNERS CONTAINER IN INDEX */
.banners-container {
    display: flex;
    gap: 2rem;
    margin: 3rem auto;
    max-width: 1400px;
    padding: 0 2rem;
}

.stats-banner,
.hemeroteca-banner {
    flex: 1;
    margin: 0 !important;
    max-width: none !important;
}

/* Language visibility for index banners */
[data-lang="cas"] .lang-val {
    display: none !important;
}

[data-lang="val"] .lang-es {
    display: none !important;
}

.hemeroteca-banner,
.renfe-banner {
    background: rgba(0, 29, 61, 0.08);
    border-radius: var(--radius-md);
    padding: 1.5rem 2.5rem;
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.hemeroteca-banner:hover,
.renfe-banner:hover {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    border-color: rgba(232, 93, 4, 0.3);
    transform: translateY(-5px);
}


.hemeroteca-banner-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.hemeroteca-banner-icon {
    width: 44px;
    height: 44px;
    background: rgba(232, 93, 4, 0.06);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.hemeroteca-banner-text h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: var(--navy);
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.hemeroteca-banner:hover .hemeroteca-banner-text h2 {
    color: var(--accent);
}

.hemeroteca-banner-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

.hemeroteca-banner-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(232, 93, 4, 0.03) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .banners-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hemeroteca-banner-action {
        display: none;
    }

    .hemeroteca-banner-content {
        grid-template-columns: auto 1fr;
    }
}

@media (max-width: 768px) {
    .hemeroteca-banner {
        padding: 1.5rem;
        margin: 0;
        text-align: left;
    }

    .hemeroteca-banner-content {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 1.2rem;
        align-items: center;
    }

    .hemeroteca-banner-icon {
        margin: 0;
        width: 40px;
        height: 40px;
    }

    .hemeroteca-banner-text h2 {
        font-size: 1.2rem;
    }

    .hemeroteca-banner-text p {
        font-size: 0.85rem;
    }
}

/* HEMEROTECA PAGE LIST */
.hemeroteca-list {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
    min-height: 400px;
}

.hemeroteca-item,
.hemeroteca-item:visited,
.hemeroteca-item:active,
.hemeroteca-item:focus {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.2rem;
    background: transparent;
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit !important;
    line-height: 1.2;
    outline: none;
}

.hemeroteca-item:hover .hemeroteca-title {
    color: var(--accent);
}

.hemeroteca-date {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
    min-width: 140px;
}

.hemeroteca-title {
    font-family: var(--font-news);
    font-size: 1rem;
    font-weight: 400;
    color: var(--navy);
    flex: 1;
    margin-left: 1rem;
    line-height: 1.15;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    .hemeroteca-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .hemeroteca-title {
        margin-left: 0;
    }

    .hemeroteca-arrow {
        display: none;
    }
}

/* SUBPAGE HERO (Premium Style) */
.subpage-hero {
    padding: 84px 20px 70px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: white;
    text-align: center;
    border-radius: 0 0 50px 50px;
    margin-bottom: -50px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.subpage-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 195, 0, 0.1);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
}

.subpage-hero h1 {
    font-family: 'Sora', sans-serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    position: relative;
    color: white;
}

.subpage-hero h1 span {
    color: white;
}

.subpage-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .subpage-hero h1 {
        font-size: 2.5rem;
    }

    .subpage-hero {
        padding: 155px 20px 50px;
    }
}


/* ARCHIVE FILTERS */
.archive-filters {
    max-width: 1200px;
    margin: -25px auto 2rem;
    padding: 1.5rem 2rem;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
    position: relative;
    z-index: 3;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
    padding: 0.7rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s;
    background-color: #fcfcfc;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--accent);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(232, 93, 4, 0.1);
}

.filter-btn-clear {
    padding: 0.7rem 1.2rem;
    background: #f0f0f0;
    color: var(--text-muted);
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn-clear:hover {
    background: #e0e0e0;
    color: var(--navy);
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 0 1rem;
        margin-top: 2rem;
    }

    .hemeroteca-list {
        padding: 0;
    }

    .archive-filters {
        padding: 1.2rem 1rem;
        margin: -25px 1rem 1.5rem;
    }

    .hemeroteca-item {
        padding: 0.5rem 1rem;
    }
}

/* BREAKING NEWS BADGE */
.breaking-news-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    background: none;
    border: none;
    padding: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.breaking-badge {
    background: #d90429;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.dot-blink {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.breaking-title {
    font-family: var(--font-news);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-body);
}

.breaking-title a,
.breaking-title a:visited,
.breaking-title a:active,
.breaking-title a:focus {
    text-decoration: none;
    color: var(--navy) !important;
    transition: color 0.3s;
    outline: none;
}

.breaking-title a:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .breaking-news-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .breaking-title {
        white-space: normal;
        font-size: 1rem;
    }
}

/* GLOBAL OVERRIDES FOR NEWS ARTICLES (To avoid editing 100 files) */
main.news-detail-container {
    margin-top: 84px !important;
}

@media (max-width: 768px) {
    main.news-detail-container {
        margin-top: 115px !important;
    }
}