/* assets/css/responsive.css */

/* --- Global Responsive Variables --- */
:root {
    --container-padding: 20px;
}

/* --- Mobile First Overrides (<768px) --- */
@media (max-width: 767px) {

    /* Layout */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .container {
        padding: 0 20px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Prevent image overflow globally */
    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }

    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    /* ================================
       Navigation (IMPORTANT FIX)
       Evitar que responsive.css rompa los headers RRtv (auth/public)
    ================================== */

    /* SOLO para headers genéricos, NO para .rrtv-header-auth/.rrtv-header-public */
    header:not(.rrtv-header-auth):not(.rrtv-header-public) .container {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    /* SOLO nav genérico (no .rrtv-nav) */
    nav:not(.rrtv-nav) {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }

    nav:not(.rrtv-nav) a {
        font-size: 0.85rem;
    }

    /* Los headers RRtv se mantienen en una fila (no romper height:60px fixed) */
    .rrtv-header-auth .rrtv-header-inner.container,
    .rrtv-header-public .rrtv-header-inner.container {
        flex-direction: row !important;
        height: 60px !important;
        padding: 0 14px !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }

    .rrtv-nav {
        gap: 14px !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .rrtv-nav a {
        font-size: 0.85rem !important;
        flex: 0 0 auto;
    }

    /* Grids & Cards */
    .card-grid,
    .coverage-grid,
    .news-magazine {
        grid-template-columns: 1fr !important;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* News Magazine Specifics */
    .news-featured {
        height: 300px;
    }

    .news-featured-content {
        padding: 20px;
    }

    .news-featured-content h3 {
        font-size: 1.4rem !important;
    }

    /* Forms (Login/Register) */
    .auth-container,
    .login-card {
        width: 90% !important;
        max-width: none !important;
        padding: 20px !important;
        margin: 20px auto !important;
    }

    .row-2-col {
        grid-template-columns: 1fr;
    }

    /* Hero adjustments handled in premium.css but reinforced here */
    .hero-content {
        padding: 0 15px;
    }

    .hero-tagline {
        font-size: 1rem !important;
        line-height: 1.4;
    }

    .btn-cta {
        padding: 12px 30px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    /* Sponsors */
    .sponsors-grid {
        flex-wrap: wrap;
        gap: 20px;
    }

    .sponsors-grid span {
        font-size: 1rem !important;
        width: 40%;
        text-align: center;
    }
}

/* --- Tablet (768px - 1024px) --- */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        max-width: 720px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-magazine {
        grid-template-columns: 1fr 1fr;
    }

    .coverage-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Desktop (>1024px) --- */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }
}

.filters-bar {
    flex-direction: column;
    width: 100%;
    margin-bottom: 10px;
}
