/*!
 * Politicando Times - Responsive Stylesheet (Mobile)
 * Version: 1.0
 * Breakpoint: até 1024px
 */

/* ===== CORREÇÃO TOP BAR MOBILE ===== */
@media screen and (max-width: 1024px) {
    /* Top Bar - CORREÇÃO: mantém em linha no mobile */
    .top-bar-container {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 12px;
        font-size: 12px;
        gap: 0 !important;
    }

    .top-bar-left,
    .top-bar-right {
        width: auto !important;
        justify-content: center;
        flex: 0 0 auto !important;
    }

    .top-bar-left {
        order: 0 !important;
        margin-bottom: 0 !important;
    }

    /* CORREÇÃO: Top bar center visível no mobile */
    .top-bar-center {
        display: flex !important; /* MUDANÇA: mostra no mobile */
        order: 1;
        margin-bottom: 0 !important;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 11px;
    }

    .top-bar-right {
        order: 2 !important;
        margin-bottom: 0 !important;
        gap: 15px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* CORREÇÃO: Estilo correto do menu hamburger */
    .mobile-menu-toggle {
        display: flex !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        z-index: 1001;
        background: #fff;
        border: 1px solid #ddd;
        width: 40px !important;
        height: 40px !important;
        border-radius: 4px;
        cursor: pointer;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3px !important; /* MUDANÇA: gap menor para 3 riscos */
        padding: 8px;
        margin: 0 !important;
        transition: all 0.3s ease;
    }

    /* CORREÇÃO: Estilo dos 3 riscos do menu */
    .mobile-menu-toggle span {
        width: 20px;
        height: 2px;
        background: #111;
        transition: all 0.3s ease;
        display: block !important; /* MUDANÇA: garante que seja visível */
    }

    /* Estados do menu hamburger */
    .mobile-menu-toggle:hover {
        background: #f5f5f5;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* CORREÇÃO: Estilo do botão fechar menu */
    .mobile-menu-close {
        background: none;
        border: none;
        font-size: 28px !important; /* MUDANÇA: tamanho maior */
        cursor: pointer;
        color: #111;
        padding: 5px;
        transition: color 0.3s ease;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
    }

    .mobile-menu-close:hover {
        color: #0b5394;
        background: #f5f5f5;
    }

    /* Garante que os ícones fiquem alinhados */
    .search-icon, 
    .account-link {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .account-link a,
    .search-icon {
        padding: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* ===== MEDIA QUERIES ===== */
@media screen and (max-width: 1024px) {
    /* Container principal */
    .container {
        margin: 12px auto;
        padding: 0 12px;
    }

    /* Second Bar - simplificada */
    .second-bar-container {
        flex-direction: column;
        gap: 8px;
        padding: 8px 12px;
        text-align: center;
    }

    .date-section {
        justify-content: center;
    }

    .stock-info {
        font-size: 11px;
    }

    /* Navegação principal - transformada em menu hamburger */
    nav.mainnav {
        display: none;
    }

    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

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

    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100%;
        background: #fff;
        z-index: 1000;
        transition: right 0.3s ease;
        overflow-y: auto;
        padding: 20px; /* MUDANÇA: padding ajustado */
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    }

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

    /* CORREÇÃO: Header do mobile menu */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding-bottom: 15px;
        border-bottom: 1px solid #e3e3e3;
    }

    .mobile-menu nav {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mobile-menu a {
        display: block;
        padding: 12px 0;
        color: #111;
        text-decoration: none;
        border-bottom: 1px solid #f0f0f0;
        font-size: 16px;
        transition: color 0.3s ease;
    }

    .mobile-menu a:hover {
        color: #0b5394;
    }

    /* Sistema de grid - convertido para coluna única */
    .grad-system-session {
        flex-direction: column;
    }

    .grad-system-9,
    .grad-system-3,
    .grad-system-6 {
        flex: none;
        width: 100%;
        padding: 8px 0;
    }

    .grad-system-separator,
    .grad-system-line-separator {
        display: none;
    }

    .grad-system-line {
        flex-direction: column;
    }

    /* Matérias em horizontal - convertido para 2 colunas */
    .materias-horizontal {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .materia-miniatura {
        height: 150px;
    }

    .materia-horizontal-titulo {
        font-size: 14px;
    }

    .materia-horizontal-subtitulo {
        font-size: 12px;
    }

    /* Matéria principal */
    .materia-imagem {
        height: 250px;
    }

    .materia-titulo {
        font-size: 18px;
    }

    .materia-subtitulo {
        font-size: 14px;
    }

    /* Categorias de notícias */
    .news-categories {
        margin: 30px auto;
        padding: 0 12px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .category-image {
        height: 120px;
    }

    /* Tabs */
    .news-tabs-01,
    .news-tabs-02 {
        padding: 0 12px;
    }

    .tabs-01,
    .tabs-02 {
        justify-content: flex-start;
        gap: 10px;
        padding-bottom: 10px;
    }

    .tab-link-01,
    .tab-link-02 {
        font-size: 16px;
        white-space: nowrap;
    }

    /* Carrosséis */
    .carrossel-item,
    .opiniao-item {
        width: calc(50% - 9px);
    }

    .carrossel-btn,
    .carrossel_img_vid_btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    /* Carrossel de vídeos */
    .carrossel_img_vid_item {
        width: 280px;
        height: 480px;
    }

    .carrossel_img_vid_title {
        font-size: 1.8rem;
    }

    /* Opinião dos colunistas */
    .opiniao-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .opiniao-navegacao {
        margin-left: 0;
        align-self: flex-end;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .newsletter-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .newsletter-form {
        width: 100%;
        justify-content: center;
    }

    .newsletter-form input {
        min-width: 200px;
        flex: 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-links-bottom {
        justify-content: center;
    }

    /* Single Post ajustes */
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }

    .share-buttons {
        justify-content: center;
    }

    /* Widgets */
    .widget_search .search-form {
        flex-direction: column;
    }

    .widget_search .search-field {
        border-right: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 8px;
    }

    .widget_search .search-submit {
        border-radius: 4px;
    }
}

/* ===== SMARTPHONES PEQUENOS (até 480px) ===== */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 8px;
    }

    /* Top Bar ainda mais compacta - CORREÇÃO */
    .top-bar-container {
        padding: 6px 8px;
        font-size: 11px;
    }

    /* CORREÇÃO: Top bar center ajustado para mobile pequeno */
    .top-bar-center {
        gap: 10px;
        font-size: 10px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 5px;
    }

    .top-bar-center span {
        white-space: nowrap;
    }

    .top-bar-right {
        gap: 8px !important;
    }

    .mobile-menu-toggle {
        width: 36px !important;
        height: 36px !important;
        gap: 2px !important;
    }

    .mobile-menu-toggle span {
        width: 18px;
        height: 2px;
    }

    .search-icon i,
    .account-link i {
        font-size: 14px !important;
    }

    /* Logo menor */
    .logo {
        font-size: 18px;
    }

    /* Grid de matérias - coluna única */
    .materias-horizontal {
        grid-template-columns: 1fr;
    }

    /* Categorias - coluna única */
    .categories-grid {
        grid-template-columns: 1fr;
    }

    /* Carrosséis - item único */
    .carrossel-item,
    .opiniao-item {
        width: 100%;
    }

    /* Carrossel de vídeos ajustado */
    .carrossel_img_vid_item {
        width: 260px;
        height: 450px;
    }

    .carrossel_img_vid_title {
        font-size: 1.6rem;
    }

    /* Footer - coluna única */
    .footer-grid {
        grid-template-columns: 1fr;
    }

    /* Newsletter form empilhado */
    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }

    .newsletter-form input {
        min-width: auto;
        width: 100%;
    }

    /* Botões de compartilhamento empilhados */
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }

    .share-buttons a {
        width: 200px;
        justify-content: center;
    }

    /* Menu mobile mais estreito */
    .mobile-menu {
        width: 250px;
        padding: 15px;
    }

    /* CORREÇÃO: Botão fechar ajustado */
    .mobile-menu-close {
        font-size: 24px !important;
        width: 36px;
        height: 36px;
    }
}

/* ===== TABLETS (768px - 1024px) ===== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .materias-horizontal {
        grid-template-columns: repeat(3, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .carrossel-item,
    .opiniao-item {
        width: calc(33.333% - 12px);
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* CORREÇÃO: Gap maior para tablets */
    .top-bar-right {
        gap: 20px !important;
    }

    /* CORREÇÃO: Top bar center para tablets */
    .top-bar-center {
        font-size: 12px;
        gap: 20px;
    }
}

/* Resto do CSS permanece igual... */