/* ================================
   MELHORIAS DE RESPONSIVIDADE
   Blog Tec Perifa - 2026
   ================================ */

/* Containers Responsivos */
.container-responsive {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media(max-width: 768px) {
    .container-responsive {
        padding: 0 16px;
    }
}

@media(max-width: 480px) {
    .container-responsive {
        padding: 0 12px;
    }
}

/* Tipografia Responsiva */
body {
    font-size: 16px;
    line-height: 1.6;
}

@media(max-width: 768px) {
    body {
        font-size: 15px;
        line-height: 1.5;
    }
}

@media(max-width: 480px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* Headings Responsivos */
h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
}

h3:not(.blocoLinks h3):not(.blocoLinks1 h3) {
    font-size: 1.75rem;
    line-height: 1.3;
}

h4:not(.category-title):not(#featured-sidebar-links h4):not(.category-group h4) {
    font-size: 1.5rem;
    line-height: 1.4;
}

h5 {
    font-size: 1.25rem;
    line-height: 1.4;
}

h6 {
    font-size: 1rem;
    line-height: 1.5;
}

@media(max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3:not(.blocoLinks h3):not(.blocoLinks1 h3) {
        font-size: 1.5rem;
    }
    
    h4:not(.category-title):not(#featured-sidebar-links h4):not(.category-group h4) {
        font-size: 1.25rem;
    }
}

@media(max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3:not(.blocoLinks h3):not(.blocoLinks1 h3) {
        font-size: 1.25rem;
    }
}

/* Botões Responsivos */
button,
.btn {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media(max-width: 768px) {
    button,
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

@media(max-width: 480px) {
    button,
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Inputs e Selects Responsivos */
input,
select,
textarea {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

@media(max-width: 768px) {
    input,
    select,
    textarea {
        font-size: 0.95rem;
        padding: 8px 12px;
    }
}

/* Navegação Responsiva */
nav a,
nav button {
    min-height: 44px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media(max-width: 768px) {
    nav a,
    nav button {
        padding: 10px 14px;
    }
}

/* Menu Redes - Removido para usar estilo original */

/* Cards Responsivos */
.card,
.conteudoBox {
    width: 100%;
    padding: 20px;
    margin-bottom: 20px;
}

@media(max-width: 768px) {
    .card,
    .conteudoBox {
        padding: 16px;
        margin-bottom: 16px;
    }
}

@media(max-width: 480px) {
    .card,
    .conteudoBox {
        padding: 12px;
        margin-bottom: 12px;
    }
}

/* Imagens Responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Footer Responsivo */
footer {
    padding: 40px 20px;
}

@media(max-width: 768px) {
    footer {
        padding: 32px 16px;
    }
}

@media(max-width: 480px) {
    footer {
        padding: 24px 12px;
    }
}

/* Tabelas Responsivas */
table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

@media(max-width: 768px) {
    table {
        font-size: 0.9rem;
    }
    
    th,
    td {
        padding: 8px;
    }
}

/* Filtros/Search (todos-posts) */
.filters-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

@media(max-width: 768px) {
    .filters-container {
        gap: 12px;
        margin-bottom: 20px;
    }
}

@media(max-width: 480px) {
    .filters-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box,
    .select-filter {
        width: 100%;
    }
}

/* Touch Optimization */
@media (hover: none) and (pointer: coarse) {
    /* Dispositivos touch */
    a,
    button,
    input,
    select,
    textarea,
    [role="button"],
    [tabindex="0"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remover hover em touch devices */
    a:hover,
    button:hover {
        transform: none;
    }
}

/* Espaçamentos Verticais Consistentes */
section {
    padding: 60px 0;
}

@media(max-width: 768px) {
    section {
        padding: 40px 0;
    }
}

@media(max-width: 480px) {
    section {
        padding: 32px 0;
    }
}

/* Melhorias de Acessibilidade */
:focus-visible {
    outline: 2px solid #2e1065;
    outline-offset: 2px;
}

/* Reduzir movimento para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Modo escuro (preparação futura) */
@media (prefers-color-scheme: dark) {
    /* Preparação para modo escuro - não ativo por padrão */
    /* Descomentar quando implementar dark mode */
    /*
    :root {
        --bg-primary: #111827;
        --text-primary: #f9fafb;
    }
    */
}

/* Landscape Mode Mobile */
@media(max-height: 500px) and (orientation: landscape) {
    header {
        padding: 8px 0;
    }
    
    .menuExpandido {
        width: 50%;
        max-width: 350px;
    }
}

/* Print Styles */
@media print {
    .menuRedes,
    .menuExpandido,
    .fecharMenu,
    nav,
    button,
    .filters-container {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: underline;
        color: #000 !important;
    }
}

