/* Carrossel de Anúncios */
.ad-carousel {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.ad-slide {
    animation: fadeIn 0.5s;
}

.ad-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.ad-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s;
}

.ad-indicator.active {
    background: #667eea;
    width: 24px;
    border-radius: 4px;
}

.ad-carousel img {
    transition: transform 0.3s;
}

.ad-carousel img:hover {
    transform: scale(1.02);
}
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #0f2be0;
            --primary-dark: #063e9d;
            --text-dark: #1a1a1a;
            --text-gray: #666;
            --bg-light: #f8f9fa;
            --bg-white: #ffffff;
        }

        body {
            font-family: 'Inter', sans-serif;
            line-height: 1.6;
            color: var(--text-dark);
            background: var(--bg-light);
        }

        body.dark-mode {
            --text-dark: #ffffffff;
            --text-gray: #ffffffff;
            --bg-light: #1a1a1a;
            --bg-white: #2d2d2d;
        }

        header {
            background: linear-gradient(135deg, #0f2be0a2 0%, #063e9dff 100%);
            color: white;
            padding: 0;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            position: sticky;
            z-index: 1000;
        }

        .top-bar {
            background: rgba(0,0,0,0.2);
            padding: 0.5rem 1rem;
            font-size: 0.75rem;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1rem 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            text-decoration: none;
            color: white;
            display: inline-flex;
        }

        .logo img {
            height: 55px;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
            transition: transform 0.3s ease;
            border-radius: 15px;
        }

        .logo:hover img {
            transform: scale(1.05);
        }

        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.8rem;
            cursor: pointer;
            padding: 0.5rem;
        }

        .theme-toggle {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            font-size: 0.9rem;
            cursor: pointer;
            padding: 0.3rem 0.5rem;
            border-radius: 6px;
            transition: all 0.3s ease;
            line-height: 1;
        }

        .theme-toggle:hover {
            background: rgba(255,255,255,0.3);
        }
        
        .header-controls {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        nav {
            flex: 1;
            display: flex;
            justify-content: flex-end;
        }

        nav ul {
            display: flex;
            list-style: none;
            gap: 0;
            margin: 0;
            padding: 0;
        }

        nav a {
            color: white;
            text-decoration: none;
            padding: 1rem 1.2rem;
            display: block;
            font-weight: 500;
            transition: all 0.3s ease;
            text-transform: uppercase;
            font-size: 0.9rem;
            letter-spacing: 0.5px;
            border-radius: 8px;
        }

        nav a:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        nav a.active {
            background: rgba(255, 255, 255, 0.2);
            font-weight: 700;
        }

        /* MENU DROPDOWN DE CATEGORIAS */
        .categories-dropdown {
            position: relative;
            display: inline-block;
        }

        .categories-btn {
            color: white;
            text-decoration: none;
            padding: 1rem 1.2rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 500;
            transition: all 0.3s ease;
            text-transform: uppercase;
            font-size: 0.9rem;
            letter-spacing: 0.5px;
            border-radius: 8px;
            background: none;
            border: none;
            cursor: pointer;
        }

        .categories-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .categories-btn.active {
            background: rgba(255, 255, 255, 0.2);
        }

        .dropdown-icon {
            font-size: 0.7rem;
            transition: transform 0.3s ease;
        }

        .categories-dropdown.open .dropdown-icon {
            transform: rotate(180deg);
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            background: white;
            min-width: 220px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s ease;
            z-index: 1000;
            margin-top: 0.5rem;
            max-height: 400px;
            overflow-y: auto;
        }

        .categories-dropdown.open .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-menu a {
            color: #333 !important;
            padding: 0.75rem 1.2rem !important;
            display: block !important;
            text-transform: none !important;
            font-size: 0.95rem !important;
            border-radius: 0 !important;
            background: transparent !important;
            border-bottom: 1px solid #f0f0f0;
            transition: background 0.2s ease;
        }

        .dropdown-menu a:last-child {
            border-bottom: none;
        }

        .dropdown-menu a:hover {
            background: #f5f5f5 !important;
        }

        .dropdown-menu a.active {
            background: #e3f2fd !important;
            color: #1e3c72 !important;
            font-weight: 600 !important;
        }

        /* BARRA ÚLTIMAS NOTÍCIAS */
        .breaking-news {
            background: #e74c3c;
            color: white;
            padding: 0.75rem 0;
            overflow: hidden;
        }

        .breaking-news-content {
            display: flex;
            align-items: center;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        .breaking-label {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.2rem;
            background: rgba(0,0,0,0.2);
            padding: 0.3rem 1rem;
            border-radius: 4px;
            margin-right: 1rem;
            flex-shrink: 0;
        }

        .breaking-ticker {
            flex: 1;
            overflow: hidden;
        }

        .ticker-content {
            display: inline-block;
            white-space: nowrap;
            animation: ticker 30s linear infinite;
        }

        .ticker-content span {
            margin-right: 3rem;
        }

        @keyframes ticker {
            0% { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }

        .container {
            max-width: 1200px;
            margin: 2rem auto;
            padding: 0 20px;
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 2rem;
        }

        .main-content {
            display: flex;
            flex-direction: column;
            gap: 2rem;
        }

        /* NOTÍCIA EM DESTAQUE */
        .featured-news {
            background: var(--bg-white);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.3s;
            position: relative;
            height: 400px;
        }

        .featured-news:hover {
            transform: translateY(-5px);
        }

        .featured-news img {
            width: 100%;
            height: 400px;
            object-fit: cover;
        }

        .featured-news .content {
            padding: 1.5rem;
        }

        .featured-news h2 {
            font-size: 1.8rem;
            margin-bottom: 1rem;
            color: #1e3c72;
        }

        .news-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
        }

        .news-card {
            background: var(--bg-white);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: transform 0.3s, box-shadow 0.3s;
            cursor: pointer;
            text-decoration: none;
            color: inherit;
            display: block;
        }

        .news-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .news-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }

        .news-card .content {
            padding: 1.5rem;
        }

        .news-card h3 {
            font-size: 1.2rem;
            margin-bottom: 0.5rem;
            color: #1e3c72;
        }

        .news-card .meta {
            color: var(--text-gray);
            font-size: 0.85rem;
            margin-bottom: 0.5rem;
        }

        /* PÁGINA DE ARTIGO COM PROPAGANDAS */
        .article-container {
            max-width: 1200px;
            margin: 2rem auto;
            padding: 0 20px;
        }

        .article-top-ad {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 12px;
            padding: 3rem 2rem;
            text-align: center;
            color: white;
            min-height: 150px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 2rem;
        }

        .article-content-wrapper {
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 2rem;
        }

        .article-page {
            background: var(--bg-white);
            border-radius: 12px;
            padding: 2rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .article-page h1 {
            font-size: 2.5rem;
            color: #1e3c72;
            margin-bottom: 1rem;
            line-height: 1.2;
        }

        .article-page .featured-image {
            width: 100%;
            max-height: 500px;
            object-fit: cover;
            border-radius: 12px;
            margin-bottom: 2rem;
        }

        .article-sidebar {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .article-sidebar .ad-carousel,
        .article-sidebar .ad-space {
            margin: 0 !important;
        }

        .article-sidebar-ad {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 12px;
            padding: 2rem;
            text-align: center;
            color: white;
            min-height: 600px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            font-weight: bold;
            position: sticky;
            top: 100px;
        }

        .video-embed {
            background: var(--bg-white);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            padding: 1.5rem;
        }

        .video-embed iframe,
        .video-embed video {
            width: 100%;
            height: 400px;
            border-radius: 8px;
        }

        .sidebar {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .sidebar {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .sidebar-widget {
            background: var(--bg-white);
            border-radius: 0;
            padding: 1.5rem;
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
            margin: 0;
        }
        
        /* Remover qualquer margin dos elementos da sidebar */
        .sidebar > * {
            margin: 0 !important;
        }
        /* Espaçamento específico para anúncios na sidebar */
        .sidebar .ad-carousel,
        .sidebar .ad-space {
            margin-bottom: 0;
        }

        .widget-title {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.8rem;
            color: #1e3c72;
            margin-bottom: 1.5rem;
            padding-bottom: 0.75rem;
            border-bottom: 3px solid var(--primary);
        }

        .trending-item {
            display: flex;
            gap: 1rem;
            padding: 1rem 0;
            border-bottom: 1px solid #f0f0f0;
            cursor: pointer;
            transition: background 0.2s;
        }

        .trending-item:hover {
            background: #f8f9fa;
        }

        .trending-item:last-child {
            border-bottom: none;
        }

        .trending-number {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 2rem;
            color: var(--primary);
            min-width: 30px;
        }

        .trending-content h4 {
            font-size: 0.95rem;
            font-weight: 600;
            line-height: 1.4;
            margin-bottom: 0.3rem;
        }

        .trending-meta {
            font-size: 0.8rem;
            color: var(--text-gray);
        }

        /* ===== ESTILOS PARA ANÚNCIOS ===== */
        .ad-carousel {
            background: var(--bg-white);
            border-radius: 0;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
            position: relative;
            margin: 0 !important;
        }

        /* Anúncios na sidebar com estilo mais limpo */
        .sidebar .ad-carousel {
            background: var(--bg-white);
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        }

        .ad-slide {
            display: none;
            line-height: 0;
        }

        .ad-slide.active {
            display: block;
        }

        .ad-slide img {
            width: 100%;
            height: auto;
            display: block;
            border-radius: 0 !important;
            margin: 0;
            padding: 0;
        }

        .ad-slide a {
            display: block;
            line-height: 0;
        }

        /* Limitar altura do banner do topo do artigo - 1200x150 */
        #ad-carousel-topo {
            max-height: 150px;
            background: var(--bg-white);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        #ad-carousel-topo .ad-slide img {
            max-height: 150px;
            width: 100%;
            object-fit: contain;
        }
        /* Sidebar Prefeitura - 800x1500 */
        #ad-carousel-sidebar0 .ad-slide img,

        /* Sidebar - 300x250 */
        #ad-carousel-sidebar1 .ad-slide img,
        #ad-carousel-sidebar2 .ad-slide img,
        #ad-carousel-sidebar3 .ad-slide img,
        #ad-carousel-sidebar4 .ad-slide img,
        #ad-carousel-sidebar5 .ad-slide img,
        #ad-carousel-sidebar6 .ad-slide img {
            max-height: 250px;
            object-fit: contain;
        }

        /* Sidebar Inferior - 300x600 */
        #ad-carousel-bottom .ad-slide img {
            max-height: 600px;
            object-fit: contain;
        }

        /* Lateral do Artigo - 300x600 */
        #ad-carousel-artigo-lateral .ad-slide img {
            max-height: 600px;
            object-fit: contain;
        }

        .ad-indicators {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 8px;
            z-index: 10;
            background: rgba(0,0,0,0.5);
            padding: 5px 10px;
            border-radius: 15px;
        }

        .ad-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(255,255,255,0.5);
            cursor: pointer;
            transition: all 0.3s;
        }

        .ad-indicator.active {
            background: white;
            width: 20px;
            border-radius: 4px;
        }

        .ad-space {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 0;
            padding: 2rem;
            text-align: center;
            color: white;
            min-height: 250px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            font-weight: bold;
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
            margin: 0 !important;
        }

        footer {
            background: #1e3c72;
            color: white;
            text-align: center;
            padding: 2rem;
            margin-top: 3rem;
        }

        .category-tag {
            display: inline-block;
            color: white;
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            font-size: 0.75rem;
            margin-bottom: 0.5rem;
        }

        .carousel-indicators {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 10;
        }

        .indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255,255,255,0.5);
            cursor: pointer;
            transition: all 0.3s;
        }

        .indicator.active {
            background: white;
            width: 30px;
            border-radius: 6px;
        }

        .carousel-slide {
            display: none;
        }

        .carousel-slide.active {
            display: block;
        }

        .no-image {
            background: #e0e0e0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
            color: #999;
        }

        .back-button {
            display: inline-block;
            margin-bottom: 1rem;
            color: #1e3c72;
            text-decoration: none;
            font-weight: 600;
        }

        /* MENU MOBILE */
        .mobile-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.7);
            z-index: 1999;
        }

        .mobile-overlay.active {
            display: block;
        }

        .mobile-sidebar {
            position: fixed;
            top: 0;
            left: -100%;
            width: 280px;
            height: 100vh;
            background: white;
            box-shadow: 2px 0 10px rgba(0,0,0,0.1);
            z-index: 2000;
            transition: left 0.3s ease;
            overflow-y: auto;
        }

        .mobile-sidebar.active {
            left: 0;
        }

        .mobile-sidebar-header {
            background: linear-gradient(135deg, #0f2be0a2 0%, #063e9dff 100%);
            padding: 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: white;
        }

        .mobile-sidebar-header h3 {
            margin: 0;
            font-size: 1.2rem;
        }

        .close-sidebar {
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem;
        }

        .mobile-sidebar ul {
            list-style: none !important;
            padding: 0 !important;
            margin: 0 !important;
            display: block !important;
        }

        .mobile-sidebar li {
            border-bottom: 1px solid #eee !important;
            display: block !important;
        }

        .mobile-sidebar a {
            color: #333 !important;
            padding: 1rem 1.5rem !important;
            display: block !important;
            text-transform: none !important;
            font-size: 1rem !important;
            text-decoration: none !important;
        }

        .mobile-sidebar a:hover {
            background: #f5f5f5 !important;
        }

        .mobile-sidebar a.active {
            background: #e3f2fd !important;
            color: #1e3c72 !important;
            font-weight: 600 !important;
        }

        @media (max-width: 768px) {
            .mobile-menu-btn {
                display: block;
            }

            nav {
                display: none;
            }
            
            .top-bar {
                padding: 0.4rem 0.5rem;
                font-size: 0.7rem;
                gap: 0.3rem;
            }
            
            .theme-toggle {
                font-size: 0.8rem;
                padding: 0.25rem 0.4rem;
            }

            .header-content {
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .logo img {
                height: 45px;
            }

            .container,
            .article-content-wrapper {
                grid-template-columns: 1fr;
            }

            .featured-news {
                height: 300px;
            }

            .featured-news img {
                height: 300px;
            }

            .article-sidebar-ad {
                min-height: 250px;
                position: static;
            }

            /* Ajustar banner do topo no mobile */
            #ad-carousel-topo {
                max-height: 100px;
            }
            
            #ad-carousel-topo .ad-slide img {
                max-height: 100px;
            }
        }
        
        #mobileSidebar nav {
            display: block !important;
        }

        #mobileSidebar ul {
            display: block !important;
            list-style: none !important;
            padding: 0 !important;
            margin: 0 !important;
        }

        #mobileSidebar li {
            display: block !important;
            border-bottom: 1px solid #eee !important;
        }

        #mobileSidebar a {
            display: block !important;
            padding: 1rem 1.5rem !important;
            color: #333 !important;
            text-decoration: none !important;
            font-size: 1rem !important;
            background: white !important;
        }

        #mobileSidebar a:hover {
            background: #f5f5f5 !important;
        }
