/**
 * Site de Notícias - CSS Principal
 * Paleta: Azul escuro (#003366) + Ciano (#00BFFF)
 */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #003366;
    --color-secondary: #00BFFF;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-background: #FFFFFF;
    --color-light: #F5F5F5;
    --color-border: #E0E0E0;
    --max-width: 1200px;
    --spacing: 20px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-background);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-secondary);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Header */
.site-header {
    background: var(--color-primary);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.site-logo {
    font-size: 32px;
    font-weight: bold;
    color: white;
}

.site-logo:hover {
    color: var(--color-secondary);
}

.header-search {
    display: flex;
    gap: 5px;
}

.header-search input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    width: 250px;
}

.header-search button {
    padding: 8px 20px;
    background: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

.header-search button:hover {
    background: #0099cc;
}

/* Navigation */
.main-nav {
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-menu li a {
    display: block;
    padding: 12px 20px;
    color: white;
    font-weight: 500;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: var(--color-secondary);
}

/* Main Content */
.main-content {
    margin: 30px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* Featured News */
.featured-news {
    margin-bottom: 30px;
}

.featured-news h2 {
    color: var(--color-primary);
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-secondary);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--color-light);
}

.news-card-content {
    padding: 20px;
}

.news-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-secondary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 10px;
}

.news-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-card-summary {
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--color-text-light);
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more {
    color: var(--color-secondary);
    font-weight: 600;
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-item-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: var(--color-light);
}

.news-item-content {
    padding: 15px 20px 15px 0;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-secondary);
}

.widget-list {
    list-style: none;
}

.widget-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-light);
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text);
}

.widget-list a:hover {
    color: var(--color-secondary);
}

/* WebTV Section */
.webtv-section {
    background: var(--color-light);
    padding: 30px 0;
    margin: 30px 0;
}

.webtv-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.webtv-title {
    font-size: 24px;
    color: var(--color-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-badge {
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 3px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.webtv-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.webtv-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Banners */
.banner-rotativo {
    margin: 30px 0;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.banner-slide {
    display: none;
    width: 100%;
}

.banner-slide.active {
    display: block;
}

.banner-slide img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
}

.banner-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.banner-dot.active {
    background: white;
}

.banner-fixo {
    margin: 20px 0;
}

.banner-fixo img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Banner Topo */
.banner-top-container {
    background: var(--color-light);
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.banner-top {
    text-align: center;
    margin: 10px 0;
}

.banner-top img {
    max-width: 100%;
    height: auto;
    max-height: 90px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Banner Rodapé */
.banner-footer-container {
    background: var(--color-light);
    padding: 20px 0;
    border-top: 1px solid var(--color-border);
}

.banner-footer {
    text-align: center;
    margin: 10px 0;
}

.banner-footer img {
    max-width: 100%;
    height: auto;
    max-height: 90px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Footer */
.site-footer {
    background: var(--color-primary);
    color: white;
    padding: 30px 0 15px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: var(--color-secondary);
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: white;
}

.footer-section a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.page-link {
    padding: 10px 15px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    color: var(--color-primary);
    font-weight: 600;
}

.page-link:hover,
.page-link.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Article Page */
.article-header {
    margin-bottom: 30px;
}

.article-title {
    font-size: 36px;
    color: var(--color-primary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--color-text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

.article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2,
.article-content h3 {
    color: var(--color-primary);
    margin: 30px 0 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-search {
        width: 100%;
    }
    
    .header-search input {
        width: 100%;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu li a {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    /* Correção CRÍTICA para news-item no mobile */
    .news-item {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        width: 100%;
    }
    
    .news-item-image {
        width: 100% !important;
        height: 200px;
    }
    
    .news-item-content {
        padding: 15px !important;
        width: 100%;
    }
    
    /* News list responsivo */
    .news-list {
        width: 100%;
        overflow: hidden;
    }
    
    /* Sidebar no mobile */
    .sidebar {
        width: 100%;
        overflow: hidden;
    }
    
    .sidebar-widget {
        width: 100%;
        overflow: hidden;
    }
    
    /* Banners fixos responsivos */
    .banner-fixo {
        width: 100%;
        overflow: hidden;
        margin: 15px 0;
    }
    
    .banner-fixo a {
        display: block;
        width: 100%;
    }
    
    .banner-fixo img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }
    
    /* Google Ads e propaganda responsivos */
    .sidebar ins,
    .sidebar > div,
    .sidebar iframe {
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-content {
        font-size: 16px;
    }
    
    /* Ajuste do banner rotativo */
    .banner-rotativo {
        margin: 20px 0;
    }
    
    .banner-slide img {
        max-height: 150px;
    }
    
    /* Ajustes de texto */
    .news-card-title {
        font-size: 16px;
    }
    
    .news-card-content {
        padding: 15px;
    }
    
    .featured-news h2 {
        font-size: 20px;
    }
    
    /* Garantir que nada ultrapasse a largura da tela */
    body {
        overflow-x: hidden;
    }
    
    .main-content {
        overflow-x: hidden;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}