/*
Theme Name: Portal de Notícias FP2
Description: Template profissional para portal de notícias com áreas para patrocínios e layout moderno
Version: 1.0
Author: FP2 News
*/

/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #1a1a1a;
    color: #fff;
    padding: 10px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-main {
    padding: 20px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: #c41e3a;
    text-decoration: none;
}

.header-ad {
    width: 728px;
    height: 90px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

/* Navegação */
.main-navigation {
    background: #c41e3a;
    padding: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(0,0,0,0.1);
}

/* Layout principal */
.main-content {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.content-area {
    flex: 2;
}

.sidebar {
    flex: 1;
    max-width: 300px;
}

/* Notícias destacadas */
.featured-news {
    margin-bottom: 40px;
}

.featured-article {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.featured-article img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    text-decoration: none;
}

.article-title:hover {
    color: #c41e3a;
}

.article-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.article-excerpt {
    color: #555;
    line-height: 1.6;
}

/* Grid de notícias */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.news-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-item .article-content {
    padding: 15px;
}

.news-item .article-title {
    font-size: 18px;
    margin-bottom: 8px;
}

/* Sidebar */
.widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.widget-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #c41e3a;
    padding-bottom: 10px;
}

/* Área de patrocínios */
.sponsor-ad {
    width: 100%;
    height: 250px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* Footer */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: #c41e3a;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #999;
}

/* CSS Responsivo e Moderno */

/* Variáveis CSS para consistência */
:root {
    --primary-color: #c41e3a;
    --primary-dark: #a01729;
    --secondary-color: #333;
    --text-color: #444;
    --text-light: #666;
    --text-muted: #999;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
    --border-radius: 8px;
    --border-radius-large: 12px;
    --transition: all 0.3s ease;
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-secondary: Georgia, 'Times New Roman', serif;
}

/* Melhorias gerais */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background: #f5f6fa;
    overflow-x: hidden;
}

/* Container responsivo melhorado */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Animações suaves */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Botões modernos */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    line-height: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Cards modernos */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

/* Tipografia melhorada */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

h1 { font-size: clamp(28px, 4vw, 36px); }
h2 { font-size: clamp(24px, 3.5vw, 30px); }
h3 { font-size: clamp(20px, 3vw, 24px); }
h4 { font-size: clamp(18px, 2.5vw, 20px); }

p {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* Links melhorados */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Formulários modernos */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

/* Badges e tags */
.badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-color);
    color: white;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-secondary {
    background: var(--text-light);
}

.badge-success {
    background: #28a745;
}

.badge-warning {
    background: #ffc107;
    color: var(--secondary-color);
}

/* Utilitários de espaçamento */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* Utilitários de texto */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-muted { color: var(--text-muted) !important; }

.font-weight-bold { font-weight: bold !important; }
.font-weight-normal { font-weight: normal !important; }

/* Grid system responsivo */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Melhorias específicas do tema */
.news-item {
    transition: var(--transition);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.news-item img {
    transition: var(--transition);
}

.news-item:hover img {
    transform: scale(1.05);
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsivo - Mobile First */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .card-body,
    .card-header {
        padding: 15px;
    }
    
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    
    .row {
        margin: 0 -10px;
    }
    
    .col {
        padding: 0 10px;
    }
    
    /* Colunas mobile */
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .header-ad {
        width: 100%;
        max-width: 320px;
        height: 100px;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        max-width: none;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .news-item .article-title {
        font-size: 16px;
    }
    
    /* Colunas tablet */
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
    
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-white: #1a1a1a;
        --bg-light: #2d2d2d;
        --text-color: #e0e0e0;
        --text-light: #b0b0b0;
        --text-muted: #888;
        --secondary-color: #f0f0f0;
        --border-color: #404040;
    }
    
    body {
        background: #121212;
    }
}

/* Print styles */
@media print {
    .header-top,
    .navigation,
    .sidebar,
    .footer,
    .btn,
    .ad-banner {
        display: none !important;
    }
    
    .main-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states para acessibilidade */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip link para acessibilidade */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}