/*
Theme Name: Evte News
Theme URI: https://evte.net/
Description: Tema completo e independente para sites de notícias. Layout moderno inspirado nos melhores portais de notícias. Não requer tema pai.
Author: Marco Jean
Author URI: https://evte.net/
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: evte-news
Tags: news, magazine, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, responsive
*/

/*
 * ====================================
 * EVTE NEWS THEME v2.0 - STANDALONE
 * Tema independente completo
 * Desenvolvido por Marco Jean
 * https://evte.net/
 * ====================================
 */

/* ============================================
   RESET E BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    /* NAO usar overflow-x: hidden aqui — quebra position: sticky nos filhos */
}

body {
    font-size: 16px;
    line-height: 1.6;
    color: var(--foreground, #18181b);
}

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

a {
    color: inherit;
    /* Controlado via functions.php */
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
}



/* ============================================
   CONTAINER E ESTRUTURA — Responsivo e alinhado
   Tudo usa o mesmo padding lateral + max-width
   Se adapta a qualquer tamanho de tela
   ============================================ */
/* ---- CSS Custom Properties para layout fluido ---- */
:root {
    --site-padding: clamp(1rem, calc(0.5rem + 2vw), 3rem);
    --site-max-width: 1280px;
    --site-gap: clamp(1.25rem, calc(0.5rem + 2vw), 2.5rem);
    --content-max: 820px;
}

.site-wrapper {
    width: 100%;
    /* Background herdado do body (controlado pelo Customizer) */
}

/* Container fluido — se adapta a qualquer viewport sem media queries */
.container {
    width: min(var(--site-max-width), 100% - var(--site-padding) * 2);
    margin-inline: auto;
}

/* Content area com sidebar — fluida */
.content-area {
    display: grid;
    grid-template-columns: 1fr min(300px, 30%);
    gap: var(--site-gap);
    width: min(var(--site-max-width), 100% - var(--site-padding) * 2);
    margin-inline: auto;
    padding-block: var(--site-gap);
}

/* Sem sidebar — container 1000px, texto limitado a 768px via pages.css */
.content-area:not(:has(.sidebar)) {
    grid-template-columns: 1fr;
    width: min(1000px, 100% - var(--site-padding) * 2);
}

.sidebar:empty {
    display: none;
}
.content-area:has(.sidebar:empty) {
    grid-template-columns: 1fr;
    width: min(1000px, 100% - var(--site-padding) * 2);
}

.main-content {
    min-width: 0;
}

/* ============================================
   HEADER — Editorial Premium Redesign
   ============================================ */
.site-header {
    background: var(--card, #fff);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}
/* Compensar WP admin bar quando logado */
.admin-bar .site-header {
    top: 32px;
}
@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px; /* admin bar e maior no mobile WP */
    }
}
.site-header.scrolled {
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

/* Top bar — escondida por padrao (visual moderno nao precisa) */
.header-top {
    display: none; /* Descomentar para mostrar: display: flex */
    background: var(--zinc-900, #18181b);
    color: var(--zinc-400, #a1a1aa);
    padding: 6px 0;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-date {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
    font-weight: 400;
}

.header-social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-social a {
    color: var(--zinc-400, #a1a1aa);
    transition: color 0.2s ease;
}

.header-social a:hover {
    color: #fff;
}

/* Header Brand Row — generoso respiro, refinado */
.header-brand {
    background: var(--card, #fff);
    padding: 28px 0 24px;
    border-bottom: 1px solid var(--border, #e4e4e7);
}

.header-brand .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/*
 * [i18n] Nota sobre text-transform: uppercase e caracteres acentuados (pt-BR)
 * CSS text-transform: uppercase funciona corretamente com acentos em todos
 * os navegadores modernos (e.g., "informacao" -> "INFORMACAO" com acento preservado).
 * Nenhuma correcao adicional e necessaria. Se houver .toUpperCase() em JS,
 * usar .toLocaleUpperCase('pt-BR') para garantir acentuacao correta.
 */
/* Logo — mais refinado, tracking tighter */
.site-logo {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 0;
}

.site-logo a {
    color: var(--foreground, #18181b);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-logo a:hover {
    color: var(--evte-primary, #0056b3);
}

.site-logo img {
    max-height: 55px;
    width: auto;
}

/* Search Box (Visible in Header) */
.header-search-box {
    flex-shrink: 0;
}

/* Search Box — mais limpo e moderno */
.header-search-box .search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--border, #e4e4e7);
    border-radius: var(--radius, 8px);
    overflow: hidden;
    background: var(--muted, #f4f4f5);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search-box .search-form:focus-within {
    border-color: var(--evte-primary, #0056b3);
    box-shadow: 0 0 0 3px rgba(var(--evte-primary-rgb, 0 86 179), 0.08);
    background: var(--card, #fff);
}

.header-search-box input[type="search"] {
    border: none;
    padding: 10px 14px;
    font-size: 14px;
    width: 200px;
    outline: none;
    background: transparent;
    color: var(--foreground, #333);
}

.header-search-box input[type="search"]::placeholder {
    color: var(--muted-foreground, #71717a);
}

.header-search-box button {
    background: transparent;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--muted-foreground, #71717a);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.header-search-box button:hover {
    color: var(--evte-primary, #0056b3);
}

.header-search-box button svg {
    stroke: currentColor;
}

/* Header Navigation Row — border-bottom full-bleed */
.header-nav {
    background: var(--card, #fff);
    border-bottom: 1px solid var(--border, #e4e4e7);
}

.header-nav .container {
    display: flex;
    align-items: center;
}

/* ============================================
   NAVIGATION MENU
   ============================================ */
.header-nav .site-navigation {
    width: 100%;
}

.main-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
}

.main-menu li {
    position: relative;
}

/* Primeiro item alinhado com o logo (sem padding-left extra) */
.main-menu > li:first-child > a {
    padding-left: 0;
}

/* Menu links com hover underline animado */
.main-menu > li > a {
    display: block;
    padding: 14px 18px;
    color: var(--foreground, #18181b);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    position: relative;
}

/* Underline animado (cresce da esquerda para direita) */
.main-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--evte-primary, #0056b3);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
/* Primeiro item: underline alinhado com o texto */
.main-menu > li:first-child > a::after {
    left: 0;
}

.main-menu > li > a:hover::after,
.main-menu > li.current-menu-item > a::after {
    transform: scaleX(1);
}

.main-menu > li > a:hover {
    color: var(--evte-primary, #0056b3);
}

.main-menu > li.current-menu-item > a,
.main-menu > li.current_page_item > a {
    color: var(--evte-primary, #0056b3);
}

/* Submenu — redesign clean */
.main-menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card, #fff);
    min-width: 220px;
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,0.1));
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    list-style: none;
    padding: 8px 0;
    z-index: 100;
    border-radius: 0 0 var(--radius, 8px) var(--radius, 8px);
    border-top: 2px solid var(--evte-primary, #0056b3);
}

.main-menu li:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-menu li ul li a {
    display: block;
    padding: 8px 20px;
    color: var(--foreground, #18181b);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.main-menu li ul li a:hover {
    background: var(--muted, #f4f4f5);
    color: var(--evte-primary, #0056b3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--foreground, #333);
    padding: 0;
}

@media (max-width: 992px) {
    .site-navigation.desktop-only {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .site-navigation.mobile-only.active {
        display: block !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card, #fff);
        z-index: 1000;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .site-navigation.mobile-only .main-menu {
        flex-direction: column;
    }

    .site-navigation.mobile-only .main-menu>li>a {
        padding: 15px 20px;
        border-bottom: 1px solid var(--border, #e4e4e7);
    }
}

/* ============================================
   FEATURED/HERO SECTION — Full-bleed editorial
   Fundo vai de ponta a ponta, conteudo centralizado
   ============================================ */
.featured-section {
    background: var(--card, #fff);
    padding-block: clamp(2rem, 4vw, 3.5rem);
    border-bottom: 1px solid var(--border, #e4e4e7); /* Linha full-bleed separadora */
}

.featured-section > .container,
.featured-grid {
    width: min(var(--site-max-width, 1280px), 100% - var(--site-padding, 1rem) * 2);
    margin-inline: auto;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(16px, 2.5vw, 32px);
}

/* [4.1] Trocado height fixo por aspect-ratio (resolve CLS + responsivo) */
.featured-main {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl, 12px);
    aspect-ratio: 16 / 9;
    max-height: 500px;
}

.featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 70%, transparent 100%);
    color: #fff;
}

.featured-category {
    display: inline-block;
    /* background: Controlado via functions.php */
    color: #fff;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm, 4px);
    margin-bottom: var(--space-4, 16px);
}

/* Titulo hero — dramatico, editorial, impactante */
.featured-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: var(--space-3, 12px);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.featured-title a {
    color: #fff;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    padding: 3px 0;
}



.featured-meta {
    font-size: 13px;
    opacity: 0.9;
}

.featured-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.featured-small {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl, 12px);
    aspect-ratio: 16 / 10;
}

.featured-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-small .featured-overlay {
    padding: 20px;
}

.featured-small .featured-title {
    font-size: 18px;
}

/* ============================================
   POSTS GRID
   ============================================ */
.posts-section {
    padding: clamp(2rem, 4vw, 3.5rem) 0;
    border-bottom: 1px solid var(--border, #e4e4e7);
}

/* Section titles — editorial, com accent line */
.section-title {
    font-size: var(--text-lg, 18px);
    font-weight: 700;
    color: var(--foreground, #18181b);
    margin-bottom: var(--space-6, 24px);
    padding-bottom: var(--space-3, 12px);
    border-bottom: 1px solid var(--border, #e4e4e7);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--evte-primary, #0056b3);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: var(--site-gap, 1.5rem);
    margin-bottom: var(--site-gap, 2rem);
}

/* Cards — clean, sem border, separacao por whitespace */
.post-card {
    background: var(--card, #fff);
    border-radius: var(--radius, 8px);
    overflow: hidden;
    border: none;
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

/* Hover — sutil, elegante */
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.post-card:hover .post-thumbnail img {
    transform: scale(1.02);
}
.post-card:hover .post-title a {
    color: var(--evte-primary, #0056b3);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Zoom suave premium */
}

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

.post-category {
    position: absolute;
    top: var(--space-4, 16px);
    left: var(--space-4, 16px);
    /* background: Controlado via functions.php */
    color: #fff;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm, 4px);
}

.post-content {
    padding: var(--space-5, 20px);
}

.post-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: var(--space-3, 12px);
    text-wrap: balance;
}

.post-title a {
    color: var(--foreground, #18181b);
    transition: color var(--duration-fast, 0.15s) var(--ease-out, ease);
}

.post-title a:hover {
    color: var(--evte-primary, #0056b3);
}



.post-excerpt {
    font-size: 14px;
    color: var(--muted-foreground, #71717a);
    line-height: 1.6;
    margin-bottom: var(--space-4, 16px);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3, 12px);
    font-size: 13px;
    color: var(--muted-foreground, #71717a);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   SIDEBAR — 2026 Minimal Editorial
   Inspirado em Abduzeedo, Medium, The Verge
   Sem bordas, sem caixas, whitespace generoso
   ============================================ */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    padding-left: var(--space-6, 24px);
    border-left: 1px solid var(--border, #e4e4e7);
}

/* Widget — sem caixa, sem border, sem bg. So conteudo. */
.widget {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: var(--space-8, 32px);
}

/* Titulo — micro label discreto */
.widget-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted-foreground, #a1a1aa);
    margin-bottom: var(--space-4, 16px);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    padding: 0;
}

/* Remove o ::after accent line (nao combina com minimal) */
.widget-title::after {
    display: none;
}

/* Listas de categorias */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 0;
    border: none;
}

.widget ul li a {
    color: var(--foreground, #18181b);
    font-size: 14px;
    font-weight: 400;
    display: block;
    padding: 6px 0;
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.widget ul li a:hover {
    color: var(--evte-primary, #0056b3);
    padding-left: 4px;
}

/* Widget Search — limpo, sem bordas pesadas */
.widget .search-form,
.widget form[role="search"] {
    display: flex;
}
.widget .search-form input[type="search"],
.widget .search-field,
.widget input[type="search"] {
    flex: 1;
    border: none;
    border-bottom: 1px solid var(--border, #e4e4e7);
    border-radius: 0;
    padding: 8px 0;
    font-size: 14px;
    background: transparent;
    outline: none;
    color: var(--foreground, #18181b);
    transition: border-color 0.2s ease;
}
.widget .search-form input[type="search"]:focus,
.widget .search-field:focus,
.widget input[type="search"]:focus {
    border-color: var(--evte-primary, #0056b3);
}
.widget .search-form button,
.widget .search-submit,
.widget input[type="submit"] {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px 4px;
    color: var(--muted-foreground, #a1a1aa);
    font-size: 14px;
    transition: color 0.15s ease;
}
.widget .search-form button:hover,
.widget .search-submit:hover,
.widget input[type="submit"]:hover {
    color: var(--evte-primary, #0056b3);
}

/* Posts Populares / Recentes — compacto e limpo */
.recent-post-item {
    display: flex;
    gap: var(--space-3, 12px);
    padding: 8px 0;
    align-items: flex-start;
    border: none;
}

.recent-post-item + .recent-post-item {
    border-top: 1px solid var(--border, #e4e4e7);
}

.recent-post-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--radius, 8px);
    overflow: hidden;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.recent-post-item:hover .recent-post-thumb img {
    opacity: 0.85;
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-content h4,
.recent-post-content .recent-post-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 2px;
}

.recent-post-content h4 a,
.recent-post-content .recent-post-title a {
    color: var(--foreground, #18181b);
    transition: color 0.15s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-content h4 a:hover,
.recent-post-content .recent-post-title a:hover {
    color: var(--evte-primary, #0056b3);
}

.recent-post-date {
    font-size: 11px;
    color: var(--muted-foreground, #a1a1aa);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

.recent-post-date svg {
    width: 11px;
    height: 11px;
    opacity: 0.6;
}

/* Tag Cloud — pills minimalistas */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tagcloud a {
    display: inline-block;
    padding: 3px 10px;
    background: transparent;
    color: var(--muted-foreground, #71717a) !important;
    font-size: 12px !important;
    border-radius: var(--radius-full, 9999px);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border: 1px solid var(--border, #e4e4e7);
    line-height: 1.5;
}

.tagcloud a:hover {
    background: var(--foreground, #18181b);
    color: #fff !important;
    border-color: var(--foreground, #18181b);
}

/* Numeros titanicos — reset para sidebar minimal */
.sidebar .recent-post-item::before {
    display: none;
}

/* ============================================
   SIDEBAR — Gutenberg Block Widgets (2026)
   Classes: .wp-block-search, .wp-block-categories,
   .wp-block-latest-posts, .wp-block-group
   ============================================ */

/* --- SEARCH BLOCK — Limpo, so input + lupa --- */
.sidebar .wp-block-search__label {
    display: none; /* Desnecessario — a lupa ja comunica "pesquisar" */
}

.sidebar .wp-block-search__inside-wrapper {
    display: flex;
    align-items: center;
    background: var(--muted, #f4f4f5);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: var(--radius-full, 9999px);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar .wp-block-search__inside-wrapper:focus-within {
    border-color: var(--evte-primary, #0056b3);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.06);
    background: var(--card, #fff);
}

.sidebar .wp-block-search__input {
    flex: 1;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    background: transparent;
    outline: none;
    color: var(--foreground, #18181b);
    min-width: 0;
}

.sidebar .wp-block-search__input::placeholder {
    color: var(--muted-foreground, #a1a1aa);
}

.sidebar .wp-block-search__button {
    border: none;
    background: transparent;
    color: var(--muted-foreground, #a1a1aa);
    padding: 10px 14px;
    font-size: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    min-width: 40px;
    min-height: 40px;
}

.sidebar .wp-block-search__button::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.sidebar .wp-block-search__button:hover {
    color: var(--evte-primary, #0056b3);
}

.sidebar .wp-block-search__button:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230056b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

/* --- WIDGET TITLES (Gutenberg H2 headings) --- */
.sidebar .wp-block-heading,
.sidebar .widget > h2,
.sidebar .widget_block h2 {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--foreground, #18181b) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none !important;
    padding: 0 0 10px !important;
    margin: 0 0 14px !important;
    line-height: 1.3;
    border-bottom: 1px solid var(--border, #e4e4e7) !important;
    position: relative;
}

/* Accent line no titulo */
.sidebar .wp-block-heading::after,
.sidebar .widget > h2::after,
.sidebar .widget_block h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--evte-primary, #0056b3);
}

/* --- CATEGORIAS (.wp-block-categories) --- */
.sidebar .wp-block-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .wp-block-categories li {
    padding: 0;
    border: none;
    margin: 0;
}

.sidebar .wp-block-categories li a {
    color: var(--foreground, #18181b);
    font-size: 14px;
    font-weight: 400;
    display: block;
    padding: 7px 0;
    border: none;
    transition: color 0.15s ease, transform 0.15s ease;
    border-bottom: 1px solid var(--border, #f0f0f0);
    transition: color 0.15s ease, padding-left 0.15s ease;
    text-decoration: none;
}

/* Sem border-bottom — separacao so por whitespace */

.sidebar .wp-block-categories li a:hover {
    color: var(--evte-primary, #0056b3);
    transform: translateX(4px);
}

/* --- PUBLICACOES RECENTES (.wp-block-latest-posts) --- */
.sidebar .wp-block-latest-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .wp-block-latest-posts li {
    padding: 8px 0;
    border: none;
    margin: 0;
}

.sidebar .wp-block-latest-posts li:first-child {
    padding-top: 0;
}

.sidebar .wp-block-latest-posts li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar .wp-block-latest-posts li a {
    color: var(--foreground, #18181b);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
    display: block;
}

.sidebar .wp-block-latest-posts li a:hover {
    color: var(--evte-primary, #0056b3);
    transform: translateX(4px);
}

.sidebar .wp-block-latest-posts__post-date {
    display: block;
    font-size: 12px;
    color: var(--muted-foreground, #a1a1aa);
    margin-top: 4px;
}

/* --- GUTENBERG GROUP WRAPPER --- */
.sidebar .wp-block-group__inner-container {
    padding: 0;
}

/* --- GENERIC WIDGET BLOCK LISTS --- */
.sidebar .widget_block ul:not(.wp-block-categories):not(.wp-block-latest-posts) {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .widget_block ul:not(.wp-block-categories):not(.wp-block-latest-posts) li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border, #f0f0f0);
}

.sidebar .widget_block ul:not(.wp-block-categories):not(.wp-block-latest-posts) li:last-child {
    border-bottom: none;
}

.sidebar .widget_block ul:not(.wp-block-categories):not(.wp-block-latest-posts) li a {
    color: var(--foreground, #18181b);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.sidebar .widget_block ul:not(.wp-block-categories):not(.wp-block-latest-posts) li a:hover {
    color: var(--evte-primary, #0056b3);
}

/* --- CLASSIC WIDGETS FALLBACK --- */
.sidebar .widget_recent_entries li,
.sidebar .widget_categories li,
.sidebar .widget_archive li {
    padding: 7px 0;
    border-bottom: 1px solid var(--border, #f0f0f0);
}

.sidebar .widget_recent_entries li:last-child,
.sidebar .widget_categories li:last-child,
.sidebar .widget_archive li:last-child {
    border-bottom: none;
}

.sidebar .widget_recent_entries li a,
.sidebar .widget_categories li a,
.sidebar .widget_archive li a {
    color: var(--foreground, #18181b);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.15s ease;
}

.sidebar .widget_recent_entries li a:hover,
.sidebar .widget_categories li a:hover,
.sidebar .widget_archive li a:hover {
    color: var(--evte-primary, #0056b3);
}

/* Classic search widget */
.sidebar .widget_search .search-form {
    display: flex;
    background: var(--muted, #f4f4f5);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: var(--radius, 8px);
    overflow: hidden;
}

.sidebar .widget_search .search-field {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: 14px;
    background: transparent;
    outline: none;
}

.sidebar .widget_search .search-submit {
    background: var(--evte-primary, #0056b3);
    color: #fff;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
}

/* ============================================
   FOOTER — Premium dark, elegante
   ============================================ */
.site-footer {
    background: var(--zinc-900, #18181b);
    color: var(--zinc-300, #d4d4d8);
    padding: clamp(3rem, 5vw, 5rem) 0 0;
    margin-top: clamp(3rem, 5vw, 5rem);
    border-top: 1px solid var(--border, #e4e4e7);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--site-gap, 2rem);
    width: min(var(--site-max-width, 1280px), 100% - var(--site-padding) * 2);
    padding-bottom: var(--site-gap, 2rem);
    margin: 0 auto;
}

.footer-widget h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 16px;
}

.footer-widget p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--zinc-400, #a1a1aa);
    font-weight: 400;
    margin-bottom: 20px;
}

.footer-logo-text {
    font-size: 20px !important;
    /* Override inline if needed, but better to remove inline */
    font-weight: 700 !important;
    letter-spacing: -0.5px;
    color: #fff;
    margin-bottom: 15px;
    display: block;
}

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

.footer-widget ul li {
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

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

.footer-widget ul li a {
    color: var(--zinc-400, #a1a1aa);
    font-size: 14px;
    transition: color 0.2s ease;
    display: block;
}

.footer-widget ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

/* Recent Posts in Footer */
.footer-recent-posts li {
    display: flex;
    align-items: flex-start;
    /* Align top */
    gap: 15px;
}

.footer-recent-posts .post-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--zinc-700, #3f3f46);
}

.footer-recent-posts .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.footer-recent-posts .post-thumb:hover img {
    transform: scale(1.1);
}

.footer-recent-posts .post-data h3 {
    font-size: 14px;
    font-weight: 500;
    /* Lighter weight */
    line-height: 1.4;
    margin: 0 0 5px 0;
    text-transform: none;
    letter-spacing: 0;
}

.footer-recent-posts .post-data h3 a {
    color: var(--zinc-200, #e4e4e7);
}

.footer-recent-posts .post-data h3 a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-recent-posts .date {
    font-size: 12px;
    color: var(--zinc-500, #71717a);
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-bottom {
    background: var(--zinc-950, #09090b);
    padding: var(--space-5, 20px) 24px;
    text-align: center;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom .container {
    max-width: var(--site-max-width, 1280px);
    margin: 0 auto;
}

.footer-bottom p {
    color: var(--zinc-500, #71717a);
    margin: 0;
    line-height: 1.6;
}



#theme-credit {
    font-weight: 700;
    transition: color 0.3s ease;
}



/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--card, #fff);
    color: var(--foreground, #333);
    border: 1px solid var(--border, #e0e0e0);
    border-radius: var(--radius, 5px);
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    /* background/border: Controlado via functions.php */
    color: #fff;
}

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

/* Tablet */
@media (max-width: 992px) {
    .content-area {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .featured-main {
        max-height: 400px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

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

/* Mobile Navigation Dropdown */
@media (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .header-main .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        position: relative;
        padding: 15px 20px;
    }

    .site-logo {
        flex: 1;
        min-width: 0;
    }

    .site-logo a,
    .site-logo img {
        max-width: 180px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        right: auto;
        top: auto;
    }

    .header-search {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }

    .header-search input {
        width: 100%;
    }

    .site-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card, #fff);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        border-top: 1px solid var(--border, #e4e4e7);
    }

    .site-navigation.active {
        display: block;
    }

    .main-menu {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    .main-menu>li {
        border-bottom: 1px solid var(--border, #e4e4e7);
    }

    .main-menu>li:last-child {
        border-bottom: none;
    }

    .main-menu>li>a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        font-size: 15px;
    }

    /* Submenu Arrow */
    .submenu-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 5px 10px;
        margin-left: 10px;
        transition: transform 0.3s ease;
    }

    /* Submenu Mobile */
    .main-menu li ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        background: transparent;
        padding: 0;
    }

    .main-menu li.submenu-open>ul {
        display: block;
    }

    .main-menu li ul li a {
        padding: 12px 20px 12px 35px;
        font-size: 14px;
        border-bottom: 1px solid #eee;
    }

    .main-menu li ul li:last-child a {
        border-bottom: none;
    }

    .featured-main {
        max-height: 300px;
    }

    .featured-title {
        font-size: 24px;
    }
}

/* Hide header-top on very small screens */
@media (max-width: 480px) {
    .header-top {
        display: none;
    }

    .site-logo a,
    .site-logo img {
        max-width: 140px;
    }

    .featured-overlay {
        padding: 20px;
    }

    .featured-title {
        font-size: 20px;
    }

    .post-title {
        font-size: 18px;
    }
}

/* ============================================================
   [MOBILE] CORRECOES GLOBAIS PARA SMARTPHONE
   Aplica a TODOS os layouts sem precisar editar cada home-*.css
   ============================================================ */

/* --- 768px: Tablet / Mobile landscape --- */
@media (max-width: 768px) {
    /* Grids de qualquer layout → 1 coluna */
    [class*="-grid"]:not(.posts-grid):not(.related-posts-grid) {
        grid-template-columns: 1fr !important;
    }

    /* Sidebar esconde na home (so mostra no single com sidebar) */
    .home .sidebar,
    .blog .sidebar {
        display: none;
    }

    /* Content area → full width */
    .home .content-area,
    .blog .content-area {
        grid-template-columns: 1fr !important;
    }

    /* Section titles menores */
    [class*="section-title"],
    [class*="-section-title"] {
        font-size: 1.1rem !important;
    }

    /* Hero titles */
    [class*="hero-title"],
    [class*="-cover-title"] {
        font-size: 1.5rem !important;
    }

    /* Deep/feature section titles */
    [class*="deep-title"],
    [class*="-big-title"],
    [class*="-feature-title"] {
        font-size: 1.5rem !important;
    }

    /* TOC mais estreito */
    .table-of-contents {
        max-width: 100%;
    }

    /* Post actions bar (AI + share) empilha */
    .post-actions-bar {
        flex-direction: column;
        gap: 12px;
    }

    /* Footer widgets empilham */
    .footer-widgets .container {
        grid-template-columns: 1fr !important;
    }
}

/* --- 480px: Phone portrait --- */
@media (max-width: 480px) {
    /* Tipografia ainda menor em phones */
    [class*="hero-title"],
    [class*="-cover-title"] {
        font-size: 1.25rem !important;
    }

    [class*="deep-title"],
    [class*="-big-title"] {
        font-size: 1.25rem !important;
    }

    /* Cards com thumbnail lateral → menos espaco */
    [class*="card-side"],
    [class*="-card-horizontal"] {
        gap: 10px;
    }

    [class*="side-thumb"],
    [class*="-card-side"] img,
    [class*="-thumb-small"] {
        width: 70px !important;
        height: 70px !important;
        flex-shrink: 0;
    }

    /* Excerpts escondidos em phones (so titulo) */
    [class*="hero-excerpt"],
    [class*="-cover-excerpt"] {
        display: none;
    }

    /* Badges/labels menores */
    [class*="cat-badge"],
    [class*="cat-tag"],
    [class*="category-label"] {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    /* Espacamento geral reduzido */
    section,
    [class*="-section"],
    [class*="-wrapper"] {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Post meta em phones — mais compacto */
    .entry-meta,
    [class*="post-meta"] {
        font-size: 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Shorts/stories grid → 2 colunas */
    [class*="shorts-grid"],
    [class*="stories-grid"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
    text-align: center;
}

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

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

/* ============================================
   ACESSIBILIDADE
   ============================================ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.evte-breadcrumbs {
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--muted-foreground, #666);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    line-height: 1.5;
}

.evte-breadcrumbs span[itemprop="itemListElement"] {
    display: inline-flex;
    align-items: center;
}

.evte-breadcrumbs a {
    color: var(--muted-foreground, #555);
    text-decoration: none;
    transition: color 0.2s ease;
}

.evte-breadcrumbs a:hover {
    color: var(--evte-primary, #0056b3);
}

.evte-breadcrumbs .separator {
    margin: 0 8px;
    color: var(--muted-foreground, #a1a1aa);
}

.evte-breadcrumbs .current-item {
    color: var(--foreground, #333);
}

@media (max-width: 768px) {
    .evte-breadcrumbs {
        font-size: 12px;
        margin-bottom: 15px;
    }
}

/* ============================================
   HEADER DEFAULT - RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    /* Header Brand */
    .header-brand .container {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .site-logo {
        font-size: 26px;
    }
    
    /* [1.3.6] Busca no mobile: compactar em vez de esconder */
    .header-search-box {
        flex-shrink: 0;
    }
    .header-search-box .search-form {
        width: auto;
    }
    .header-search-box input[type="search"] {
        width: 0;
        padding: 8px 0;
        opacity: 0;
        transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }
    .header-search-box.active input[type="search"] {
        width: 200px;
        padding: 8px 12px;
        opacity: 1;
    }
    .header-search-box button {
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Header Nav */
    .header-nav {
        display: none;
    }
    
    .header-nav.active {
        display: block;
    }
    
    .header-nav .site-navigation {
        padding: 0;
    }
    
    .header-nav .main-menu {
        flex-direction: column;
    }
    
    .header-nav .main-menu > li > a {
        padding: 12px 20px;
        border-bottom: 1px solid #e9ecef;
    }
    
    .header-nav .main-menu > li:last-child > a {
        border-bottom: none;
    }
    
    /* Submenu Mobile */
    .header-nav .main-menu li ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        display: none;
    }
    
    .header-nav .main-menu li.submenu-open ul {
        display: block;
    }
    
    .header-nav .main-menu li ul li a {
        padding-left: 40px;
    }
}

@media (max-width: 576px) {
    .header-top {
        padding: 6px 0;
        font-size: 12px;
    }
    
    .header-brand {
        padding: 15px 0;
    }
    
    .site-logo {
        font-size: 22px;
    }
    
    .site-logo img {
        max-height: 40px;
    }
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */
.header-search {
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--foreground, #333);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    color: var(--evte-primary, #0056b3);
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.search-form-overlay {
    display: flex;
    align-items: center;
    max-width: 600px;
    width: 100%;
    background: var(--card, #fff);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.search-form-overlay input[type="search"] {
    flex: 1;
    border: none;
    padding: 18px 20px;
    font-size: 18px;
    outline: none;
    background: var(--card, #fff);
}

.search-form-overlay input[type="search"]::placeholder {
    color: var(--muted-foreground, #a1a1aa);
}

.search-form-overlay button[type="submit"] {
    background: var(--evte-primary, #0056b3);
    border: none;
    padding: 18px 20px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.search-form-overlay button[type="submit"]:hover {
    background: color-mix(in srgb, var(--evte-primary, #0056b3) 80%, #000);
}

.search-form-overlay button[type="submit"] svg {
    stroke: #fff;
}

.search-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.search-close:hover {
    transform: scale(1.1);
}

.search-close svg {
    stroke: #fff;
    width: 30px;
    height: 30px;
}

@media (max-width: 768px) {
    .search-form-overlay {
        flex-direction: column;
    }
    
    .search-form-overlay input[type="search"] {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    .search-form-overlay button[type="submit"] {
        width: 100%;
        padding: 15px;
    }
}

/* ============================================================
   [1.3.2] FOCUS STYLES GLOBAIS (WCAG 2.4.7)
   Garante que todos os elementos interativos tenham focus visivel
   ============================================================ */

/* Focus visivel para teclado (nao aparece no clique do mouse) */
:focus-visible {
    outline: 2px solid var(--evte-primary, #0056b3);
    outline-offset: 2px;
}

/* Remove outline no clique do mouse (mantido no teclado) */
:focus:not(:focus-visible) {
    outline: none;
}

/* Focus especifico para links dentro do conteudo */
.entry-content a:focus-visible,
.main-content a:focus-visible {
    outline: 2px solid var(--evte-primary, #0056b3);
    outline-offset: 1px;
    border-radius: 2px;
}

/* Focus em cards */
.post-card a:focus-visible,
.featured-post a:focus-visible {
    outline: 2px solid var(--evte-primary, #0056b3);
    outline-offset: 3px;
}

/* Skip link (aparece so quando focado via Tab) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    padding: 12px 24px;
    background: var(--evte-primary, #0056b3);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    transition: top 0.15s ease;
}
.skip-link:focus {
    top: 0;
    outline: none;
}

/* ============================================================
   [1.3.3] BACK-TO-TOP BUTTON
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--evte-primary, #0056b3);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ============================================================
   [1.5.1] AUTHOR PAGE BOX
   ============================================================ */
.author-page-box {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 24px;
    background: var(--card, #fff);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}
.author-page-avatar img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
}
.author-page-info {
    flex: 1;
}
.author-page-job {
    font-size: 14px;
    font-weight: 600;
    color: var(--evte-primary, #0056b3);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.author-page-bio {
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted-foreground, #555);
    margin-bottom: 12px;
}
.author-page-link a {
    font-size: 13px;
    color: var(--evte-primary, #0056b3);
    word-break: break-all;
}
.author-page-count {
    font-size: 13px;
    color: var(--muted-foreground, #a1a1aa);
    margin-top: 8px;
}
@media (max-width: 480px) {
    .author-page-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ============================================================
   [1.3.7] PLACEHOLDER IMAGE
   ============================================================ */
.placeholder-image {
    background: var(--muted, #f0f0f0);
    object-fit: cover;
}

/* ============================================================
   [2.5.2] GRAIN/NOISE TEXTURE OVERLAY
   Textura sutil de revista impressa. CSS puro via SVG data URI (~1KB).
   Transforma design flat em tatil. Zero HTTP requests.
   ============================================================ */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   [2.5.3] GLASSMORPHISM NO STICKY HEADER
   backdrop-filter: blur(16px) quando header faz scroll.
   Sensacao de app nativo moderno. 97%+ browser support.
   ============================================================ */
.site-header.scrolled .header-brand,
.site-header.scrolled .header-nav {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.dark .site-header.scrolled .header-brand,
.dark .site-header.scrolled .header-nav {
    background: rgba(24, 24, 27, 0.85);
}

/* ============================================================
   [2.5.4] COLORED SHADOWS (sombra na cor do brand)
   Diferencia visualmente de sombras genericas preto/cinza.
   ============================================================ */
.post-card:hover {
    box-shadow: 0 8px 30px rgba(var(--evte-primary-rgb, 0 86 179), 0.12);
}

/* ============================================================
   [2.5.5] SCROLL REVEAL BASE
   Elementos comecam invisiveis e aparecem com fade+translateY.
   A classe .revealed e adicionada via IntersectionObserver (scroll-reveal.js)
   ============================================================ */
.post-card,
.featured-post,
.featured-small {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--duration-slow, 0.3s) var(--ease-out, ease),
                transform var(--duration-slow, 0.3s) var(--ease-out, ease);
}
.post-card.revealed,
.featured-post.revealed,
.featured-small.revealed,
/* Fallback: se JS desabilitado, mostrar tudo */
.no-js .post-card,
.no-js .featured-post,
.no-js .featured-small {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay para cards em grid */
.post-card:nth-child(2) { transition-delay: 0.05s; }
.post-card:nth-child(3) { transition-delay: 0.1s; }
.post-card:nth-child(4) { transition-delay: 0.15s; }

/* ============================================================
   [2.5.6] TOUCH TARGETS
   Ensure interactive elements meet 44x44px minimum (WCAG 2.5.5).
   ============================================================ */
.mobile-menu-toggle,
.search-toggle,
.back-to-top,
nav a,
.pagination a {
    min-height: 44px;
    min-width: 44px;
}

/* ============================================================
   [2.6] WCAG CONTRASTE FIXES
   Corrigir as 4 falhas de contraste identificadas na auditoria.
   ============================================================ */

/* Post meta: ratio 5.74:1 sobre branco, passa WCAG AA */
.post-meta,
.post-date,
.entry-meta {
    color: var(--muted-foreground, #666);
}

/* Footer text: clarear para garantir 4.5:1 sobre dark bg */
.footer-widget,
.footer-widget p,
.footer-widget li {
    color: var(--zinc-300, #d4d4d8); /* ratio 7.15:1 */
}

.footer-bottom,
.footer-bottom p {
    color: var(--zinc-400, #a1a1aa); /* ratio 5.38:1 */
}

.footer-widget .date,
.footer-bottom .date {
    color: var(--zinc-400, #a1a1aa); /* ratio 5.02:1 */
}

/* ============================================================
   NUMEROS TITANICOS NO RANKING (sidebar popular posts)
   Numeros grandes em outline atras dos items do ranking.
   ============================================================ */
.recent-post-item {
    position: relative;
    counter-increment: popular-counter;
}
.recent-post-item::before {
    content: counter(popular-counter);
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--evte-primary-tint-20, #ccdcee);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}
.sidebar .widget:first-child .recent-post-item {
    counter-reset: popular-counter;
}

/* Section dividers — linhas full-bleed finas (editorial) */
/* Removido clip-path angulado — temas premium usam linhas retas */

/* ============================================================
   [2.2.1] DARK MODE TOGGLE — Item do menu de navegacao
   Desktop: icone sutil alinhado à direita na nav bar.
   Mobile: item completo com label "Modo escuro" no painel.
   ============================================================ */

/* Desktop */
.menu-item-dark-mode {
    display: flex;
    align-items: center;
    margin-left: auto !important;
}

.dark-mode-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius-full, 9999px);
    transition: color 0.2s ease, opacity 0.2s ease;
    opacity: 0.6;
    line-height: 1;
}

.dark-mode-toggle:hover {
    opacity: 1;
    color: var(--evte-primary, #0056b3);
}

/* Light mode: mostra lua, esconde sol */
.dm-icon-sun { display: none; }
.dm-icon-moon { display: block; }

/* Dark mode: mostra sol, esconde lua */
.dark .dm-icon-sun { display: block; }
.dark .dm-icon-moon { display: none; }

.dark .dark-mode-toggle:hover {
    color: var(--evte-primary, #60a5fa);
}

/* Esconder o li do toggle dentro dos paineis slide (tem toggle dedicado no panel-footer) */
.suspended-menu-panel .menu-item-dark-mode,
.diario-menu-panel .menu-item-dark-mode {
    display: none !important;
}

/* Panel footer — fundo do painel com toggle */
.panel-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border, #e4e4e7);
    margin-top: auto;
}

.panel-dm-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--muted-foreground, #71717a);
    display: flex;
    align-items: center;
    border-radius: var(--radius-full, 9999px);
    transition: color 0.2s ease;
}

.panel-dm-toggle:hover {
    color: var(--foreground, #18181b);
}

/* Painel precisa ser flex column para o footer ir pro fundo */
.suspended-menu-panel,
.diario-menu-panel {
    display: flex;
    flex-direction: column;
}

.suspended-menu-panel .panel-nav,
.diario-menu-panel .panel-nav {
    flex: 1;
}

/* Mobile: esconder o li do toggle no menu genérico */
@media (max-width: 992px) {
    .site-navigation .menu-item-dark-mode {
        margin-left: 0 !important;
        margin-top: auto;
        padding: 16px 20px;
    }
}

/* ============================================================
   [2.2.2] DARK MODE — GLOBAL OVERRIDES
   Correcoes para elementos que nao usam variaveis CSS.
   Garante contraste WCAG AA em todos os componentes.
   ============================================================ */

/* Body background */
.dark body,
.dark .site-wrapper {
    background-color: var(--background, #09090b);
    color: var(--foreground, #fafafa);
}

/* Header */
.dark .site-header,
.dark .top-bar {
    background-color: var(--card, #18181b);
    border-color: var(--border, #27272a);
    color: var(--foreground, #fafafa);
}

.dark .site-header a,
.dark .top-bar a {
    color: var(--foreground, #fafafa);
}

.dark .main-menu > li > a {
    color: var(--foreground, #fafafa);
}

/* Cards */
.dark .post-card,
.dark .featured-section {
    background-color: var(--card, #18181b);
    border-color: var(--border, #27272a);
}

.dark .post-card .post-title a,
.dark .featured-title a {
    color: var(--foreground, #fafafa);
}

.dark .post-card .post-excerpt,
.dark .post-meta {
    color: var(--muted-foreground, #a1a1aa);
}

/* Section titles */
.dark .section-title {
    color: var(--foreground, #fafafa);
}

.dark .section-title::after {
    background-color: var(--evte-primary, #0056b3);
}

/* Sidebar */
.dark .sidebar {
    color: var(--foreground, #fafafa);
}

.dark .sidebar .widget-title {
    color: var(--foreground, #fafafa);
    border-color: var(--border, #27272a);
}

.dark .sidebar a {
    color: var(--muted-foreground, #a1a1aa);
}

.dark .sidebar a:hover {
    color: var(--foreground, #fafafa);
}

/* Inputs e formularios */
.dark input,
.dark textarea,
.dark select {
    background-color: var(--input, #27272a);
    border-color: var(--border, #27272a);
    color: var(--foreground, #fafafa);
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: var(--muted-foreground, #a1a1aa);
}

/* Footer — fundo levemente mais claro que body para separacao visual */
.dark .site-footer {
    background-color: var(--zinc-900, #18181b);
    border-top: 1px solid var(--border, #27272a);
}

/* Pagination */
.dark .pagination a,
.dark .pagination span {
    background-color: var(--card, #18181b);
    border-color: var(--border, #27272a);
    color: var(--foreground, #fafafa);
}

/* Search overlay */
.dark .search-form-overlay {
    background: var(--card, #18181b);
}

.dark .search-form-overlay input[type="search"] {
    background: var(--card, #18181b);
    color: var(--foreground, #fafafa);
}

/* Mobile menu panels */
.dark .suspended-menu-panel,
.dark .diario-menu-panel {
    background: var(--card, #18181b);
    color: var(--foreground, #fafafa);
}

.dark .panel-header {
    background: var(--card, #18181b);
    border-color: var(--border, #27272a);
}

/* TOC */
.dark .table-of-contents {
    background: var(--muted, #27272a);
}

.dark .table-of-contents li a {
    color: var(--foreground, #fafafa);
    border-bottom-color: var(--border, #27272a);
}

/* Author box */
.dark .author-box,
.dark .author-page-box {
    background: var(--muted, #27272a);
}

/* Breadcrumbs */
.dark .evte-breadcrumbs a {
    color: var(--muted-foreground, #a1a1aa);
}

/* Error pages */
.dark .error-404,
.dark .search-header,
.dark .no-results {
    background: var(--card, #18181b);
}

/* Tags */
.dark .tagcloud a {
    border-color: var(--border, #27272a);
    color: var(--muted-foreground, #a1a1aa) !important;
}

.dark .tagcloud a:hover {
    background: var(--foreground, #fafafa);
    color: var(--background, #09090b) !important;
}

/* Imagens — ajuste brilho sutil no dark */
.dark .post-thumbnail img,
.dark .featured-image img {
    filter: brightness(0.92);
}

/* ============================================================
   [2.2.4] DARK MODE — HOME LAYOUTS FIX
   Correcoes especificas para discovery, national, portal, etc.
   ============================================================ */

/* Cards — bordas visiveis e fundo card */
.dark [class*="disc-card"],
.dark [class*="national-"] article,
.dark [class*="portal-"] article,
.dark [class*="modern-"] article,
.dark [class*="g1-"] article {
    background-color: var(--card, #18181b);
    border: 1px solid var(--border, #27272a) !important;
}

/* Titulos de secao */
.dark [class*="section-title"],
.dark [class*="section-label"],
.dark [class*="disc-section"] {
    color: var(--foreground, #fafafa);
}

/* Titulos de posts em todas as home layouts */
.dark [class*="disc-"] h3 a,
.dark [class*="disc-headline"] a,
.dark [class*="national-"] h3 a,
.dark [class*="portal-"] h3 a,
.dark [class*="modern-"] h3 a {
    color: var(--foreground, #fafafa);
}

/* Category badges / labels */
.dark .disc-cat-badge {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
}

/* Datas e metas */
.dark [class*="disc-date"],
.dark [class*="disc-meta"],
.dark [class*="disc-time"] {
    color: var(--muted-foreground, #a1a1aa);
}

/* Category labels pequenos (usam cor primaria) */
.dark [class*="disc-cat-tiny"],
.dark [class*="cat-name"],
.dark [class*="category-label"] {
    color: var(--evte-primary); /* ja clareada via PHP no .dark */
}

/* Section separators */
.dark [class*="disc-section"]::after,
.dark .section-title::after {
    background-color: var(--evte-primary);
}

/* Sidebar widgets no dark */
.dark .sidebar .widget {
    border-color: var(--border, #27272a);
}

/* Search input no header */
.dark .header-search-box input,
.dark .search-form input {
    background: var(--card, #18181b);
    border-color: var(--border, #27272a);
    color: var(--foreground, #fafafa);
}

/* Links genericos */
.dark a {
    color: var(--foreground, #fafafa);
}

.dark a:hover {
    color: var(--evte-primary);
}

/* WordPress admin bar fix */
@media (prefers-color-scheme: dark) {
    :root:not(.light) body,
    :root:not(.light) .site-wrapper {
        background-color: var(--background);
        color: var(--foreground);
    }
}

/*
   These are conditionally loaded in inc/core.php
*/