/* assets/css/premium.css
   RRtv CLEAN BUILD (Regla 0)
   - Sin duplicados
   - Header fijo estable (60px)
   - Offset ¨²nico (body padding-top)
   - Mantiene estilos existentes aprobados
   - FIX AUTH COMPLETED: Placeholder visible, Ojo alineado, Fondo Negro
*/

/* ===============================
   Strict Logo Rule: Hide Header Logo ONLY on Home
=============================== */
body.home header .logo-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ===============================
   Base Layout & OFFSET CR0ˆ1TICO
=============================== */
/* 1. Offset Global: Todo el sitio baja 60px para respetar el header fijo */
body {
    padding-top: 60px !important;
    /* FORZADO para asegurar que nada quede abajo */
    background-color: var(--brand-primary);
    position: relative;

    /* BLOQUEO GLOBAL DE SELECCIÓN DE TEXTO Y MENÚ TÁCTIL (ANTI-COPIA / ANTI-GUARDADO) */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Excepción: Permitir la selección e interacción normal en todos los campos de formularios (Inputs y Textareas) */
input,
textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* BLOQUEO DE ARRASTRE DE IMÁGENES AL ESCRITORIO */
img {
    -webkit-user-drag: none;
    pointer-events: none;
    /* Reduce interacción innecesaria si no es link/botón */
}

/* Excepción de imágenes: Restaura enlaces cliqueables para imágenes de partners o flyers */
a img,
button img,
.card-image,
.premium-card {
    pointer-events: auto;
}

/* ANTI-IMPRESIÓN (CTRL + P genera una página en blanco) */
@media print {

    html,
    body {
        display: none !important;
    }
}

/* 2. Excepci¨®n: Login/Auth no tienen header fijo, offset 0 */
/* FIX FONDO NEGRO PURO: Eliminamos imagen y overlay gris */
body.auth-page,
body.login-page,
body.ag-auth-page {
    padding-top: 0 !important;
    background-color: #000000 !important;
    /* NEGRO PURO */
    background-image: none !important;
    /* Eliminamos imagen que se ve gris */
    min-height: 100vh;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* CENTRADO TOTAL */
    padding: 20px;
    margin: 0;
    overflow-x: hidden;
    position: relative;
    font-family: var(--font-body);
}

/* Eliminamos el overlay anterior para que sea negro limpio */
body.auth-page::before,
body.login-page::before,
body.ag-auth-page::before {
    display: none !important;
}

main {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 80vh;
    position: relative;
    z-index: 1;
    /* El contenido base siempre en capa 1 */
}

/* FIX AESTHETICS: Avoid sidebar overlap on home PC */
@media (min-width: 992px) {
    body.home main {
        margin-left: 250px;
        width: calc(100% - 250px);
    }
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.section-title h2 {
    font-size: 2rem;
    margin: 0;
    background: linear-gradient(90deg, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- FIX SUBMEN0‰3 +CALENDARIOS --- */
#cal-submenu {
    display: flex;
    flex-direction: column;
    min-width: 200px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    /* Para que el hover respete los bordes redondeados */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Estilo para cada link dentro del submen¨² */
#cal-submenu a {
    padding: 12px 20px !important;
    /* El primer n¨²mero es arriba/abajo, el segundo es el AIRE a los costados */
    color: #aaa !important;
    text-decoration: none !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease;
    border-bottom: 1px solid #222;
    display: block;
}

/* El ¨²ltimo item no necesita borde abajo */
#cal-submenu a:last-child {
    border-bottom: none;
}

/* Efecto al pasar el mouse */
#cal-submenu a:hover {
    background: #1e1e1e !important;
    color: #00ff88 !important;
    /* Tu verde RunningRadio */
    padding-left: 25px !important;
    /* Peque0Š9o efecto de movimiento al hacer hover */
}

/* --- FIX SUBMEN0‰3 +CALENDARIOS --- */
#cal-submenu {
    display: flex;
    flex-direction: column;
    min-width: 200px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    /* Para que el hover respete los bordes redondeados */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Estilo para cada link dentro del submen¨² */
#cal-submenu a {
    padding: 12px 20px !important;
    /* El primer n¨²mero es arriba/abajo, el segundo es el AIRE a los costados */
    color: #aaa !important;
    text-decoration: none !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease;
    border-bottom: 1px solid #222;
    display: block;
}

/* El ¨²ltimo item no necesita borde abajo */
#cal-submenu a:last-child {
    border-bottom: none;
}

/* Efecto al pasar el mouse */
#cal-submenu a:hover {
    background: #1e1e1e !important;
    color: #00ff88 !important;
    /* Tu verde RunningRadio */
    padding-left: 25px !important;
    /* Peque0Š9o efecto de movimiento al hacer hover */
}


/* ===============================
   HEADER PRINCIPAL (FIXED)
=============================== */
/* Selector espec¨ªfico para evitar colisiones con headers de art¨ªculos */
body>header,
#header-container header,
.header-main {
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    background: #121212;
    position: fixed;
    /* Header pegado arriba */
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10000;
    /* Capa alta */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    overflow: visible !important;
    /* CR0ˆ1TICO: Permite dropdowns */
}

/* Fallback general */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: #121212;
    height: 60px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    overflow: visible !important;
}

/* ===============================
   RESET CR0ˆ1TICO PARA ART0ˆ1CULOS
   Esto evita que el t¨ªtulo del art¨ªculo se pegue arriba
=============================== */
main header,
article header,
section header,
.article-header {
    position: static !important;
    /* Vuelve al flujo normal */
    top: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    background: transparent !important;
    border: none !important;
    z-index: 1 !important;
    padding: 0 !important;
    margin-bottom: 20px;
    /* Espacio para el t¨ªtulo */
    display: block;
}

/* Contenedor dentro del header */
header .container,
.rrtv-header-inner.container,
.rrtv-header-inner {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: nowrap;
    overflow: visible !important;
}

/* Logo */
.mobile-logo img {
    max-height: 42px !important;
    width: auto;
}

.logo-container img {
    height: 40px;
    display: block;
}

/* ===============================
   NAV DE NAVEGACI0ˆ7N (FIX MEN0‰3)
=============================== */
nav,
.rrtv-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: nowrap;
    white-space: nowrap;
    /* IMPORTANTE: Desktop NO tiene overflow hidden, permite dropdowns */
    overflow: visible;
}

/* Solamente en mobile usamos scroll horizontal */
@media (max-width: 991px) {

    nav,
    .rrtv-nav {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0;
    }
}

nav::-webkit-scrollbar,
.rrtv-nav::-webkit-scrollbar {
    height: 6px;
}

nav::-webkit-scrollbar-thumb,
.rrtv-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.10);
    border-radius: 10px;
}

/* Links */
nav a,
.rrtv-nav a {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

nav a:hover,
.rrtv-nav a:hover {
    color: var(--accent-green);
}

/* Login button */
.btn-login {
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.btn-login:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

/* Header AUTH helpers */
.rrtv-header-auth,
.rrtv-header-public {
    width: 100%;
    overflow: visible !important;
    pointer-events: auto !important;
}

/* ===============================
   MEN0‰3 DE USUARIO (DROPDOWN)
=============================== */
.user-menu-container {
    position: relative;
    margin-left: 15px;
    z-index: 10002;
}

.btn-user-menu {
    background: transparent;
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

.user-dropdown,
#user-menu-dropdown {
    display: none;
    /* Oculto por defecto */
    position: absolute !important;
    top: calc(100% + 12px) !important;
    /* Un poco m¨¢s de aire */
    right: 0 !important;
    background: #111 !important;
    border: 1px solid #333 !important;
    border-radius: 8px;
    width: 190px;
    min-width: 190px;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    z-index: 100000 !important;
    /* Capa SUPERIOR a todo */
}

/* Clase activa para mostrar */
.user-dropdown.is-open,
#user-menu-dropdown.is-open {
    display: flex !important;
    flex-direction: column !important;
}

.user-dropdown a,
#user-menu-dropdown a {
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid #222;
    display: block;
    white-space: normal;
}

.user-dropdown a:last-child,
#user-menu-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover,
#user-menu-dropdown a:hover {
    background: #1e1e1e;
}

/* ===============================
   HERO Section
=============================== */
.hero {
    height: 65vh;
    min-height: 450px;
    background:
        linear-gradient(to bottom, rgba(18, 18, 18, 0.3), var(--brand-primary)),
        url('../img/hero-running.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 214, 100, 0.1), transparent 60%);
    animation: pulse 4s infinite ease-in-out;
    z-index: 1;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1000px;
}

.hero-logo {
    max-width: 210px;
    width: 100%;
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6));
    transform-style: preserve-3d;
    opacity: 0;
    animation: fadeInLogo 1.5s ease-out forwards, floatPremium 6s ease-in-out infinite 1.5s;
    will-change: transform, opacity;
}

@keyframes fadeInLogo {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes floatPremium {

    0%,
    100% {
        transform: translateY(0) rotateX(0deg);
    }

    50% {
        transform: translateY(-8px) rotateX(2deg);
    }
}

.hero-tagline {
    font-size: 1.4rem;
    color: #f0f0f0;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    font-weight: 600;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.btn-cta {
    display: inline-block;
    background: var(--accent-green);
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(0, 214, 100, 0.4);
    text-decoration: none;
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 30px rgba(0, 214, 100, 0.6);
    color: #000;
}

.hero-login-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.3s, transform 0.2s;
    font-weight: 500;
    padding: 5px 10px;
}

.hero-login-link:hover {
    color: #fff;
    text-decoration: underline;
    transform: translateY(-1px);
}

/* ===============================
   Favorites System (no romper)
=============================== */
.premium-card {
    position: relative;
}

.fav-btn .fav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.fav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    color: white;
}

.fav-btn.active {
    color: var(--accent-green);
    text-shadow: 0 0 10px rgba(0, 214, 100, 0.5);
    border-color: var(--accent-green);
    background: rgba(0, 214, 100, 0.1);
}

/* ===============================
   Sponsors Bar
=============================== */
.sponsors-bar {
    background: var(--brand-secondary);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 60px;
}

.sponsors-title {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.sponsors-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    opacity: 0.6;
    filter: grayscale(100%);
}

/* ===============================
   Card System (Calendar & General)
=============================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.premium-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.premium-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-green);
}

.premium-card.has-image .card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.premium-card.has-image .card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, var(--card-bg), transparent);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.premium-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.premium-card .meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ===============================
   Badges
=============================== */
.status-badge {
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 5;
}

.status-badge.confirmed,
.status-badge.publicada {
    background: var(--accent-green);
    color: #000;
}

.status-badge.pending,
.status-badge.borrador {
    background: #ffcc00;
    color: #000;
}

.status-badge.cancelled {
    background: var(--accent-red);
    color: #fff;
}

.badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    background: #333;
    color: #fff;
}

.badge.status-published {
    background: var(--accent-green);
    color: black;
}

/* ===============================
   News Layout
=============================== */
.news-magazine {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-featured {
    position: relative;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.news-featured-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 10s ease;
}

.news-featured:hover .news-featured-img {
    transform: scale(1.1);
}

.news-featured-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    width: 100%;
}

.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-card-hz {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    height: 140px;
    margin-bottom: 20px;
}

.news-card-hz .content {
    padding: 20px;
}

/* Share bar (reutilizable) */
.rrtv-news-share {
    margin: 14px 0 18px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rrtv-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: transform .12s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.rrtv-share-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.22);
}

.rrtv-share-btn[data-net="wa"]:hover {
    color: #25D366;
    border-color: rgba(37, 211, 102, .45);
}

.rrtv-share-btn[data-net="fb"]:hover {
    color: #1877F2;
    border-color: rgba(24, 119, 242, .45);
}

.rrtv-share-btn[data-net="x"]:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
}

.rrtv-share-btn[data-net="copy"]:hover {
    color: var(--accent-green);
    border-color: rgba(0, 214, 100, .45);
}

/* ===============================
   Coverage Grid
=============================== */
.coverage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* FLYER HTML (Full Area) */
.rrtv-flyer-html {
    width: 100%;
    margin: 0 auto 3rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
    box-shadow: var(--shadow-xl);
}

.flyer-iframe {
    width: 100%;
    border: none;
    display: block;
}

.flyer-desktop {
    aspect-ratio: 16 / 9;
}

.flyer-mobile {
    aspect-ratio: 9 / 16;
    display: none;
    border-radius: var(--radius-lg);
}

@media (max-width: 1024px) {
    .flyer-desktop {
        display: none !important;
    }

    .flyer-mobile {
        display: block !important;
    }
}

.coverage-item {
    aspect-ratio: 9/16;
    background: #333;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.coverage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.coverage-item:hover img {
    transform: scale(1.1);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ===============================
   Auth / Login / AG Auth (mantener)
=============================== */
.auth-container,
.login-container,
.ag-auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 32px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.ag-auth-card {
    max-width: 460px;
    padding: 40px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

/* FIX MAYOR: Forzamos que cualquier contenedor de input sea relativo */
/* Esto atrapa al icono del ojo (absolute) dentro del ¨¢rea del input */
/* Esto es lo que hac¨ªa falta para que el ojo no flote en el medio */
/* En tu HTML es .password-wrapper */
.password-wrapper,
.auth-container form div,
.auth-container form p {
    position: relative !important;
    width: 100%;
}

.auth-logo {
    max-width: 140px;
    height: auto;
    margin: 0 auto 16px auto;
    display: block;
}

.auth-title {
    font-size: 1.8rem;
    margin: 0 0 8px 0;
    color: #fff;
    font-weight: 700;
    font-family: var(--font-heading);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.auth-container input,
.auth-container select,
.login-container input,
.ag-auth-card input,
.ag-auth-card select {
    width: 100%;
    padding: 14px;
    padding-right: 45px !important;
    /* Espacio OBLIGATORIO para el ojo */
    /* FIX: Fondo negro solido */
    background: #111;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    /* FIX: Texto blanco para que no se pierda en fondo negro */
    color: white !important;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 20px;
    /* Margen est¨¢ndar */
    font-family: var(--font-body);
    text-align: left;
    position: relative;
    z-index: 1;
}

.ag-auth-card input,
.ag-auth-card select {
    padding: 16px;
    padding-right: 45px !important;
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* FIX: Placeholder visible (gris claro) */
::placeholder {
    color: #aaa !important;
    opacity: 1;
}

/* Focus */
.auth-container input:focus,
.auth-container select:focus,
.login-container input:focus,
.ag-auth-card input:focus,
.ag-auth-card select:focus {
    outline: none;
    border-color: var(--accent-green);
}

/* FIX: OJO CONTRASE0ˆ5A A LA DERECHA (CONFIRMADO) */
/* El HTML usa la clase .toggle-pass */
.toggle-pass,
.toggle-password,
.password-toggle {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer;
    color: #888;
    z-index: 100;
    /* Siempre encima del input */
    font-size: 1.1rem;
    display: block;
    margin: 0 !important;
    /* Si el input tiene margin-bottom, el wrapper lo contiene, y el absolute se centra en el wrapper */
}

/* Estado hover */
.toggle-pass:hover {
    color: var(--accent-green);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--accent-green);
    color: black;
    font-weight: 800;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
    font-family: var(--font-heading);
}

.btn-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 214, 100, 0.3);
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    text-decoration: none;
    transition: color 0.2s;
    z-index: 10;
}

.close-btn:hover {
    color: white;
}

/* ===============================
   Partners Banner (Global)
=============================== */
.partners-banner {
    background: #0f0f0f;
    padding: 15px 0;
    text-align: center;
    width: 100%;
    margin-top: 40px;
    border-top: 1px solid #222;
}

.partners-title {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    margin-bottom: 30px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1rem;
}

.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.partner-logo {
    max-height: 70px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ===============================
   Social Icons (Header)
=============================== */
.rrtv-logo-with-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rrtv-social {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.rrtv-social-link {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    transition: transform .15s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

/* 
  EL 0‰3NICO Y DEFINITIVO SVG STYLE UNIFICADO.
  Se establece 'currentColor' para heredar el color base blanco (rgba) o el color hover de arriba.
*/
.rrtv-social-link svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
    opacity: 0.7;
    transition: all 0.3s;
}

/* Efecto hover global para el logo */
.rrtv-social-link:hover svg {
    opacity: 1;
    transform: scale(1.2);
}

.rrtv-social-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
}

.rrtv-social-link:focus {
    outline: none;
    border-color: var(--accent-green);
}

/* CONFIGURACI0ˆ7N DE COLORES EN HOVER QUE SE HEREDAN AL SVG MEDIANTE CURRENTCOLOR */
.rrtv-social-link[data-net="wa"]:hover {
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.45);
}

.rrtv-social-link[data-net="ig"]:hover {
    color: #E1306C;
    border-color: rgba(225, 48, 108, 0.45);
}

.rrtv-social-link[data-net="fb"]:hover {
    color: #1877F2;
    border-color: rgba(24, 119, 242, 0.45);
}

.rrtv-social-link[data-net="yt"]:hover {
    color: #FF0000;
    border-color: rgba(255, 0, 0, 0.45);
}

.rrtv-social-link[data-net="mail"]:hover {
    color: var(--accent-green);
    border-color: rgba(0, 214, 100, 0.45);
}



/* ===============================
   Mobile tweaks (premium base)
=============================== */
@media (max-width: 768px) {
    .hero-logo {
        max-width: 150px;
        margin-bottom: 20px;
    }

    .hero-tagline {
        font-size: 1.1rem !important;
        letter-spacing: 1px !important;
        margin-bottom: 20px !important;
    }

    .btn-cta {
        padding: 12px 30px !important;
        font-size: 1rem !important;
        width: auto;
        min-width: 200px;
    }

    /* header nav m¨¢s compacto */
    nav a,
    .rrtv-nav a {
        font-size: 0.82rem;
    }

    nav,
    .rrtv-nav {
        gap: 14px;
    }

    .rrtv-share-btn {
        width: 100%;
    }

    .news-magazine {
        grid-template-columns: 1fr;
    }

    .coverage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {

    .auth-container,
    .login-container,
    .ag-auth-card {
        width: 90%;
        padding: 30px 20px;
        max-width: 100%;
    }
}

/* FIX: Alineaci¨®n de Logo + Redes + Men¨² */
.rrtv-header-public .container,
.rrtv-header-auth .container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
}

/* Contenedor del logo y redes */
.logo-container.rrtv-logo-with-social {
    display: flex !important;
    align-items: center !important;
    gap: 15px;
    /* Espacio entre logo y redes */
}

/* Ajuste de las redes para que no ocupen mucho espacio */
.rrtv-social {
    display: flex !important;
    gap: 8px;
    align-items: center;
}

/* Posicionamiento de Redes a la Izquierda (Regla 0) */
.rrtv-header-public .container,
.rrtv-header-auth .container {
    position: relative;
    /* Necesario para el anclaje */
}

.rrtv-social {
    display: flex !important;
    align-items: center;
    gap: 12px;
    position: absolute;
    left: 180px;
    /* Ajusta este n¨²mero seg¨²n el ancho de tu LOGO */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Solo para p¨¢ginas que NO sean el index */
body:not(.home) .rrtv-social {
    display: flex !important;
    align-items: center;
    gap: 12px;
    position: absolute;
    left: 190px;
    /* Ajustado para dar aire tras el logo */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Si tu body en el index tiene una clase como 'home' o 'index', 
   usamos esto para asegurar que no aparezcan ah¨ª por error de CSS */
.index-page .rrtv-social,
#home-body .rrtv-social {
    display: none !important;
}

/* --- PC: REGLA 0 (TODO EN SU LUGAR) --- */
@media (min-width: 769px) {
    .rrtv-social {
        display: flex !important;
        position: absolute;
        left: 190px;
        top: 50%;
        transform: translateY(-50%);
        gap: 12px;
    }
}

/* --- PC: Redes al lado del logo --- */
@media (min-width: 769px) {
    .rrtv-social-pc {
        position: absolute;
        left: 190px;
        top: 50%;
        transform: translateY(-50%);
    }

    .rrtv-social-pc .menu-label {
        display: none;
    }

    /* No hace falta el texto en PC */
    .social-icons-row {
        display: flex;
        gap: 10px;
    }
}

/* --- RESTAURACI0ˆ7N PC (REGLA 0) --- */
@media (min-width: 769px) {
    .rrtv-social {
        display: flex !important;
        position: absolute;
        left: 190px;
        /* Ajuste para que respiren despu¨¦s del logo */
        top: 50%;
        transform: translateY(-50%);
        gap: 15px;
        /* Espacio entre iconos */
    }
}

/* --- SOLUCI0ˆ7N M0ˆ7VIL SIN SUPERPOSICI0ˆ7N --- */
@media (max-width: 768px) {

    /* Para que NO se superpongan con el men¨² ¡Ô, 
       las ocultamos del cabezal en m¨®vil. 
       El impacto lo daremos en la barra de navegaci¨®n inferior.
    */
    .rrtv-social,
    .rrtv-social-pc {
        display: none !important;
    }

    header .container,
    .rrtv-header-public .container,
    .rrtv-header-auth .container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
}

/* FIX DEFINITIVO PARA M0ˆ7VILES */
@media (max-width: 768px) {

    /* 1. Forzamos que el contenedor sea una fila limpia */
    header .container,
    .rrtv-header-public .container,
    .rrtv-header-auth .container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        /* Prohibido que salte de l¨ªnea */
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }

    /* 2. OCULTAMOS las redes del cabezal en m¨®vil */
    /* As¨ª liberamos el espacio central y evitamos que se pisen */
    .rrtv-social,
    .rrtv-social-pc,
    .rrtv-logo-with-social .rrtv-social {
        display: none !important;
    }

    /* 3. El Logo se queda tranquilo a la izquierda */
    .logo-container {
        flex: 0 0 auto !important;
        margin: 0 !important;
    }

    /* 4. El Men¨² se queda tranquilo a la derecha */
    .user-menu-container,
    #header-auth,
    .nav-menu {
        flex: 0 0 auto !important;
        margin-left: auto !important;
    }
}


/* ===============================
   NEW SIDEBAR LAYOUT (RRTV)
=============================== */
:root {
    --sidebar-width: 260px;
    --sidebar-bg: #111;
    --sidebar-hover: #1e1e1e;
}

@media (min-width: 1025px) {
    body:not(.home):not(.auth-page):not(.login-page):not(.ag-auth-page) {
        padding-top: 0 !important;
        padding-left: var(--sidebar-width) !important;
    }

    .rrtv-mobile-topbar {
        display: none !important;
    }

    header.rrtv-header-auth,
    header.rrtv-header-public {
        display: none !important;
    }
}

.rrtv-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding-bottom: 80px;
    /* Asegurar espacio para el fondo */
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
}

.sidebar-title {
    font-family: \'Montserrat\', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-user-profile {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #222;
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: #333;
    border: 2px solid var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.user-greeting {
    font-size: 0.8rem;
    color: #aaa;
}

.user-name {
    font-size: 1.1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 10px 40px 10px;
    display: flex;
    flex-direction: column;
    /* Se remueve flex-wrap: nowrap para evitar overflow horizontal forzado */
    gap: 5px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #dfdfdf;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
    /* Forzar que ocupe todo el ancho sin salir de su padre */
    box-sizing: border-box;
    /* Previene el padding empujando hacia afuera */
}

.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active {
    background: rgba(0, 214, 100, 0.05);
    color: var(--accent-green);
    /* transform: translateX(6px); */
    /* border-left: 3px solid var(--accent-green); */
    box-shadow: inset 20px 0 20px -20px rgba(0, 214, 100, 0.2);
}

.sidebar-nav .nav-item.active {
    background: rgba(0, 214, 100, 0.1);
    /* border-left: 4px solid var(--accent-green); */
    border-radius: 8px;
    /* padding-left: 16px; evitar movimiento */
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #222;
}

.logout-btn {
    color: #ff4a4a !important;
}

.logout-btn:hover {
    background: rgba(255, 74, 74, 0.1) !important;
    color: #ff4a4a !important;
}

/* Mobile Topbar */
.rrtv-mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #121212;
    border-bottom: 1px solid #222;
    z-index: 99999;
    display: flex;
    align-items: center;
    padding: 0 15px;
    justify-content: space-between;
}

.hamburger-btn,
.close-sidebar-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.hamburger-btn:hover,
.close-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.close-sidebar-btn {
    display: none;
}

@media (max-width: 1024px) {
    body:not(.auth-page):not(.login-page):not(.ag-auth-page) {
        padding-top: 60px !important;
        padding-left: 0 !important;
    }

    .rrtv-sidebar {
        transform: translateX(-100%);
    }

    .rrtv-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
        width: min(var(--sidebar-width), 80vw);
        /* Para que en un 360x640 como motog no se trague toda la pantalla y presione los subhijos */
    }

    .close-sidebar-btn {
        display: flex;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 99998;
        display: none;
        backdrop-filter: blur(4px);
    }

    .sidebar-overlay.is-active {
        display: block;
    }

    .sidebar-header {
        padding: 15px 20px;
    }

    .sidebar-user-profile {
        padding: 15px 20px;
    }

    .sidebar-nav {
        padding: 10px;
        gap: 2px;
    }

    .sidebar-nav .nav-item {
        padding: 8px 14px;
        font-size: 0.85rem;
        gap: 8px;
    }
}

/* Strict Social Media Colors (Phase 4)
   Force brand colors on hover (Desktop)
   Force brand colors always (Mobile)
=============================== */
.sidebar-socials .social-icon {
    font-size: 1.4rem;
    color: #fff !important;
    /* White by default on desktop */
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Hover effects (Desktop) - !important to override .nav a:hover */
.sidebar-socials .social-icon.whatsapp:hover {
    color: #25D366 !important;
    transform: scale(1.1);
}

.sidebar-socials .social-icon.instagram:hover {
    color: #E1306C !important;
    transform: scale(1.1);
}

.sidebar-socials .social-icon.facebook:hover {
    color: #1877F2 !important;
    transform: scale(1.1);
}

.sidebar-socials .social-icon.youtube:hover {
    color: #FF0000 !important;
    transform: scale(1.1);
}

.sidebar-socials .social-icon.email:hover {
    color: #00D664 !important;
    transform: scale(1.1);
}

/* Mobile: always show brand colors */
@media (max-width: 991px) {
    .sidebar-socials .social-icon.whatsapp {
        color: #25D366 !important;
    }

    .sidebar-socials .social-icon.instagram {
        color: #E1306C !important;
    }

    .sidebar-socials .social-icon.facebook {
        color: #1877F2 !important;
    }

    .sidebar-socials .social-icon.youtube {
        color: #FF0000 !important;
    }

    .sidebar-socials .social-icon.email {
        color: #00D664 !important;
    }
}

/* ===============================
   Phase 6: Mobile 9:16 Optimizations (Calendar)
=============================== */
@media (max-width: 500px) {
    .rrtv-calendar-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 5px !important;
    }

    .rrtv-calendar-card {
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    }

    .rrtv-calendar-image {
        min-height: 220px !important;
        background-position: center top !important;
        /* Prevents heads getting chopped off */
    }

    .rrtv-calendar-content {
        padding: 15px !important;
    }

    .rrtv-calendar-title {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
    }

    .rrtv-calendar-meta {
        flex-direction: column !important;
        gap: 6px !important;
    }

    .rrtv-calendar-meta span {
        font-size: 0.85rem !important;
    }

    .rrtv-top-filters {
        flex-direction: column !important;
    }

    .rrtv-filter-select {
        width: 100% !important;
        font-size: 1rem !important;
        padding: 12px 15px !important;
    }

    .rrtv-recommended-badge {
        font-size: 0.6rem !important;
        padding: 4px 8px !important;
    }
}

/* ===============================
   FASE 8: AUSPICIOS (SPONSORS F1/F2 DUAL)
=============================== */
/* =========================================================================
   MÓDULO 100% AISLADO: FLYERS MÓVILES (F1/F2)
   Arquitectura independiente para evitar bugs de Safari/Flexbox del Desktop
========================================================================= */
.rrtv-mob-flyer-wrap {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.rrtv-mob-flyer-zone {
    width: 100%;
    max-width: 450px;
    /* Previene estiramiento infinito en Tablets */
    position: relative;
    display: block;
    /* Cero Flexbox aquí */
    background: transparent;
    border-radius: 8px;
    /* Bordes más finos para vista móvil */
    overflow: hidden;
    margin: 0 auto;
}

/* Forzamos proporción ultradelgada/panorámica (similar a ancho:alto 3:1)
   Al usar padding-top en porcentaje, la caja crece/decrece en proporción perfecta 
   sin importar el scroll o tamaño, bloqueando cálculos de navegador móvil */
.rrtv-mob-flyer-zone::before {
    content: "";
    display: block;
    padding-top: 30%;
    /* Ratio super panorámico horizontal */
}

/* Los slides se superponen absolutamente para las transiciones */
.rrtv-mob-flyer-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 1;
    display: block;
}

.rrtv-mob-flyer-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.rrtv-mob-flyer-slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    /* Contexto para la imagen absoluta */
}

/* Imagen blindada en posición absoluta. 
   Esto la inmuniza contra cualquier CSS genérico 'height: auto' global */
.rrtv-mob-flyer-slide img,
.rrtv-mob-flyer-slide video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    max-width: none !important;
    border-radius: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

/* BARRA LATERAL DESKTOP (300x600) */
main.rrtv-has-sponsors {
    /* En lugar de Grid, simplemente damos margen derecho para que el contenido no 
       se meta debajo de los Sponsors fijos */
    padding-right: 240px !important;
    box-sizing: border-box !important;
}

@media (max-width: 1200px) {
    main.rrtv-has-sponsors {
        padding-right: 200px !important;
    }
}

.rrtv-sponsor-sidebar {
    width: 240px;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    border-left: 1px solid var(--border-color);
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    padding: 5px 10px;
    gap: 8px;
    overflow-y: hidden;
    z-index: 100000;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .rrtv-sponsor-sidebar {
        width: 200px;
    }
}

/* Distribución inteligente (Si hay solo F1, se centra. Si hay ambos, 50% cada uno) */
.rrtv-sponsor-slot {
    flex: 1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LOS ITEMS DENTRO DE LOS SLOTS GENERALES */
.rrtv-sponsor-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rrtv-sponsor-item.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.rrtv-sponsor-item img,
.rrtv-sponsor-item video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 12px !important;
}

/* ===============================
   SIDEBAR EVENT BUTTONS - MOBILE
   Logo centrado arriba, nombre abajo
=============================== */
@media (max-width: 1024px) {
    .nav-item.eo-nav-btn,
    .nav-item.tv-nav-btn {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
        gap: 5px !important;
        padding: 10px 12px !important;
        font-size: 0.78rem;
    }
    .nav-item.eo-nav-btn img,
    .nav-item.tv-nav-btn img {
        height: 26px !important;
        width: auto;
    }
}