/* ==========================================================================
   1. RESET E VARIÁVEIS (PADRÃO PREMIUM DARK)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --primary: #00ff64;         /* Verde Neon */
    --bg-dark: #020508;         /* Azul Noite Profundo */
    --surface: #0a0d12;         /* Cinza para Cards */
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-dim: #94a3b8;        /* Cinza para descrições */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

/* ==========================================================================
   2. NAVBAR (LOGO À ESQUERDA | LINKS E BUSCA À DIREITA)
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 8%;
    background-color: rgba(2, 5, 8, 0.98);
    border-bottom: 2px solid #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 2000;
}

.mobile-menu {
    display: none !important;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img { height: 40px; border-radius: 5px; }
.logo span {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    transition: var(--transition);
    text-transform: uppercase;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary);
}

/* CONTAINER DE BUSCA (EXPANSÃO PARA A DIREITA) */
.search-item-wrapper {
    display: flex;
    align-items: center;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    order: 1;
}

#search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: white;
    outline: none;
    width: 0; 
    opacity: 0;
    padding: 0;
    border-radius: 20px;
    transition: var(--transition);
    font-size: 13px;
    pointer-events: none;
    order: 2;
}

#search-input.active {
    width: 200px;
    opacity: 1;
    padding: 8px 15px;
    pointer-events: all;
    margin-left: 10px;
}

.search-results {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    width: 320px;
    background: #0f1216;
    border: 1px solid var(--primary);
    border-radius: 8px;
    display: none;
    flex-direction: column;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    z-index: 9999;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.search-result-item img { width: 50px; height: 30px; object-fit: cover; border-radius: 4px; }
.search-result-info span { font-size: 13px; font-weight: 600; color: #fff; }
.search-result-info small { font-size: 10px; color: var(--primary); text-transform: uppercase; }

.btn-subscribe {
    background-color: var(--bg-dark);
    border: 1px solid #ffffff;
    color: #ffffff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    margin-left: 20px;
}

.btn-subscribe:hover {
    transform: scale(1.05);
    background-color: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

/* ==========================================================================
   3. BANNER (VERSÃO DEFINITIVA: SEM CORTES E SEM FICAR PEQUENO)
   ========================================================================== */
#inicio {
    width: 100%;
    background-color: #000;
    overflow: hidden;
}

.banner { 
    width: 100%;
    height: 54vh;
    object-fit: fill;
    display: block;
}

@media (min-width: 1600px) {
    .banner {
        height: 570px;
    }
}

.section_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 8% 15px 8%;
    border-bottom: 1px solid #1a1a1a;
}

.section_header p {
    font-size: 20px;
    font-weight: 800;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
    text-transform: uppercase;
}

.ver-todos-btn {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    font-size: 11px;
}

/* ==========================================================================
   4. CARROSSEL (CARDS 240PX)
   ========================================================================== */
.carousel-wrapper { position: relative; display: flex; align-items: center; padding: 0 4%; }
.podcast_grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding: 25px 4%;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    width: 100%;
}
.podcast_grid::-webkit-scrollbar { display: none; }

.podcast_card {
    min-width: 240px;
    max-width: 240px;
    flex: 0 0 auto;
    background: var(--surface);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    scroll-snap-align: start;
    transition: var(--transition);
}
.podcast_card:hover { border-color: var(--primary); transform: translateY(-5px); }
.podcast_banner { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.podcast_title { font-size: 16px; font-weight: 750; margin-top: 10px; color: #fff; }
.podcast_desc { font-size: 12px; color: var(--text-dim); margin-top: 5px;}

/* CORTES / SHORTS: cards verticais 9:16 */
.shorts_grid {
    gap: 18px;
    align-items: stretch;
}

.short_card {
    min-width: 185px;
    max-width: 185px;
    padding: 10px;
}

.short_banner {
    aspect-ratio: 9 / 16;
    object-fit: cover;
    object-position: center;
    background: #05070a;
}

.short_card .podcast_title {
    font-size: 14px;
    line-height: 1.35;
    margin-top: 9px;
}

.short_desc {
    font-size: 11px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.arrow-left, .arrow-right {
    position: absolute;
    background: rgba(0, 255, 100, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.arrow-left { left: 1%; } .arrow-right { right: 1%; }

/* ==========================================================================
   5. CÂMERAS E FILTROS
   ========================================================================== */
.cameras-container { padding: 40px 8%; }
.filters { display: flex; gap: 10px; margin-bottom: 30px; overflow-x: auto; padding-bottom: 10px; }
.filters::-webkit-scrollbar { display: none; }

.filter-btn {
    background: #111; color: #fff; border: 1px solid #333; padding: 10px 20px;
    border-radius: 30px; font-size: 11px; font-weight: 700; cursor: pointer; transition: var(--transition);
    white-space: nowrap;
}
.filter-btn.active { background: var(--primary); color: #000; border-color: var(--primary); }

.camera-item {
    display: flex; gap: 25px; background: var(--surface); padding: 20px;
    border-radius: 15px; border: 1px solid var(--border); margin-bottom: 25px;
}
.camera-banner-box { flex: 0 0 320px; height: 180px; position: relative; }
.camera-banner-box img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.live-badge { position: absolute; top: 15px; left: 15px; background: red; padding: 4px 12px; border-radius: 4px; font-size: 10px; font-weight: 900; }
.video_title { font-size: 1.2rem; font-weight: 800; color: #fff; text-decoration: none; }
.video_title:hover { color: var(--primary); }
.camera-location { color: var(--primary); font-size: 12px; font-weight: 700; text-transform: uppercase; margin: 8px 0; }

/* ==========================================================================
    6. MODAL
    ========================================================================== */
.modal {
     display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%;
     background-color: rgba(0, 0, 0, 0.95); backdrop-filter: blur(10px);
}

.modal-content {
     background-color: var(--surface); margin: 5% auto; padding: 30px; border: 1px solid var(--primary);
     width: 85%; max-height: 80vh; overflow-y: auto; border-radius: 20px;
}

/* Header do modal: botão de fechar imediatamente antes do título */
.modal-header,
.modal_header {
     display: flex;
     align-items: center;
     gap: 10px;
     margin-bottom: 20px;
}

.modal-header h2,
.modal_header h2 {
     margin: 0;
}

.modal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 25px; }

.close-modal {
     font-size: 32px;
     color: var(--text-dim);
     cursor: pointer;
     transition: 0.3s;
     line-height: 1;
     order: -1; /* força o botão ficar antes do texto */
}

.close-modal:hover { color: var(--primary); }

/* ==========================================================================
   7. RESPONSIVIDADE (MOBILE: BUSCA ATIVA + BANNER AJUSTADO)
   ========================================================================== */
.mobile-only { display: none; }

@media (max-width: 768px) {
    .navbar { padding: 15px 5%; justify-content: flex-start; gap: 15px; }
    .mobile-menu { display: block !important; }
    .logo { margin-right: 0; }
    .logo span { font-size: 0.9rem; }

    .nav-links {
        position: fixed; top: 0; right: -100%; width: 50%; height: 100vh;
        background: rgba(8, 8, 8, 0.98); backdrop-filter: blur(15px);
        flex-direction: column; padding: 100px 40px;
        transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 2500; border-left: 1px solid var(--primary);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5); align-items: flex-start;
    }
    .nav-links.active { right: 0; }
    .nav-links li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .nav-links a { display: block; padding: 20px 0; font-size: 16px; letter-spacing: 2px; width: 100%; }

    .hide-mobile { display: none !important; }
    .mobile-only { display: block !important; border-bottom: none !important; margin-top: 30px; width: 100%; }
    .btn-subscribe-mobile { background: var(--primary); color: #000 !important; text-align: center; padding: 15px !important; border-radius: 8px; font-weight: 800; display: block; }

    /* BUSCA SEMPRE ATIVA NO MOBILE */
    .search-container { margin-top: 15px; width: 100%; }
    #search-input { 
        width: 100% !important; 
        opacity: 1 !important; 
        padding: 10px 15px !important; 
        pointer-events: all !important; 
        margin-left: 0 !important; 
    }
    
    .camera-item { flex-direction: column; }
    .camera-banner-box { flex: none; width: 100%; height: 180px; }
    .arrow-left, .arrow-right { display: none; }

    .short_card { min-width: 155px; max-width: 155px; }
    .short_card .podcast_title { font-size: 13px; }
    .short_desc { -webkit-line-clamp: 2; }

    /* BANNER MOBILE - CENTRALIZAÇÃO */
    .banner { 
        height: 15vh; 
        object-fit: fill;
        object-position: center; 
    }
}

/* FOOTER */
.footer-contact { padding: 60px 8%; text-align: center; border-top: 1px solid var(--border); background: #010305; }
.social-contact { display: flex; gap: 25px; justify-content: center; margin-bottom: 20px; }
.social-icon { color: var(--text-dim); font-size: 26px; transition: 0.3s; }
.social-icon:hover { color: var(--primary); transform: translateY(-5px); }