/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a5f2a;
    --primary-dark: #0d4a1a;
    --secondary-color: #f7b731;
    --accent-color: #e74c3c;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== HEADER ===== */
.top-bar {
    background-color: var(--primary-dark);
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: #fff;
    margin-left: 15px;
    transition: opacity 0.3s;
}

.top-bar a:hover {
    opacity: 0.8;
}

header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    padding: 15px 0;
    border-bottom: 3px solid var(--primary-color);
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 35px;
    height: 35px;
    fill: #fff;
}

.logo-text h1 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

.logo-text span {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-box {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    width: 300px;
}

.search-box input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-box button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: var(--primary-dark);
}

/* ===== NAVEGAÇÃO ===== */
nav {
    background-color: var(--primary-color);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
}

.nav-menu li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* ===== HERO / DESTAQUE PRINCIPAL ===== */
.hero-section {
    padding: 20px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.hero-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 400px;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-main .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 30px;
    color: #fff;
}

.hero-main .category {
    display: inline-block;
    background-color: var(--accent-color);
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-main h2 {
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.hero-main p {
    font-size: 14px;
    opacity: 0.9;
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 190px;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 15px;
    color: #fff;
}

.hero-card .category {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hero-card h3 {
    font-size: 16px;
    line-height: 1.3;
}

/* ===== SEÇÃO DE NOTÍCIAS ===== */
.news-section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.section-header h2 {
    font-size: 22px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2::before {
    content: '';
    width: 5px;
    height: 25px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-header a {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
}

.section-header a:hover {
    text-decoration: underline;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.news-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    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-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

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

.news-card .category {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.news-card .content {
    padding: 15px;
}

.news-card h3 {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.news-card h3:hover {
    color: var(--primary-color);
}

.news-card .meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

/* ===== LAYOUT PRINCIPAL COM SIDEBAR ===== */
.main-content {
    padding: 40px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* ===== LISTA DE ARTIGOS ===== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-item {
    display: flex;
    gap: 20px;
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.article-item:hover {
    transform: translateX(5px);
}

.article-item .image-wrapper {
    width: 280px;
    min-width: 280px;
    height: 180px;
}

.article-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-item .content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-item .category {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    width: fit-content;
}

.article-item h3 {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.article-item h3:hover {
    color: var(--primary-color);
}

.article-item p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-item .meta {
    font-size: 12px;
    color: var(--text-light);
}

/* ===== SIDEBAR ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.popular-item .number {
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.popular-item h4 {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-dark);
}

.popular-item h4:hover {
    color: var(--primary-color);
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: var(--bg-light);
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.categories-list a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.categories-list span {
    background-color: var(--primary-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.categories-list a:hover span {
    background-color: #fff;
    color: var(--primary-color);
}

/* ===== NEWSLETTER ===== */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
}

.newsletter-widget h3 {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.3);
}

.newsletter-widget p {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.newsletter-widget input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 14px;
}

.newsletter-widget button {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-widget button:hover {
    background-color: #e5a82a;
}

/* ===== PÁGINA DE ARTIGO ===== */
.article-page {
    padding: 40px 0;
}

.article-header {
    margin-bottom: 30px;
}

.article-header .category {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.article-header h1 {
    font-size: 36px;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.article-header .meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.article-header .meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-featured-image {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.article-content p {
    margin-bottom: 20px;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
}

.article-content h2 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: var(--primary-color);
}

.article-content h3 {
    font-size: 20px;
    margin: 25px 0 12px;
    color: var(--text-dark);
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.7;
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

.article-content blockquote {
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 25px 0;
    font-style: italic;
}

.article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.article-tags span {
    font-weight: 600;
    margin-right: 10px;
}

.article-tags a {
    display: inline-block;
    background-color: var(--bg-light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin: 5px 5px 5px 0;
    transition: background-color 0.3s;
}

.article-tags a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* ===== PÁGINAS INSTITUCIONAIS ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 60px 0;
    color: #fff;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 16px;
    opacity: 0.9;
}

.page-content {
    padding: 50px 0;
}

.page-content .container {
    max-width: 900px;
}

.page-content h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 30px 0 15px;
}

.page-content h3 {
    font-size: 20px;
    color: var(--text-dark);
    margin: 25px 0 12px;
}

.page-content p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
}

.page-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.page-content li {
    margin-bottom: 8px;
    list-style-type: disc;
    font-size: 16px;
    line-height: 1.7;
}

/* ===== PÁGINA DE CONTATO ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-form {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.btn-submit {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: var(--primary-dark);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.contact-item .icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.contact-item p {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== FOOTER ===== */
footer {
    background-color: #1a1a1a;
    color: #fff;
    padding-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}

.footer-about .logo {
    margin-bottom: 20px;
}

.footer-about .logo-text h2 {
    color: #fff;
    font-size: 20px;
}

.footer-about .logo-text span {
    color: #999;
}

.footer-about p {
    font-size: 14px;
    color: #999;
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.footer-links h3 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #999;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: #999;
}

.footer-bottom a {
    color: var(--primary-color);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .header-main .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    nav .container {
        position: relative;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-main {
        height: 300px;
    }
    
    .hero-sidebar {
        flex-direction: row;
    }
    
    .hero-card {
        height: 150px;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .article-item {
        flex-direction: column;
    }
    
    .article-item .image-wrapper {
        width: 100%;
        height: 200px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-main h2 {
        font-size: 20px;
    }
    
    .hero-sidebar {
        flex-direction: column;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .article-header h1 {
        font-size: 26px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
}

/* ===== TABELA DE COOKIES ===== */
.cookies-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.cookies-table th,
.cookies-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.cookies-table th {
    background-color: var(--primary-color);
    color: #fff;
}

.cookies-table tr:nth-child(even) {
    background-color: var(--bg-light);
}

/* ===== ESTILOS ESPECÍFICOS CONTATO ===== */
.contact-info h2 {
    margin-top: 0;
}

.contact-form h2 {
    margin-top: 0;
}

.contact-info .social-links {
    margin-top: 10px;
}

.contact-box {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.contact-box h4 {
    margin-bottom: 10px;
}

.contact-box p {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== AVISO LEGAL ===== */
.terms-notice {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

/* ===== UTILITÁRIOS ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb span {
    margin: 0 8px;
}

/* ===== AD SPACES ===== */
.ad-space {
    background-color: var(--bg-light);
    border: 2px dashed var(--border-color);
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    border-radius: 8px;
}

.ad-space p {
    color: var(--text-light);
    font-size: 14px;
}

/* ===== LOADING ===== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
