/* Reset e Variáveis */
:root {
    --primary-color: #0056b3;
    --secondary-color: #0d6efd;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --text-muted: #666;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #2b3036;
    --footer-text: #adb5bd;
    --border-color: #e9ecef;
    --tag-purple: #8a2be2;
    --tag-teal: #20b2aa;
    --font-family: 'Jost', sans-serif;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --card-bg: #1e1e1e;
    --header-bg: #1e1e1e;
    --border-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-color);
}

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

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tipografia */
h1, h2, h3, h4 {
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* Botões */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
}

/* Top Bar */
.top-bar {
    background-color: #222;
    color: #ccc;
    font-size: 0.85rem;
    padding: 8px 0;
}

/* Header Main */
.site-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    max-height: 50px;
}

.main-nav ul {
    display: flex;
    gap: 20px;
}

.main-nav a {
    font-weight: 500;
    font-size: 1rem;
}

.main-nav a.active {
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.header-actions img {
    width: 20px;
    height: 20px;
    filter: invert(var(--icon-invert, 0));
}

body.dark-mode .header-actions img {
    filter: invert(1);
}

/* Ticker Bar */
.ticker-bar {
    background-color: #f1f1f1;
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .ticker-bar {
    background-color: #2a2a2a;
}

.ticker-flex {
    display: flex;
    align-items: center;
}

.ticker-label {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 10px 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ticker-label img {
    width: 16px;
    filter: brightness(0) invert(1);
}

.ticker-content {
    flex-grow: 1;
    padding: 0 15px;
    font-size: 0.9rem;
    overflow: hidden;
}

/* Hero Section */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    height: 60vh;
    min-height: 400px;
}

.hero-item {
    position: relative;
    overflow: hidden;
}

.hero-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-item:hover img {
    transform: scale(1.05);
}

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

.hero-content h2 a {
    color: #fff;
}

.tags {
    margin-bottom: 10px;
}

.tag {
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    color: #fff;
    margin-right: 5px;
    display: inline-block;
}

.tag-purple { background-color: var(--tag-purple); }
.tag-teal { background-color: var(--tag-teal); }

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 50px 0;
}

/* Cards Artigos */
.article-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.post-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-info {
    padding: 20px;
}

.post-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.post-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: underline;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pagination img {
    width: 16px;
    filter: invert(var(--icon-invert, 0));
}

body.dark-mode .pagination img {
    filter: invert(1);
}

.pagination .current {
    background: var(--secondary-color);
    color: #fff;
}

/* Sidebar */
.widget {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background: var(--secondary-color);
}

.search-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
    background: var(--bg-color);
    color: var(--text-color);
}

.search-form button {
    width: 100%;
}

.widget-recent ul li {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.widget-recent ul li:last-child {
    border-bottom: none;
}

.widget-recent a {
    font-weight: 500;
    font-size: 0.95rem;
}

.widget-promo .promo-img {
    border-radius: 4px;
    margin-bottom: 15px;
}

.widget-promo p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Related Posts */
.related-posts {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 50px;
}

.section-header h3 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
    display: inline-block;
}

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

.related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.tags-small span {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 2px;
    color: #fff;
    margin-right: 3px;
}

.related-card h4 {
    font-size: 0.95rem;
    margin: 8px 0;
    line-height: 1.4;
}

/* Welcome Section */
.welcome-section {
    background: var(--secondary-color);
    color: #fff;
    padding: 50px 0;
    text-align: center;
}

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.welcome-section p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Footer */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
}

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

.footer-col ul li a {
    color: var(--footer-text);
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    background: #1a1d20;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

.disclaimer {
    margin-top: 10px;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Modal Cookies (Direita) */
.cookie-modal {
    position: fixed;
    bottom: 30px;
    right: -400px;
    width: 320px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 9999;
    transition: right 0.4s ease-in-out;
    border-left: 4px solid var(--secondary-color);
}

.cookie-modal.show {
    right: 30px;
}

.cookie-content h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.cookie-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

.cookie-actions button {
    flex: 1;
    font-size: 0.85rem;
    padding: 6px 12px;
}

/* Social Sidebar */
.social-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.social-sidebar a {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.social-sidebar a:hover {
    background: var(--bg-color);
}

.social-sidebar img {
    width: 20px;
    height: 20px;
    filter: invert(var(--icon-invert, 0));
}

body.dark-mode .social-sidebar img {
    filter: invert(1);
}

/* Scroll Top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 998;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top img {
    width: 20px;
    filter: brightness(0) invert(1);
}

/* Responsivo */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    .hero-item.hero-small {
        display: none;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        gap: 15px;
    }
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .article-grid {
        grid-template-columns: 1fr;
    }
    .social-sidebar {
        display: none;
    }
    .cookie-modal.show {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 10px;
    }
}

/* Inner page styles */
/* ---------------------------------------
   NOVOS ESTILOS - PÁGINA INTERNA (ARTIGO)
---------------------------------------- */

/* Layout do Artigo */
.article-layout {
    padding: 50px 0;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Cabeçalho do Artigo */
.post-header {
    margin-bottom: 25px;
}

.single-post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 15px 0;
    color: var(--text-color);
}

.post-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    align-items: center;
}

.inline-icon {
    width: 14px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
    filter: invert(0.4);
}

body.dark-mode .inline-icon {
    filter: invert(0.8);
}

/* Imagens do Artigo (Adaptativas) */
.post-main-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    object-fit: cover;
    max-height: 500px;
}

.post-content .inner-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
    display: block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Índice (Table of Contents) */
.toc {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--secondary-color);
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.toc-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.toc ul {
    list-style: none;
    padding: 0;
}

.toc ul li {
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
}

.toc ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.toc ul li a {
    color: var(--primary-color);
    font-weight: 500;
}

.toc ul li a:hover {
    text-decoration: underline;
}

/* Tipografia e Textos do Artigo */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.post-content h1, 
.post-content h2, 
.post-content h3, 
.post-content h4, 
.post-content h5, 
.post-content h6 {
    color: var(--text-color);
    margin: 40px 0 20px;
}

.post-content h1 { font-size: 2.2rem; }
.post-content h2 { font-size: 1.9rem; border-bottom: 2px solid var(--border-color); padding-bottom: 10px; }
.post-content h3 { font-size: 1.6rem; }
.post-content h4 { font-size: 1.4rem; }
.post-content h5 { font-size: 1.2rem; }
.post-content h6 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }

.post-content p {
    margin-bottom: 25px;
}

.post-content span.highlight {
    background-color: rgba(32, 178, 170, 0.15);
    color: var(--tag-teal);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Listas (ul, ol) */
.post-content ul, 
.post-content ol {
    margin: 0 0 30px 20px;
    padding-left: 20px;
}

.post-content ul li {
    list-style-type: disc;
    margin-bottom: 10px;
    padding-left: 5px;
}

.post-content ol li {
    list-style-type: decimal;
    margin-bottom: 10px;
    padding-left: 5px;
}

.post-content li::marker {
    color: var(--secondary-color);
    font-weight: bold;
}

/* Tabela */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.post-content th, 
.post-content td {
    padding: 15px 20px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.post-content th {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.post-content tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

body.dark-mode .post-content th {
    background-color: #2a2a2a;
}

body.dark-mode .post-content tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Seção de Formulários (Comentários e Contato) */
.form-section {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 8px;
    margin-top: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--secondary-color);
}

.form-title {
    font-size: 1.6rem;
    margin-bottom: 25px;
    color: var(--text-color);
}

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

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

.form-control {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Form de Contato Sidebar */
.widget-contact .widget-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.sidebar-textarea {
    min-height: 80px;
}

/* Responsividade Artigo */
@media (max-width: 992px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .single-post-title {
        font-size: 2rem;
    }
    .post-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .form-section {
        padding: 20px;
    }
}