/* =====================================================
   VARIÁVEIS E PALETA DE CORES (Baseada na nova imagem)
===================================================== */
:root {
    /* Cores principais da imagem */
    --z-blue-dark: #030b1c;   /* Azul quase preto (Navbar/Footer/Hero base) */
    --z-blue-deep: #0a1f44;   /* Azul marinho profundo (Seções escuras) */
    --z-cyan: #00a8ff;        /* Azul brilhante (Destaques e linhas) */
    --z-cyan-light: #7dd3fc;  /* Ciano claro (Textos secundários) */
    
    /* Cores de apoio (Mantidas para contraste e identidade) */
    --z-yellow: #ffe600;      /* Amarelo original (Botões principais) */
    --z-paper: #f4f8fc;       /* Fundo do site (Branco levemente azulado) */
    --z-paper-2: #e6f0fa;     /* Fundo alternativo para seções */
    
    /* Gradientes */
    --z-tech-grad: linear-gradient(135deg, var(--z-cyan), var(--z-blue-deep));
    --z-sun: linear-gradient(135deg, var(--z-yellow), #ffaa00); /* Mantido para o player */

    /* Utilitários */
    --z-radius: 1rem;
    --z-shadow: 0 4px 14px rgba(3, 11, 28, .06);
    --z-shadow-lg: 0 10px 30px rgba(3, 11, 28, .12);
}

/* =====================================================
   1. BASE E TIPOGRAFIA
===================================================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-family: 'Figtree', sans-serif;
    background: var(--z-paper);
    color: var(--z-blue-dark);
    padding-bottom: 100px;
}

h1, h2, h3, h4, .navbar-brand {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    letter-spacing: -.02em;
}

a {
    color: var(--z-cyan);
    text-decoration: none;
    transition: color .2s ease;
}

a:hover {
    color: var(--z-blue-deep);
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--z-cyan);
    outline-offset: 3px;
}

.min-w-0 {
    min-width: 0;
}

/* =====================================================
   2. NAVBAR
===================================================== */
.navbar {
    background: var(--z-blue-dark);
    min-height: 58px;
    border-bottom: 1px solid rgba(0, 168, 255, 0.15);
}

.navbar .container {
    position: relative;
}

.navbar .nav-link {
    color: #fff;
    font-weight: 500;
    transition: color .2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--z-cyan);
}

.navbar-brand {
    position: relative;
    display: flex;
    align-items: center;
    height: 58px;
    padding: 0;
    margin: 0;
}

.navbar-brand img {
    position: absolute;
    top: 50%;
    left: 0;
    height: 90px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    transform: translateY(-50%);
    z-index: 2;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

/* =====================================================
   3. BOTÃO AO VIVO (Navbar)
===================================================== */
.btn-live {
    background: var(--z-tech-grad);
    border: 0;
    color: #fff;
    font-weight: 700;
    border-radius: 50rem;
    transition: filter .2s ease, transform .2s ease;
    box-shadow: 0 4px 15px rgba(0, 168, 255, 0.3);
}

.btn-live:hover {
    filter: brightness(1.15);
    color: #fff;
    transform: translateY(-1px);
}

/* =====================================================
   4. HERO / DESTAQUE PRINCIPAL
===================================================== */
.hero {
    position: relative;
    background-color: var(--z-blue-dark);
    background-image: url("../img/fundo.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow: hidden;
    padding: 4.5rem 0 8rem;
    isolation: isolate;
}

/* Overlay Azul Escuro para garantir leitura do texto */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(3, 11, 28, 0.92) 0%,
        rgba(10, 31, 68, 0.70) 50%,
        rgba(3, 11, 28, 0.30) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Fade suave na base (substitui a meia-lua verde) */
.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--z-paper));
    z-index: 2;
    pointer-events: none;
}

/* Conteúdo acima de tudo */
.hero .container {
    position: relative;
    z-index: 3;
}

/* Textos do Hero */
.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4.4rem);
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero .lead {
    max-width: 34ch;
    font-weight: 400;
    color: var(--z-cyan-light);
}

.hero-logo {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .5));
}

.freq {
    display: inline-block;
    background: rgba(0, 168, 255, 0.15);
    color: var(--z-cyan-light);
    border: 1px solid var(--z-cyan);
    backdrop-filter: blur(8px);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    padding: .2rem .9rem;
    border-radius: .6rem;
    transform: rotate(-2deg);
}

/* Botões do Hero */
.hero .btn-dark {
    background-color: var(--z-yellow);
    color: var(--z-blue-dark);
    border-color: var(--z-yellow);
    box-shadow: 0 4px 15px rgba(255, 230, 0, 0.25);
    transition: all .2s ease;
}
.hero .btn-dark:hover {
    background-color: #fff;
    border-color: #fff;
    color: var(--z-blue-dark);
    transform: translateY(-2px);
}

.hero .btn-outline-dark {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    transition: all .2s ease;
}
.hero .btn-outline-dark:hover {
    background-color: #fff;
    color: var(--z-blue-dark);
    border-color: #fff;
    transform: translateY(-2px);
}

/* =====================================================
   5. SEÇÕES GERAIS
===================================================== */
section {
    padding: 4rem 0;
}

.sec-title {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    color: var(--z-blue-dark);
}

.sec-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 6px;
    border-radius: 4px;
    background: var(--z-tech-grad);
    margin-top: .6rem;
}

/* Seções com fundo escuro */
.bg-green {
    background: var(--z-blue-deep);
    color: #fff;
}

.bg-green .sec-title {
    color: #fff;
}

/* Seções com fundo claro alternativo */
.bg-paper2 {
    background: var(--z-paper-2);
}

/* =====================================================
   6. PROGRAMAÇÃO
===================================================== */
.day-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .4rem;
    padding-bottom: .3rem;
    scrollbar-width: thin;
}

.day-pills .nav-link {
    color: var(--z-blue-dark);
    background: #fff;
    border: 1px solid var(--z-paper-2);
    white-space: nowrap;
    border-radius: 50rem;
    transition: all .2s ease;
}

.day-pills .nav-link:hover {
    border-color: var(--z-cyan);
}

.day-pills .nav-link.active {
    background: var(--z-blue-deep);
    color: var(--z-cyan-light);
    border-color: var(--z-blue-deep);
}

/* Card do programa — maior e mais espaçoso */
.slot {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    background: #fff;
    border-radius: 1rem;
    padding: 1.2rem 1.5rem;
    margin-bottom: .8rem;
    border-left: 6px solid var(--z-cyan);
    box-shadow: var(--z-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.slot:hover {
    transform: translateX(4px);
    box-shadow: var(--z-shadow-lg);
}

.slot-live {
    border-left-color: var(--z-yellow);
    background: #fffdf0;
}

.slot-time {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    min-width: 85px;
    line-height: 1;
    color: var(--z-blue-deep);
}

.slot-time small {
    display: block;
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    font-size: .8rem;
    color: #667;
    margin-top: 4px;
}

.slot .flex-grow-1 strong {
    font-size: 1.25rem;
    display: block;
    margin-bottom: 0.2rem;
}

/* Botão que envolve a imagem para ampliar */
.slot-img-btn {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    padding: 0;
    border: none;
    background: none;
    border-radius: 0.8rem;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: block;
    box-shadow: 0 4px 15px rgba(3, 11, 28, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slot-img-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(3, 11, 28, 0.25);
}

/* Efeito de lupa ao passar o mouse */
.slot-img-btn::after {
    content: "\F52A";
    font-family: "bootstrap-icons";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.slot-img-btn:hover::after {
    opacity: 1;
}

/* Imagem dentro do botão */
.slot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Placeholder (ícone de microfone) */
.slot-img-placeholder {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    display: grid;
    place-items: center;
    background: rgba(0, 168, 255, 0.1);
    color: var(--z-cyan);
    font-size: 2.5rem;
    border-radius: 0.8rem;
}

/* Destaque para o programa "No Ar" */
.slot-live .slot-img-btn {
    border: 3px solid var(--z-yellow);
    box-shadow: 0 0 20px rgba(255, 230, 0, 0.4);
}

/* Ajuste no Mobile */
@media (max-width: 767px) {
    .slot {
        padding: 1rem;
        gap: 1rem;
    }
    .slot-img-btn,
    .slot-img-placeholder {
        flex: 0 0 80px;
        width: 80px;
        height: 80px;
    }
    .slot-img-placeholder { font-size: 1.8rem; }
    .slot-time { font-size: 1.3rem; min-width: 70px; }
    .slot .flex-grow-1 strong { font-size: 1.1rem; }
}

@media (max-width: 575px) {
    .slot-img-btn,
    .slot-img-placeholder {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
        border-radius: 0.5rem;
    }
    .slot-img-placeholder { font-size: 1.4rem; }
    .slot-time { font-size: 1.1rem; min-width: 60px; }
}

/* =====================================================
   MODAL NATIVO (Dialog) — usado pela programação e notícias
===================================================== */
.native-modal {
    border: none;
    border-radius: 1rem;
    padding: 0;
    background: transparent;
    max-width: 90vw;
    max-height: 90vh;
    width: 1000px;
}

.native-modal::backdrop {
    background: rgba(3, 11, 28, 0.9);
    backdrop-filter: blur(5px);
}

.native-modal-content {
    background: var(--z-blue-dark);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.native-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.native-modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.native-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.native-modal-body {
    position: relative;
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* Modal da programação: fundo preto, imagem centralizada */
dialog[id^="progModal-"] .native-modal-content {
    background: #000;
    max-width: 900px;
    margin: auto;
}

dialog[id^="progModal-"] .native-modal-header {
    background: var(--z-blue-dark);
}

/* =====================================================
   7. VÍDEOS
===================================================== */
.video-card {
    border: 0;
    border-radius: 1.1rem;
    overflow: hidden;
    box-shadow: var(--z-shadow-lg);
    height: 100%;
    background: #fff;
    transition: transform .2s ease;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 0;
    background: var(--z-blue-dark);
    cursor: pointer;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .85;
    transition: opacity .3s ease, transform .3s ease;
}

.video-thumb:hover img {
    opacity: 1;
    transform: scale(1.02);
}

.play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 168, 255, 0.9);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform .2s ease, background .2s ease;
}

.video-thumb:hover .play {
    transform: scale(1.1);
    background: var(--z-cyan);
}

/* =====================================================
   8. NOTÍCIAS / EVENTOS (Card estilo notícia)
===================================================== */
.news-card {
    display: block;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--z-shadow);
    transition: transform .3s ease, box-shadow .3s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--z-shadow-lg);
}

.news-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--z-blue-dark);
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.news-card:hover .news-card-img img {
    transform: scale(1.05);
}

.news-card-img .count {
    position: absolute;
    top: .6rem;
    right: .6rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--z-cyan);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 50rem;
    padding: .15rem .6rem;
    font-size: .8rem;
    backdrop-filter: blur(4px);
}

.news-card-body {
    padding: 1rem 1.2rem 1.2rem;
}

.news-card-body .text-cyan {
    color: var(--z-cyan);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.news-card-body h3 {
    color: var(--z-blue-dark);
    font-weight: 700;
    line-height: 1.3;
}

.news-card-body p {
    color: #667;
    line-height: 1.5;
}

/* Ajustes para a legenda nativa da GLightbox combinar com o tema */
.glightbox-clean .gslide-description {
    background: rgba(3, 11, 28, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 8px;
}

.glightbox-clean .gslide-title {
    color: var(--z-cyan-light);
    font-weight: 800;
    font-family: 'Bricolage Grotesque', sans-serif;
}

.glightbox-clean .gslide-desc {
    color: #ddd;
    font-family: 'Figtree', sans-serif;
}

/* =====================================================
   9. PUBLICIDADE
===================================================== */
.ad-img {
    position: relative;
    display: block;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--z-shadow);
}

.ad-img img {
    display: block;
    width: 100%;
    height: auto;
}

.ad-square img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.ad-tag {
    position: absolute;
    top: 6px;
    left: 8px;
    z-index: 1;
    font-size: .65rem;
    background: rgba(255, 255, 255, .9);
    padding: 0 .4rem;
    border-radius: 4px;
    color: var(--z-blue-dark);
    font-weight: 600;
}

.sponsor {
    background: #fff;
    border-radius: .8rem;
    padding: .8rem;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--z-shadow);
    transition: box-shadow .2s ease;
}

.sponsor:hover {
    box-shadow: var(--z-shadow-lg);
}

.sponsor img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* =====================================================
   10. RODAPÉ
===================================================== */
footer {
    background: var(--z-blue-dark);
    color: #a0b2c6;
    padding: 3rem 0 2rem;
    border-top: 1px solid rgba(0, 168, 255, 0.1);
}

footer a {
    color: var(--z-cyan-light);
    text-decoration: none;
    transition: color .2s ease;
}

footer a:hover {
    color: var(--z-cyan);
}

footer img {
    height: 75px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    filter: brightness(1.1); /* Destaca a logo no fundo escuro */
}

/* =====================================================
   11. PLAYER FIXO
===================================================== */
.player-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: var(--z-blue-dark);
    color: #fff;
    border-top: 4px solid var(--z-cyan);
    padding: .6rem 0 calc(.6rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.player-bar img {
    height: 65px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.btn-play {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 0;
    background: var(--z-sun);
    color: var(--z-black);
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.4);
    transition: transform .2s ease;
}

.btn-play:hover {
    transform: scale(1.05);
}

.player-bar .form-range {
    width: 120px;
}

/* Equalizador */
.eq {
    display: inline-flex;
    gap: 3px;
    align-items: flex-end;
    height: 14px;
    vertical-align: middle;
}

.eq i {
    width: 3px;
    background: var(--z-cyan);
    height: 30%;
    border-radius: 2px;
}

.playing .eq i {
    animation: eq 1s ease-in-out infinite;
}

.playing .eq i:nth-child(2) {
    animation-delay: .2s;
}

.playing .eq i:nth-child(3) {
    animation-delay: .4s;
}

.playing .eq i:nth-child(4) {
    animation-delay: .6s;
}

@keyframes eq {
    0%, 100% {
        height: 25%;
    }
    50% {
        height: 100%;
    }
}

/* =====================================================
   12. ACESSIBILIDADE
===================================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .playing .eq i {
        animation: none;
        height: 70%;
    }
}

/* =====================================================
   13. RESPONSIVIDADE
===================================================== */
@media (max-width: 991px) {
    .hero {
        padding: 3rem 0 5rem;
        background-attachment: scroll; /* Melhora performance no mobile */
    }
}

@media (max-width: 767px) {
    .navbar-brand img {
        height: 76px;
        max-width: 200px;
    }

    .player-bar img {
        height: 58px;
        max-width: 150px;
    }

    footer img {
        height: 68px;
        max-width: 200px;
    }
}

@media (max-width: 575px) {
    body {
        padding-bottom: 90px;
    }

    section {
        padding: 3rem 0;
    }

    .hero {
        padding: 2.5rem 0 6rem;
    }

    .slot-time {
        min-width: 60px;
        font-size: 1.1rem;
    }

    .player-bar img {
        height: 52px;
        max-width: 130px;
    }

    .player-bar .form-range {
        width: 80px;
    }

    footer img {
        height: 60px;
        max-width: 180px;
    }
}