/*
Theme Name: webgawa Financial Theme
Theme URI: https://example.com/webgawa-theme
Author: Your Name
Author URI: https://example.com
Description: Tema profissional clean e minimalista para portal financeiro
Version: 2.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: webgawa-theme
Tags: financial, news, stocks, responsive, clean, minimal
*/

/* =================================
   RESET & BASE STYLES
================================= */

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

:root {
    --primary-color: #00d4aa;
    --secondary-color: #1a1a2e;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #737373;
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --border-color: #e5e5e5;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --header-height: 64px;
    --content-padding: 24px;
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* =================================
   HEADER & NAVIGATION
================================= */

.site-header {
    background-color: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    font-size: 22px;
    font-weight: 700;
    z-index: 1001;
    letter-spacing: -0.5px;
}

.site-logo svg {
    width: 28px;
    height: 28px;
    fill: var(--primary-color);
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 32px;
    margin: 0;
}

.main-navigation a {
    color: var(--text-medium);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.main-navigation a:hover {
    color: var(--text-dark);
}

.header-search {
    display: flex;
    gap: 10px;
}

.header-search form {
    display: flex;
    gap: 8px;
}

.search-input {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 220px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-white);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.search-button {
    padding: 8px 18px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s, transform 0.1s;
}

.search-button:hover {
    background-color: #00b894;
}

.search-button:active {
    transform: scale(0.98);
}

/* =================================
   MOBILE MENU
================================= */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
    z-index: 1001;
    line-height: 1;
}

.mobile-menu-toggle:hover {
    color: var(--primary-color);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    backdrop-filter: blur(4px);
}

.mobile-overlay.active {
    display: block;
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: var(--bg-white);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    padding-top: var(--header-height);
}

.mobile-drawer.active {
    right: 0;
}

.mobile-search {
    padding: 60px 24px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-search form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-search .search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
}

.mobile-search .search-button {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
}

.mobile-navigation ul {
    list-style: none;
    padding: 12px 0;
    margin: 0;
}

.mobile-navigation li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-navigation a {
    display: block;
    padding: 16px 24px;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.mobile-navigation a:hover {
    background: var(--bg-light);
    padding-left: 28px;
}

.desktop-only {
    display: flex;
}

/* =================================
   MAIN CONTENT LAYOUT
================================= */

.site-main {
    max-width: 1400px;
    margin: 32px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
}

/* =================================
   HERO SECTION
================================= */

.hero-section {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.hero-content {
    position: relative;
    padding: 64px;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

.hero-image {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: auto;
    opacity: 0.95;
}

.hero-subtitle {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 500;
}

.hero-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-dark);
    max-width: 550px;
    letter-spacing: -0.5px;
}

.hero-description {
    font-size: 17px;
    color: var(--text-medium);
    margin-top: 32px;
    font-weight: 400;
    line-height: 1.6;
}

/* =================================
   ARTICLE GRID
================================= */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--border-color);
}

.article-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.article-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
    flex-shrink: 0;
    position: relative;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.03);
}

.article-content {
    padding: 20px;
    background: var(--bg-white);
    flex: 1;
    position: relative;
    z-index: 1;
}

.article-meta {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 10px;
    display: block;
    font-weight: 500;
}

.article-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
    margin: 0;
    transition: color 0.2s;
    display: block;
}

.article-card:hover .article-title {
    color: var(--primary-color);
}

.article-excerpt {
    display: none !important;
}

.placeholder {
    background: var(--bg-light);
}

.placeholder > div {
    width: 100%;
    height: 100%;
}

/* =================================
   CATEGORY SECTIONS
================================= */

.category-section {
    margin-top: 64px;
    margin-bottom: 48px;
}

.category-header {
    text-align: center;
    margin-bottom: 40px;
}

.category-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.category-divider {
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

.category-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.category-post-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.category-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-post-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-light);
}

.category-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-post-card:hover .category-post-thumbnail img {
    transform: scale(1.03);
}

.category-post-content {
    padding: 20px;
}

.category-post-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.category-post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: var(--text-dark);
    transition: color 0.2s;
}

.category-post-card:hover .category-post-title {
    color: var(--primary-color);
}

/* =================================
   SINGLE POST PAGE
================================= */

.single-post-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.single-content-wrapper {
    max-width: 100%;
}

.single-article {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 32px;
}

.article-header {
    margin-bottom: 32px;
    padding-top: 32px;
}

.article-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-color);
    color: white;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

.category-badge:hover {
    background: #00b894;
}

.single-article .article-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.article-meta-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-light);
}

.meta-separator {
    color: var(--border-color);
}

.meta-author,
.meta-date {
    color: var(--text-light);
    font-weight: 500;
}

.meta-category a {
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.2s;
}

.meta-category a:hover {
    color: var(--primary-color);
}

.article-featured-image {
    margin: 32px 0;
}

.article-featured-image img {
    width: 100%;
    border-radius: var(--border-radius);
}

.image-caption {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 12px;
    font-style: italic;
}

.article-content-body {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
}

.article-content-body p {
    margin-bottom: 24px;
}

.article-content-body h2,
.article-content-body h3,
.article-content-body h4 {
    margin: 32px 0 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.article-content-body h2 {
    font-size: 28px;
}

.article-content-body h3 {
    font-size: 24px;
}

.article-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 24px 0;
}

.article-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.article-tags {
    margin-bottom: 24px;
}

.article-tags a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

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

.article-share {
    display: flex;
    align-items: center;
    gap: 16px;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.author-bio {
    display: flex;
    gap: 20px;
    padding: 32px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin-top: 48px;
    border: 1px solid var(--border-color);
}

.author-avatar img {
    border-radius: 50%;
}

.author-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.author-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-medium);
}

.related-posts {
    background: transparent;
    border-radius: 0;
    padding: 48px 0;
    box-shadow: none;
    margin-bottom: 32px;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-post-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.2s;
}

.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.related-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-content {
    padding: 20px;
}

.related-date {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.related-title {
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
    line-height: 1.4;
    color: var(--text-dark);
}

/* =================================
   SIDEBAR
================================= */

.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    height: fit-content;
}

.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.widget-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.widget-tab {
    padding: 10px 0;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}

.widget-tab.active {
    color: var(--text-dark);
    border-bottom-color: var(--primary-color);
}

.chart-container {
    width: 100%;
    height: 250px;
    margin-bottom: 20px;
}

.chart-timeframes {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 8px;
}

.timeframe-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.timeframe-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.currency-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.currency-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: var(--bg-light);
    border-radius: 6px;
    transition: background 0.2s;
}

.currency-item:hover {
    background: #f0f0f0;
}

.currency-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.currency-flag {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-white);
}

.currency-name {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

.currency-values {
    text-align: right;
}

.currency-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

.currency-change {
    font-size: 12px;
    font-weight: 600;
}

.stock-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.stock-tab {
    flex: 1;
    padding: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.stock-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.stock-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 6px;
}

.stock-symbol {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
}

.stock-name {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
    font-weight: 500;
}

.stock-price {
    text-align: right;
}

.stock-value {
    font-weight: 700;
    font-size: 14px;
}

.stock-change {
    font-size: 11px;
    font-weight: 600;
}

/* =================================
   LEIA MAIS - SIDEBAR
================================= */

.leia-mais-section {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.leia-mais-section .widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.leia-mais-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.leia-mais-item:first-child {
    padding-top: 0;
}

.leia-mais-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leia-mais-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.leia-mais-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.leia-mais-title a:hover {
    color: var(--primary-color);
}

.leia-mais-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.leia-mais-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.leia-mais-link:hover {
    color: #00b894;
}

.leia-mais-date {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 500;
}

.leia-mais-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.leia-mais-thumbnail img,
.leia-mais-thumbnail .placeholder-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* =================================
   FOOTER
================================= */

.site-footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 48px 24px 24px;
    margin-top: 64px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 32px;
}

.footer-widget h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 16px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 12px;
}

.footer-widget a {
    color: #b3b3b3;
    transition: color 0.2s;
    font-size: 14px;
}

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

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 13px;
}

/* =================================
   PAGE LAYOUT
================================= */

.page-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    max-width: 1400px;
    margin: 32px auto;
    padding: 0 24px;
}

.page-content-wrapper {
    max-width: 100%;
}

.page-article {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 48px;
    border: 1px solid var(--border-color);
}

.page-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.page-featured-image {
    margin: 32px 0;
}

.page-featured-image img {
    width: 100%;
    border-radius: var(--border-radius);
}

.page-content-body {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
}

.page-content-body p {
    margin-bottom: 24px;
}

.page-content-body h2,
.page-content-body h3,
.page-content-body h4 {
    margin: 32px 0 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.page-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 24px 0;
}

.page-content-body ul,
.page-content-body ol {
    margin-bottom: 24px;
    padding-left: 32px;
}

.page-content-body li {
    margin-bottom: 12px;
}

/* =================================
   RESPONSIVE DESIGN
================================= */

@media (max-width: 1200px) {
    .site-main,
    .single-post-layout,
    .page-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-image {
        width: 300px;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-drawer {
        display: block;
    }

    .header-container {
        padding: 0 16px;
    }

    .site-logo {
        font-size: 18px;
    }

    .site-logo svg {
        width: 24px;
        height: 24px;
    }

    .site-main {
        padding: 0 16px;
        margin: 24px auto;
    }

    .articles-grid,
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .category-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .category-post-thumbnail {
        height: 200px;
    }

    .hero-content {
        padding: 32px 24px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-image {
        position: static;
        transform: none;
        width: 100%;
        max-width: 300px;
        margin: 24px auto 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .leia-mais-item {
        flex-direction: column-reverse;
    }
    
    .leia-mais-thumbnail {
        width: 100%;
        height: 180px;
    }
    
    /* SINGLE POST - Mobile */
    .single-post-layout {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .single-content-wrapper {
        padding: 0 16px;
    }
    
    .single-article .article-title {
        font-size: 28px;
    }
    
    .article-header {
        padding-top: 24px;
    }
    
    .article-featured-image {
        margin: 24px -16px;
        width: 100vw;
    }
    
    .article-content-body {
        font-size: 16px;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        margin: 32px 0;
    }
    
    .related-posts {
        padding: 32px 0;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    /* PAGE LAYOUT - Mobile */
    .page-layout {
        padding: 0 16px;
        margin: 24px auto;
    }

    .page-article {
        padding: 32px 24px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .page-content-body {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 24px;
    }

    .site-logo {
        font-size: 16px;
    }

    .site-logo svg {
        width: 20px;
        height: 20px;
    }

    .single-article .article-title {
        font-size: 24px;
    }

    .page-title {
        font-size: 28px;
    }
}

/* =================================
   UTILITY CLASSES
================================= */

.positive {
    color: var(--success-color);
}

.negative {
    color: var(--danger-color);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center {
    text-align: center;
}

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

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

/* =================================
   FIX HORIZONTAL SCROLL - MOBILE
================================= */

/* Previne scroll horizontal no mobile */
@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Contém todo o conteúdo dentro da viewport */
    .site-main,
    .single-content-wrapper,
    .article-content-body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    /* Força anúncios a respeitarem a largura da tela */
    .code-block,
    .adsbygoogle,
    ins.adsbygoogle {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Remove margens negativas dos anúncios */
    .code-block-1,
    .code-block-2,
    .code-block-3 {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }

    /* Garante que iframes de anúncios não ultrapassem a tela */
    .adsbygoogle iframe,
    ins.adsbygoogle iframe {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Container de anúncios */
    #aswift_1_host,
    #aswift_2_host,
    #aswift_3_host,
    #aswift_4_host {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Previne imagens grandes de causarem overflow */
    .article-content-body img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Featured image em mobile - já está no CSS mas reforçando */
    .article-featured-image {
        margin: 24px -16px !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }

    /* Garante que parágrafos não ultrapassem */
    .article-content-body p,
    .article-content-body h2,
    .article-content-body h3 {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Container principal do artigo */
    .single-article {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}

/* =================================
   FIX ESPECÍFICO PARA ADSENSE
================================= */

@media (max-width: 768px) {
    /* Força AdSense a ser responsivo */
    ins.adsbygoogle[style] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
    }

    /* Remove larguras fixas inline dos anúncios */
    ins.adsbygoogle[data-ad-format="auto"] {
        display: block !important;
        width: 100% !important;
    }

    /* Container dos anúncios do Google */
    div[id^="aswift"] {
        max-width: 100% !important;
    }
}

/* =================================
   FIX PARA LAYOUT MOBILE
================================= */

@media (max-width: 768px) {
    /* Remove padding lateral que pode causar overflow */
    .single-post-layout {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Ajusta padding do content wrapper */
    .single-content-wrapper {
        padding: 0 16px !important;
    }

    /* Ajusta o body do artigo */
    .article-content-body {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Header do artigo */
    .article-header {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Meta info */
    .article-meta-info {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Footer do artigo */
    .article-footer {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* =================================
   ADSENSE RESPONSIVE CONFIG
================================= */

/* Força todos os anúncios a serem responsivos */
ins.adsbygoogle {
    display: block;
    max-width: 100%;
}

@media (max-width: 768px) {
    /* Config específica para mobile */
    ins.adsbygoogle {
        min-height: 0 !important;
    }

    /* Remove espaços em branco dos anúncios */
    .code-block {
        margin: 16px 0 !important;
        padding: 0 !important;
    }
}