/*
Theme Name: webgawa Financial Theme
Theme URI: https://example.com/webgawa-theme
Author: Your Name
Author URI: https://example.com
Description: Tema profissional para portal financeiro inspirado no webgawa, com cotações em tempo real, gráficos e estrutura moderna
Version: 2.0
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, modern
*/

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

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

:root {
    --primary-color: #00d4aa;
    --secondary-color: #1a1a2e;
    --text-dark: #2d2d2d;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --header-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

body.menu-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

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

.site-header {
    background-color: var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    z-index: 1001;
}

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

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

.main-navigation a {
    color: white;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
}

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

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

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

.search-input {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    width: 200px;
    font-size: 14px;
}

.search-button {
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

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

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
    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.5);
    z-index: 998;
}

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

.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--secondary-color);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    padding-top: var(--header-height);
}

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

/* Mobile Search Inside Drawer */
.mobile-search {
    padding: 70px 20px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--secondary-color);
}

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

.mobile-search .search-input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.mobile-search .search-button {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s;
}

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

.mobile-navigation {
    background: var(--secondary-color);
}

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

.mobile-navigation li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-navigation a {
    display: block;
    padding: 15px 25px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.mobile-navigation a:hover {
    background: rgba(0, 212, 170, 0.1);
    color: var(--primary-color);
    padding-left: 30px;
}

.desktop-only {
    display: flex;
}

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

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

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

.hero-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

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

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

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

.hero-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
    color: var(--text-dark);
    max-width: 550px;
}

.hero-description {
    font-size: 18px;
    color: var(--text-dark);
    margin-top: 40px;
    font-weight: 500;
}

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

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

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.article-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

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

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

.article-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

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

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

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

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

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

.widget-tab.active {
    color: var(--primary-color);
    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: 15px;
}

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

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

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

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

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

.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;
}

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

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

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

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

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

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

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

.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: 8px;
}

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

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

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

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

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

.read-more-section {
    margin-top: 30px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.read-more-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.read-more-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    transition: background 0.3s;
}

.read-more-item:hover {
    background: var(--bg-light);
}

.read-more-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #00b894);
    border-radius: 8px;
    flex-shrink: 0;
}

.read-more-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.ultimas-noticias-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ultimas-noticias-section .widget-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-dark);
}

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

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

.ultimas-noticias-item:first-child {
    padding-top: 0;
}

.noticia-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.noticia-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.noticia-title a {
    color: var(--text-dark);
    transition: color 0.3s;
}

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

.noticia-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.leia-mais-link {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.3s;
}

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

.noticia-date {
    font-size: 11px;
    color: var(--text-light);
}

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

.site-footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 40px 20px 20px;
    margin-top: 60px;
}

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

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

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

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

.footer-widget a {
    color: #ccc;
    transition: color 0.3s;
}

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

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

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

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

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

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

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

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

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

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

    .mobile-drawer {
        display: block;
    }

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

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

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

    .articles-grid,
    .sidebar {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 30px;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr;
    }
}

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

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

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

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

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

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

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

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

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

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