/* ============================================================
   Canal Meteo TV — Anúnciate Navigation Extras
   ------------------------------------------------------------
   Estilos adicionales para destacar la opción "Anúnciate"
   en el menú, el footer, y arreglar problemas de scroll
   en versión móvil.
   ============================================================ */

/* ============================================================
   1) BOTÓN DESTACADO "ANÚNCIATE" EN HEADER
   Junto al botón "EN VIVO" / "WATCH LIVE", pero en naranja.
   ============================================================ */
.anunciate-cta {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    background: linear-gradient(135deg, #F39C12 0%, #d97f06 100%);
    color: #fff !important;
    border-radius: 999px;
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    box-shadow: 0 2px 8px rgba(243, 156, 18, .35);
    border: none;
    white-space: nowrap;
    margin-left: .5rem;
}
.anunciate-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(243, 156, 18, .5);
    filter: brightness(1.05);
    color: #fff !important;
}
.anunciate-cta::before {
    content: "📨";
    font-size: 1em;
}

/* En pantallas pequeñas, solo el ícono para ahorrar espacio */
@media (max-width: 480px) {
    .anunciate-cta {
        padding: .5rem .7rem;
        font-size: 0;       /* oculta el texto */
        gap: 0;
    }
    .anunciate-cta::before {
        font-size: 1.1rem;
    }
}

/* ============================================================
   2) HIGHLIGHT EN MENÚ NORMAL (item "Anúnciate" dentro de "Más")
   Soporta site-config.json con highlight: "anunciate"
   ============================================================ */
.menu-highlight-anunciate > a,
.menu-highlight-anunciate a {
    color: #F39C12 !important;
    font-weight: 700 !important;
    position: relative;
}
.menu-highlight-anunciate > a::before,
.menu-highlight-anunciate a::before {
    content: "📨 ";
    margin-right: .2em;
}
.menu-highlight-anunciate > a::after,
.menu-highlight-anunciate a::after {
    content: "NUEVO";
    display: inline-block;
    margin-left: .5em;
    background: #F39C12;
    color: #fff;
    font-size: .65em;
    font-weight: 700;
    padding: .15em .5em;
    border-radius: 4px;
    vertical-align: middle;
    letter-spacing: .04em;
}
.menu-highlight-anunciate:hover > a,
.menu-highlight-anunciate:hover a {
    background: rgba(243, 156, 18, .08);
}

/* ============================================================
   3) FIX SCROLL EN MENÚ MÓVIL
   Algunos dispositivos quedan "enganchados" en el menú móvil
   cuando hay muchos items y no caben en la pantalla.
   Aseguramos scroll vertical interno con momentum táctil.
   ============================================================ */
@media (max-width: 1024px) {
    .nav-mobile,
    .nav-mobile.active {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;  /* momentum iOS */
        max-height: 100vh;
        max-height: 100dvh;                  /* dynamic viewport para iOS Safari */
        overscroll-behavior: contain;        /* evita scroll del body al final */
    }
    .nav-mobile .mobile-menu,
    .nav-mobile ul.mobile-menu {
        padding-bottom: 4rem;                /* espacio extra al final para llegar al último item */
    }
    /* Asegurar que los submenús expandidos no rompan el scroll */
    .mobile-dropdown-menu,
    .mobile-submenu-menu {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* ============================================================
   4) DESTACADO "ANÚNCIATE" EN FOOTER
   Selector específico para enlaces que apunten a anunciate.php
   sin necesidad de modificar footer.php.
   ============================================================ */
.footer-links a[href*="anunciate.php"],
.footer-links a[href$="/anunciate"],
.footer-links a[href*="/anunciate?"] {
    color: #F39C12 !important;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .65rem;
    margin-left: -.65rem;                    /* alinea con resto de items */
    background: rgba(243, 156, 18, .1);
    border-radius: 6px;
    transition: background .15s ease, transform .15s ease;
}
.footer-links a[href*="anunciate.php"]::before,
.footer-links a[href$="/anunciate"]::before,
.footer-links a[href*="/anunciate?"]::before {
    content: "📨";
    font-size: 1em;
}
.footer-links a[href*="anunciate.php"]:hover,
.footer-links a[href$="/anunciate"]:hover,
.footer-links a[href*="/anunciate?"]:hover {
    background: rgba(243, 156, 18, .2);
    transform: translateX(2px);
    color: #d97f06 !important;
}

/* ============================================================
   5) Posición del CTA en el header desktop / móvil
   ============================================================ */
/* Desktop: junto al botón live-button del header */
@media (min-width: 1025px) {
    .header-actions .anunciate-cta,
    .live-button + .anunciate-cta {
        margin-left: .75rem;
    }
}

/* Móvil: visible junto al toggle de menú */
@media (max-width: 1024px) {
    .anunciate-cta {
        margin-left: auto;
        margin-right: .5rem;
    }
}
