/*
Theme Name: Fast WebX
Theme URI: https://mesaquemota.com.br/
Author: Mesaque M. - Academia WebX
Author URI: https://mesaquemota.com.br/
Description: Tema WordPress ultraleve focado em automação de blogs, alta conversão e SEO perfeito. Plug and Play com pontuação 100/100 no PageSpeed.
Version: 1.7.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: fast-webx
*/

/* Variáveis de estilo e design minimalista inicial */
:root {
    --fwx-primary: #dd3333;
    --fwx-secondary: #34a881;
    --fwx-bg-color: #ffffff;
    --fwx-text-color: #000000;
}

html {
    scroll-behavior: smooth;
}

/* --- CSS Reset Global Otimizado --- */
*,
*:before,
*:after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--fwx-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
    color: var(--fwx-text-color);
    background-color: var(--fwx-bg-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--fwx-link-color, var(--fwx-primary));
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--fwx-secondary);
}

/* Modifiers for elements that need dark mode adjustments */
.site-header {
    border-bottom: 1px solid rgba(0, 0, 0, var(--fwx-border-opacity, 0.05));
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: background-color 0.3s ease;
}

.site-branding img.custom-logo {
    max-height: 50px;
    width: auto;
}

html[data-theme='dark'] .site-branding img.fwx-light-logo {
    display: none !important;
}

html[data-theme='dark'] .site-branding img.fwx-dark-logo {
    display: block !important;
}

html[data-theme='dark'] .site-header {
    border-bottom-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

html[data-theme='dark'] .fwx-sidebar-box {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

html[data-theme='dark'] .fwx-share-buttons,
html[data-theme='dark'] .fwx-author-box {
    border-color: rgba(255, 255, 255, 0.05);
}

html[data-theme='dark'] .fwx-author-box {
    background: rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .fwx-post-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-theme='dark'] .fwx-lead-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

/* --- TOC Styles --- */
.fwx-toc-container {
    background-color: rgba(0, 0, 0, 0.03);
    border-left: 4px solid var(--fwx-primary);
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
}

.fwx-toc-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.fwx-toc-title {
    font-weight: 600;
    font-size: 1.1em;
}

.fwx-toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.fwx-toc-list li {
    margin-bottom: 8px;
}

.fwx-toc-list a {
    color: var(--fwx-text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.fwx-toc-list a:hover {
    color: var(--fwx-secondary);
    text-decoration: underline;
}

/* --- Base Layout --- */
.fwx-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.site-header {
    background: var(--fwx-bg-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px 0;
}

.fwx-sticky-header .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-title a {
    text-decoration: none;
    color: var(--fwx-text-color);
    font-weight: 800;
}

.site-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

/* --- Menu Resets & Flex --- */
.main-navigation ul,
.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer-navigation ul {
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.site-info {
    margin-top: 30px;
}

.site-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.01);
    padding: 40px 0;
    margin-top: 60px;
}

html[data-theme='dark'] .site-footer {
    border-top-color: rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
}

/* --- Dark Mode Toggle Button --- */
.fwx-theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--fwx-text-color);
    padding: 5px;
    display: flex;
    align-items: center;
    border-radius: 5px;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.fwx-theme-toggle svg {
    width: 20px;
    height: 20px;
}

.fwx-theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

html[data-theme='dark'] .fwx-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Mobile Menu Styles --- */
.fwx-mobile-btn {
    display: none;
    background: none;
    border: none;
    color: var(--fwx-text-color);
    cursor: pointer;
    padding: 10px;
}

.fwx-mobile-btn-close {
    display: none;
}

.fwx-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s;
}

.fwx-overlay.active {
    display: block;
    opacity: 1;
}

[data-theme="dark"] .fwx-icon-sun {
    display: none !important;
}

[data-theme="dark"] .fwx-icon-moon {
    display: block !important;
}

/* --- Progress Bar --- */
.fwx-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--fwx-primary);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Ajuste para quando a barra de administração do WP está ativa */
.admin-bar .fwx-reading-progress {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .fwx-reading-progress {
        top: 46px;
    }
}

/* --- Archive Layout (Listagens com Sidebar) --- */
/* Completamente independente do single layout */
.fwx-archive-layout {
    display: block;
    /* sem restricao de grid aqui */
    margin-top: 40px;
    margin-bottom: 50px;
}

.fwx-archive-layout.has-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

.fwx-archive-content {
    min-width: 0;
    /* evita overflow do grid */
    width: 100%;
    /* ocupa todo o espaco disponivel */
}

/* --- Home Layouts (CSS Grid) --- */
.fwx-posts-grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

/* Sem margin-top extra quando a sidebar está ativa nas listagens */
.fwx-archive-layout.has-sidebar .fwx-posts-grid {
    margin-top: 0;
}

/* Layout A: Lista Simples */
.fwx-grid-layout-a {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 40px auto;
}

/* Sem sidebar: layouts A e E expandem para o container completo */
/* Com sidebar: também removem max-width para preencher a coluna de conteúdo */
.fwx-archive-layout.no-sidebar .fwx-grid-layout-a,
.fwx-archive-layout.no-sidebar .fwx-grid-layout-e,
.fwx-archive-layout.has-sidebar .fwx-grid-layout-a,
.fwx-archive-layout.has-sidebar .fwx-grid-layout-e {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Layout C com sidebar: força 3 colunas para manter identidade visual única vs Layout D */
.fwx-archive-layout.has-sidebar .fwx-grid-layout-c {
    grid-template-columns: repeat(3, 1fr);
}

/* Featured do C com sidebar: destaque ocupa linha inteira, inner em 2 colunas */
.fwx-archive-layout.has-sidebar .fwx-grid-layout-c .fwx-post-featured {
    grid-template-columns: 1fr 1fr;
}

/* Layout B: Grid de Colunas */
.fwx-grid-layout-b {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Layout C: Híbrido (Primeiro em destaque) */
.fwx-grid-layout-c {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.fwx-grid-layout-c .fwx-post-featured {
    grid-column: 1 / -1;
    /* Ocupa a linha inteira */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch;
}

/* Featured posts (destaque) nos layouts C e D: thumb preenche 100% da altura */
.fwx-post-featured .fwx-post-thumb {
    height: 100%;
}

.fwx-post-featured .fwx-post-thumb a {
    display: block;
    height: 100%;
}

.fwx-post-featured .fwx-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto;
    border-radius: 8px;
}

/* Layout D: Destaque + 2 Colunas */
.fwx-grid-layout-d {
    grid-template-columns: repeat(2, 1fr);
}

.fwx-grid-layout-d .fwx-post-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch;
}

.fwx-grid-layout-d .fwx-post-item {
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--fwx-bg-color);
    border-radius: 8px;
    overflow: hidden;
}

html[data-theme='dark'] .fwx-grid-layout-d .fwx-post-item {
    border-color: rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 768px) {

    .fwx-grid-layout-d,
    .fwx-grid-layout-d .fwx-post-featured {
        grid-template-columns: 1fr;
    }
}

/* Layout E: Lista com Thumbs Grandes (Estilo Editorial) */
.fwx-grid-layout-e {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 40px auto;
}

.fwx-grid-layout-e .fwx-post-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--fwx-bg-color);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
}

html[data-theme='dark'] .fwx-grid-layout-e .fwx-post-item {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

.fwx-grid-layout-e .fwx-post-thumb {
    width: 42%;
    flex-shrink: 0;
    line-height: 0;
}

.fwx-grid-layout-e .fwx-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    /* O container já tem radius */
}

.fwx-grid-layout-e .fwx-post-content {
    width: 58%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- Hero do Blog (Página Inicial) --- */
.fwx-blog-hero {
    background: var(--fwx-hero-color);
    color: var(--fwx-hero-text-color);
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 50px;
}

.fwx-blog-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.fwx-blog-hero-title {
    font-size: 2.5em;
    font-weight: 800;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.fwx-blog-hero-desc {
    font-size: 1.2em;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

.fwx-blog-hero-layout-2 {
    background: transparent;
    color: var(--fwx-text-color);
    padding: 60px 0 0;
    text-align: left;
    margin-bottom: 20px;
}

.fwx-blog-hero-layout-2 .fwx-blog-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0 20px 40px;
}

html[data-theme='dark'] .fwx-blog-hero-layout-2 .fwx-blog-hero-inner {
    border-color: rgba(255, 255, 255, 0.05);
}

.fwx-blog-hero-layout-2 .fwx-blog-hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin: 0 0 15px 0;
    line-height: 1.1;
}

.fwx-blog-hero-layout-2 .fwx-blog-hero-desc {
    font-size: 1.25em;
    opacity: 0.8;
    max-width: 700px;
}

@media (max-width: 768px) {
    .fwx-blog-hero {
        padding: 30px 20px;
        margin-bottom: 30px;
    }

    .fwx-blog-hero-layout-2 {
        padding: 30px 0 0;
        margin-bottom: 10px;
    }

    .fwx-blog-hero-layout-2 .fwx-blog-hero-inner {
        padding-bottom: 20px;
    }

    .fwx-blog-hero-title {
        font-size: 2em;
    }

    .fwx-blog-hero-layout-2 .fwx-blog-hero-title {
        font-size: 2.5rem;
    }

    .fwx-grid-layout-e .fwx-post-item {
        flex-direction: column;
    }

    .fwx-grid-layout-e .fwx-post-thumb,
    .fwx-grid-layout-e .fwx-post-content {
        width: 100%;
    }

    .fwx-grid-layout-e .fwx-post-thumb {
        height: 220px;
    }

    .fwx-grid-layout-e .fwx-post-content {
        padding: 20px;
    }
}

/* --- Paginação (AJAX Load More) --- */
.fwx-load-more-wrapper {
    text-align: center;
    margin: 50px 0 20px;
    grid-column: 1 / -1;
}

.fwx-btn-load-more {
    background: var(--fwx-primary);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.fwx-btn-load-more:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

.fwx-btn-load-more:hover:not(:disabled) {
    background: var(--fwx-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* --- Posts & Pages: dimensionamento base --- */
/* (Grid definido abaixo em '--- Single Post Otimizado ---') */

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.25;
    margin-bottom: 0.5em;
    font-weight: 700;
}

.fwx-post-item {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    background: var(--fwx-bg-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fwx-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.fwx-post-thumb {
    overflow: hidden;
    background: rgba(0, 0, 0, 0.03);
}

/* Proporção 3:2 = mesmo crop registrado pelo tema (600x400, fwx-home-grid) */
.fwx-post-thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    aspect-ratio: 3 / 2;
}

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

.entry-title a {
    text-decoration: none;
    color: var(--fwx-text-color);
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: var(--fwx-secondary);
}

.fwx-cat-label {
    display: inline-block;
    background: var(--fwx-primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-bottom: 10px;
    text-decoration: none;
    font-weight: 600;
}

.fwx-cat-label:hover {
    background: var(--fwx-secondary);
    color: #fff;
}

/* --- Single Post Otimizado --- */
.fwx-single-layout {
    display: grid;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 50px;
    /* Largura controlada pelo .fwx-container (max-width: 1200px, box-sizing: border-box) */
}

.fwx-single-layout.has-sidebar {
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* Limitar o main content a 700px dentro do grid */
.fwx-single-layout.has-sidebar .fwx-single-content {
    max-width: 700px;
    width: 100%;
}

.fwx-single-layout.no-sidebar {
    grid-template-columns: minmax(auto, 700px);
    justify-content: center;
}

/* Layout 2: Wide/Impact */
.fwx-single-layout.fwx-single-layout-2 {
    margin-top: 0;
}

.fwx-single-header-2 {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 60px 20px 0;
}

.fwx-single-header-2 .fwx-cat-label {
    /* herda o estilo global de botão (.fwx-cat-label) sem sobrescrever */
    margin-bottom: 10px;
}

.fwx-single-header-2 .entry-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-top: 0;
    margin-bottom: 20px;
}

.entry-excerpt {
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.5;
}

.fwx-single-header-2 .entry-meta {
    justify-content: center;
    display: flex;
    gap: 15px;
    font-weight: 600;
    font-size: 0.75em;
    text-transform: uppercase;
}

.fwx-hero-wide-thumb {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.fwx-hero-wide-thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 3 / 2;
    border-radius: 8px;
    display: block;
}

@media (max-width: 768px) {
    .fwx-single-layout.has-sidebar {
        grid-template-columns: 1fr;
    }

    .fwx-grid-layout-c .fwx-post-featured {
        grid-template-columns: 1fr;
    }

    .fwx-single-header-2 {
        padding: 40px 20px 0;
    }

    .fwx-single-header-2 .entry-title {
        font-size: 1.8rem;
    }

    .fwx-single-header-2 .fwx-cat-label {
        font-size: 0.7em;
    }

    .fwx-hero-wide-thumb {
        width: 100%;
        margin: 0 0 30px 0;
        padding: 0;
    }

    .fwx-hero-wide-thumb img {
        border-radius: 0;
        aspect-ratio: 3 / 2;
    }

    .fwx-single-header-2 .entry-meta {
        gap: 10px;
        font-size: 0.7em;
    }
}

.entry-meta {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 20px;
}

.fwx-hero-thumb {
    margin-bottom: 30px;
}

/* --- Vídeos e Embeds Responsivos --- */
.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content video {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: none;
    display: block;
    border-radius: 6px;
}

/* --- Funil/Blank Template --- */
    margin: 40px auto;
    padding: 20px;
}

/* --- Hierarquia Visual & Legibilidade (Fase C) --- */
.entry-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--fwx-text-color);
}

.entry-content p {
    margin-bottom: 28px;
}

.entry-content h2, 
.entry-content h3, 
.entry-content h4 {
    color: var(--fwx-text-color);
    margin-top: 50px;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.entry-content h2 { font-size: 2rem; }
.entry-content h3 { font-size: 1.6rem; }
.entry-content h4 { font-size: 1.3rem; }

.entry-content ul, 
.entry-content ol {
    margin-bottom: 28px;
    padding-left: 25px;
}

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


/* --- Social Share & Author Box --- */
.fwx-share-buttons {
    margin: 40px 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    flex-wrap: wrap;
    text-align: left;
}

.fwx-share-title {
    font-weight: 700;
    margin-right: 5px;
}

.fwx-btn-share {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 10px;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9em;
}

.fwx-whatsapp {
    background: #25D366;
}

.fwx-facebook {
    background: #1877F2;
}

.fwx-twitter {
    background: #000000;
}

.fwx-author-box {
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.02);
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.fwx-author-avatar {
    flex-shrink: 0;
    width: 80px;
}

.fwx-author-avatar img {
    border-radius: 50%;
    width: 100%;
    height: auto;
}

.fwx-author-name {
    margin-top: 0;
}

/* --- Sidebar Author Widget (E-E-A-T) --- */
.fwx-sidebar-author {
    margin-bottom: 30px;
}

.fwx-sidebar-author-inner {
    text-align: center;
    padding: 25px 20px;
    background: var(--fwx-bg-color);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
}

html[data-theme='dark'] .fwx-sidebar-author-inner {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

.fwx-sidebar-author-avatar img {
    border-radius: 50%;
    width: 96px;
    height: 96px;
    margin: 0 auto 15px;
    object-fit: cover;
    border: 2px solid var(--fwx-primary);
    padding: 2px;
}

.fwx-sidebar-author-name {
    font-size: 1.25em;
    margin-bottom: 10px;
    font-weight: 700;
}

.fwx-sidebar-author-bio {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 20px;
    line-height: 1.5;
}

.fwx-sidebar-btn-author {
    display: inline-block;
    padding: 10px 20px;
    background: var(--fwx-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.fwx-sidebar-btn-author:hover {
    background: var(--fwx-secondary);
    color: #fff;
}

/* --- Lead Form (Shortcode) --- */
.fwx-lead-wrapper {
    background: #fdfdfd;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0;
}

.fwx-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.fwx-sidebar .fwx-input-group {
    flex-direction: column;
}

.fwx-sidebar .fwx-input-group button {
    padding: 12px;
}

.fwx-input-group input[type="email"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.fwx-input-group button {
    background: var(--fwx-primary);
    color: #fff;
    border: none;
    padding: 0 25px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.fwx-input-group button:hover {
    background: var(--fwx-secondary);
}

.fwx-checkbox-group label {
    font-size: 0.9em;
    color: var(--fwx-text-color);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 500;
}

.fwx-checkbox-group label input {
    margin-top: 5px;
}

.fwx-form-msg {
    margin-top: 15px;
    font-weight: bold;
    font-size: 0.9em;
}

.fwx-form-msg.fwx-success {
    color: #25D366;
}

.fwx-form-msg.fwx-error {
    color: #d32525;
}

/* --- Contact Form --- */
.fwx-contact-wrapper {
    background: var(--fwx-bg-color);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin: 40px 0;
}

html[data-theme='dark'] .fwx-contact-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.fwx-form-row {
    display: flex;
    gap: 20px;
}

.fwx-form-row .fwx-input-group {
    flex: 1;
}

.fwx-contact-wrapper .fwx-input-group {
    flex-direction: column;
    align-items: stretch;
}

.fwx-contact-wrapper label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.fwx-contact-wrapper .fwx-required {
    color: #d32525;
}

.fwx-contact-wrapper input[type="text"],
.fwx-contact-wrapper input[type="email"],
.fwx-contact-wrapper textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    font-size: 1em;
    background: var(--fwx-bg-color);
    color: var(--fwx-text-color);
    box-sizing: border-box;
}

html[data-theme='dark'] .fwx-contact-wrapper input,
html[data-theme='dark'] .fwx-contact-wrapper textarea {
    border-color: rgba(255, 255, 255, 0.1);
}

.fwx-action-group {
    margin-top: 20px;
}

.fwx-btn-submit {
    background: var(--fwx-primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.fwx-btn-submit:hover {
    background: var(--fwx-secondary);
}


/* --- LGPD Banner Flutuante --- */
.fwx-lgpd-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: auto;
    max-width: 400px;
    background: #111;
    color: #fff;
    padding: 20px 0px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 100000;
    box-sizing: border-box;
}

.fwx-lgpd-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fwx-lgpd-content p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.5;
    opacity: 0.9;
}

.fwx-lgpd-actions {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}

.fwx-lgpd-policy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff !important;
    padding: 10px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700 !important;
    font-size: 0.7em;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.fwx-lgpd-policy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fwx-lgpd-btn {
    background: var(--fwx-primary);
    color: #fff;
    border: none;
    padding: 10px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    min-width: 120px;
    flex: 1;
    font-size: 0.7em;
}

.fwx-lgpd-btn:hover {
    background: var(--fwx-secondary);
}

/* --- Area de Comentários Estilizada --- */
#respond {
    background: rgba(0, 0, 0, 0.02);
    padding: 30px;
    border-radius: 8px;
    margin-top: 40px;
}

html[data-theme='dark'] #respond {
    background: rgba(255, 255, 255, 0.02);
}

#respond input[type="text"],
#respond input[type="email"],
#respond textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--fwx-bg-color);
    color: var(--fwx-text-color);
    margin-bottom: 20px;
    box-sizing: border-box;
}

html[data-theme='dark'] #respond input[type="text"],
html[data-theme='dark'] #respond input[type="email"],
html[data-theme='dark'] #respond textarea {
    border-color: rgba(255, 255, 255, 0.1);
}

#respond .submit {
    background: var(--fwx-primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

#respond .submit:hover {
    background: var(--fwx-secondary);
}

@media (max-width: 768px) {
    h1.entry-title {
        font-size: 1.8rem;
    }

    .fwx-single-layout.has-sidebar,
    .fwx-archive-layout.has-sidebar {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .fwx-share-buttons,
    .fwx-post-tags {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        text-align: left;
    }

    .fwx-share-title,
    .fwx-post-tags strong {
        width: 100%;
        margin: 0 0 5px 0;
        line-height: 1.2;
    }

    .site-branding img.custom-logo {
        max-height: 40px;
    }

    .fwx-input-group {
        flex-direction: column;
    }

    .fwx-input-group button {
        padding: 15px;
    }

    .fwx-lgpd-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .fwx-mobile-btn {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -300px;
        width: 250px;
        height: 100vh;
        background: var(--fwx-bg-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 20px 20px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 10002;
    }

    .main-navigation.mobile-open {
        right: 0;
    }

    .fwx-mobile-hide-sidebar aside.fwx-sidebar {
        display: none !important;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .fwx-mobile-btn-close {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        color: var(--fwx-text-color);
        cursor: pointer;
    }

    .footer-navigation ul {
        flex-direction: column;
        align-items: center;
    }

    /* Bloco legado removido para evitar conflito de centralização */
    .fwx-btn-share {
        font-size: 0;
        /* hides text */
        padding: 12px;
        border-radius: 50%;
        width: 44px;
        height: 44px;
    }

    .fwx-btn-share svg {
        margin: 0;
    }

    .fwx-author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* --- Breadcrumbs --- */
.fwx-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.85em;
    color: #555;
    margin-bottom: 20px;
    padding: 10px 0;
}

/* Breadcrumb dentro do article (abaixo da categoria) */
.entry-header .fwx-breadcrumbs {
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 0;
    font-size: 0.8em;
}

/* Breadcrumb centralizado no Layout 2 */
.fwx-single-header-2 .fwx-breadcrumbs {
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 0;
    font-size: 0.8em;
    justify-content: center;
}

.fwx-bc-item {
    color: var(--fwx-link-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.fwx-bc-item:hover {
    color: var(--fwx-secondary);
}

.fwx-bc-current {
    color: #555;
    font-weight: 500;
}

html[data-theme='dark'] .fwx-breadcrumbs,
html[data-theme='dark'] .fwx-bc-current {
    color: rgba(255, 255, 255, 0.7);
}

.fwx-bc-sep {
    color: #ccc;
    font-size: 1.1em;
    line-height: 1;
    user-select: none;
}

/* --- Posts Relacionados --- */
.fwx-related-posts {
    margin: 40px 0;
}

html[data-theme='dark'] .fwx-related-posts {
    border-top: none;
}

.fwx-related-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    margin-top: 0;
}

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

.fwx-related-item {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
    background: var(--fwx-bg-color);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

html[data-theme='dark'] .fwx-related-item {
    border-color: rgba(255, 255, 255, 0.06);
}

.fwx-related-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

/* Proporção 3:2 = crop fwx-home-grid (600x400) */
.fwx-related-thumb img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    height: auto;
}

.fwx-related-post-title {
    font-size: 0.95rem;
    margin: 0;
    padding: 14px;
    line-height: 1.4;
}

.fwx-related-post-title a {
    color: var(--fwx-text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.fwx-related-post-title a:hover {
    color: var(--fwx-secondary);
}

/* --- Posts Relacionados na Sidebar (Horizontal) --- */
.fwx-sidebar-related {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    background: var(--fwx-bg-color);
}

html[data-theme='dark'] .fwx-sidebar-related {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

.fwx-sidebar-related .widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fwx-primary);
}

.fwx-sidebar-rel-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

html[data-theme='dark'] .fwx-sidebar-rel-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.fwx-sidebar-rel-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.fwx-sidebar-rel-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    display: block;
}

.fwx-sidebar-rel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fwx-sidebar-rel-info {
    flex: 1;
    min-width: 0;
}

.fwx-sidebar-rel-title {
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
    font-weight: 600;
}

.fwx-sidebar-rel-title a {
    color: var(--fwx-text-color);
    text-decoration: none;
    font-weight: 600;
}

.fwx-sidebar-rel-title a:hover {
    color: var(--fwx-secondary);
}


@media (max-width: 768px) {
    .site-branding img.custom-logo {
        max-height: 44px !important;
    }

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

@media (max-width: 480px) {
    .fwx-related-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Busca em Tela Cheia --- */
.fwx-fs-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

html[data-theme='dark'] .fwx-fs-search-overlay {
    background: rgba(18, 18, 18, 0.98);
}

.fwx-fs-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.fwx-fs-search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--fwx-text-color);
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.fwx-fs-search-content {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    text-align: center;
}

.fwx-fs-search-form {
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--fwx-text-color);
    margin-bottom: 20px;
}

.fwx-fs-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 20px 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--fwx-text-color);
    outline: none;
}

.fwx-fs-search-input::placeholder {
    color: rgba(0, 0, 0, 0.2);
}

html[data-theme='dark'] .fwx-fs-search-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.fwx-fs-search-submit {
    background: none;
    border: none;
    color: var(--fwx-text-color);
    cursor: pointer;
    padding: 10px;
}

.fwx-fs-search-submit:hover {
    color: var(--fwx-secondary);
}

.fwx-fs-search-help {
    font-size: 1rem;
    color: var(--fwx-text-color);
    opacity: 0.6;
}

@media (max-width: 768px) {
    .fwx-fs-search-input {
        font-size: 1.8rem;
    }
}

/* --- Estilo de Tags do Post --- */
.fwx-post-tags {
    margin-top: 40px;
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* --- Anúncios (Ads Manager) --- */
.fwx-auto-ad-container {
    width: 100%;
    margin: 40px auto;
    display: block;
    clear: both;
    text-align: center;
}

.fwx-top-ad {
    margin-top: 0;
}

.fwx-auto-ad-container>* {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Força Google Adsense e similares a ocuparem 100% se possível */
.fwx-auto-ad-container ins,
.fwx-auto-ad-container iframe,
.fwx-auto-ad-container img {
    display: block !important;
    max-width: 100% !important;
    width: auto;
}

html[data-theme='dark'] .fwx-post-tags {
    border: none;
}

.fwx-post-tags strong {
    margin-right: 5px;
}

.fwx-post-tags a {
    display: inline-block;
    background: var(--fwx-primary);
    color: #fff !important;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background 0.3s ease;
}

.fwx-post-tags a:hover {
    background: var(--fwx-secondary);
}

/* --- Página 404 Personalizada --- */
.fwx-404-wrapper {
    padding: 80px 0;
    text-align: center;
}

.fwx-404-content {
    max-width: 600px;
    margin: 0 auto 80px;
}

.fwx-404-icon {
    color: var(--fwx-primary);
    margin-bottom: 30px;
    opacity: 0.8;
}

.fwx-404-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
}

.fwx-404-text {
    font-size: 1.2rem;
    color: var(--fwx-text-color);
    opacity: 0.8;
    margin-bottom: 40px;
}

.fwx-404-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.fwx-btn-404 {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--fwx-primary);
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--fwx-secondary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--fwx-text-color) !important;
}

html[data-theme='dark'] .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

html[data-theme='dark'] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fwx-404-recent {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 60px;
}

html[data-theme='dark'] .fwx-404-recent {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.fwx-recent-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .fwx-404-wrapper {
        padding: 60px 0;
    }
    
    .fwx-404-title {
        font-size: 2.2rem;
    }
    
    .fwx-btn-404 {
        width: 100%;
        justify-content: center;
    }
}

/* --- Template de Página Larga --- */
.fwx-page-wide-content {
    max-width: 1200px;
    margin: 40px auto;
}

.fwx-page-wide-content .entry-header {
    margin-bottom: 40px;
    text-align: center;
}

.fwx-page-wide-content .entry-title {
    font-size: 3rem;
    font-weight: 900;
}

/* --- Layout Portal (Arquivos & Home) --- */
.fwx-grid-layout-portal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.fwx-portal-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.fwx-portal-compact {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 0 !important;
    padding: 15px 0 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
}

html[data-theme='dark'] .fwx-portal-compact {
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

.fwx-portal-compact:hover {
    transform: none !important;
}

.fwx-portal-compact .entry-title {
    font-size: 1.1rem;
    margin: 0;
}

.fwx-portal-compact .fwx-post-content {
    padding: 0;
}

@media (max-width: 992px) {
    .fwx-portal-featured {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .fwx-grid-layout-portal {
        grid-template-columns: 1fr;
    }
}

/* --- Landing Page System (Home LP) --- */
.fwx-home-lp {
    line-height: 1.6;
}

.fwx-lp-hero {
    padding: 100px 0;
    background: var(--fwx-primary);
    color: #fff;
    overflow: hidden;
}

.fwx-lp-hero-inner {
    display: flex;
    align-items: center;
    gap: 50px;
}

.fwx-lp-hero-content {
    flex: 1;
}

.fwx-lp-hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 25px;
}

.fwx-lp-hero-desc {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
}

.fwx-lp-hero-media {
    flex: 1;
}

.fwx-lp-hero-media img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.fwx-btn-lp {
    display: inline-block;
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 800;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fwx-btn-lp.btn-primary {
    background: #fff;
    color: var(--fwx-primary) !important;
}

.fwx-btn-lp.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Seções Gerais LP */
.fwx-lp-about, .fwx-lp-services, .fwx-lp-blog, .fwx-lp-contact {
    padding: 80px 0;
}

.fwx-lp-section-header {
    text-align: center;
    margin-bottom: 50px;
}

.fwx-lp-section-title {
    font-size: 2.5rem;
    font-weight: 800;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.fwx-lp-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--fwx-primary);
    border-radius: 2px;
}

/* Serviços Grid */
.fwx-lp-services {
    background: rgba(0, 0, 0, 0.02);
}

html[data-theme='dark'] .fwx-lp-services {
    background: rgba(255, 255, 255, 0.02);
}

.fwx-lp-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.fwx-lp-service-item {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

html[data-theme='dark'] .fwx-lp-service-item {
    background: #222;
}

.fwx-lp-service-item:hover {
    transform: translateY(-10px);
}

.fwx-lp-service-icon {
    color: var(--fwx-primary);
    margin-bottom: 20px;
}

/* Contato */
.fwx-lp-contact-box {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

html[data-theme='dark'] .fwx-lp-contact-box {
    background: #1a1a1a;
}

/* Variações de Layout */
.fwx-home-type-autor .fwx-lp-hero {
    background: linear-gradient(135deg, var(--fwx-primary) 0%, var(--fwx-secondary) 100%);
    text-align: center;
}

.fwx-home-type-autor .fwx-lp-hero-inner {
    flex-direction: column;
}

.fwx-home-type-autor .fwx-lp-hero-title {
    font-size: 4rem;
}

.fwx-home-type-editorial .fwx-lp-hero {
    background: transparent;
    color: var(--fwx-text-color);
    padding: 60px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

html[data-theme='dark'] .fwx-home-type-editorial .fwx-lp-hero {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.fwx-home-type-editorial .fwx-btn-lp.btn-primary {
    background: var(--fwx-primary);
    color: #fff !important;
}

@media (max-width: 992px) {
    .fwx-lp-hero-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .fwx-lp-hero-title {
        font-size: 2.5rem;
    }
    
    .fwx-lp-services-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Refinamento de Conteúdo (UX) --- */

/* Blockquotes Premium */
blockquote {
    margin: 40px 0;
    padding: 20px 30px;
    border-left: 5px solid var(--fwx-primary);
    background: rgba(var(--fwx-primary-rgb, 221, 51, 51), 0.05);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--fwx-text-color);
    position: relative;
    border-radius: 0 10px 10px 0;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Tabelas Responsivas & Zebradas */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 0.95rem;
    overflow-x: auto;
    display: block;
}

.entry-content th {
    background: var(--fwx-primary);
    color: #fff;
    text-align: left;
    padding: 15px;
    font-weight: 700;
}

.entry-content td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.entry-content tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

html[data-theme='dark'] .entry-content tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

html[data-theme='dark'] .entry-content td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Legendas (Figcaptions) */
figcaption {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--fwx-text-color);
    opacity: 0.7;
    text-align: center;
    font-style: italic;
}

/* Blocos de Código (Code & Pre) Estilo Terminal */
pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 30px 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

code {
    background: rgba(221, 51, 51, 0.1);
    color: var(--fwx-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9em;
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-family: inherit;
}

/* Botão de Cópia */
.fwx-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    font-weight: 700;
}

.fwx-copy-btn:hover {
    background: var(--fwx-primary);
}

.fwx-copy-btn.copied {
    background: #34a881;
}

/* Botão Voltar ao Topo */
.fwx-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--fwx-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.fwx-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.fwx-back-to-top:hover {
    background: var(--fwx-secondary);
    transform: translateY(-5px);
}

/* Widget Sticky */
@media (min-width: 993px) {
    .fwx-sidebar .widget:last-child {
        position: sticky;
        top: 100px;
        z-index: 10;
    }
}

/* Exit Intent Popup */
.fwx-exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.fwx-exit-popup.active {
    display: flex;
}

.fwx-exit-popup-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.fwx-exit-popup-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 550px;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    z-index: 10001;
    animation: fwxPopupFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme='dark'] .fwx-exit-popup-content {
    background: #1a1a1a;
}
/* --- Layout Notícias (News Style) - Fase D --- */
.fwx-news-hero-section {
    margin-bottom: 40px;
    padding-top: 20px;
}

.fwx-news-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 15px;
}

.fwx-news-hero-grid .fwx-post-item {
    position: relative;
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 8px;
}

/* Hero News Grid (Topo 1-4) */
.fwx-news-hero-main {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
    height: 515px;
}

.fwx-news-hero-medium {
    grid-column: 3 / span 2;
    grid-row: 1;
    height: 250px;
}

.fwx-news-hero-small {
    grid-column: span 1;
    grid-row: 2;
    height: 250px;
}

.fwx-news-hero-main .fwx-post-thumb,
.fwx-news-hero-medium .fwx-post-thumb,
.fwx-news-hero-small .fwx-post-thumb {
    height: 100%;
    margin-bottom: 0;
}

.fwx-news-hero-main img,
.fwx-news-hero-medium img,
.fwx-news-hero-small img {
    height: 100% !important;
    object-fit: cover !important;
    width: 100% !important;
    display: block;
}

.fwx-news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    color: #fff;
    z-index: 2;
}

.fwx-news-overlay .fwx-cat-label {
    background: var(--fwx-primary);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
    display: inline-block;
    text-transform: uppercase;
    font-weight: 700;
}

.fwx-news-overlay .entry-title {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.2;
    font-weight: 800;
}

.fwx-news-hero-main .fwx-news-overlay .entry-title {
    font-size: 1.9rem;
}

.fwx-news-overlay a {
    color: #fff;
}

/* Garante que o container de notícias abaixo do hero não seja grid mas mantenha o nome da classe para consistência */
.fwx-grid-layout-f {
    display: block !important;
}

/* Bloco Misto de Notícias (Posts 5-9) */
.fwx-news-mixed-block {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; /* Proporção mais equilibrada */
    gap: 40px; /* Mais espaço entre as colunas */
    margin-bottom: 60px;
    /* Borda e padding removidos conforme solicitado */
}

.fwx-news-block-main .fwx-post-thumb {
    width: 100%;
    height: 280px; /* Altura fixa para garantir o encaixe */
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 12px;
    line-height: 0;
}

.fwx-news-block-main .fwx-post-thumb a {
    display: block;
    height: 100%;
    width: 100%;
}

.fwx-news-block-main .fwx-post-thumb img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 0;
    display: block;
}

.fwx-news-block-main .entry-title {
    font-size: 1.6rem;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 800;
}

/* Lista Lateral do Bloco Misto (Posts 6-9) - Técnica idêntica ao Layout E */
.fwx-news-block-side-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fwx-news-block-side-item {
    display: flex;
    flex-direction: row;
    align-items: stretch; /* Faz o thumb se esticar junto com o conteúdo */
    background: var(--fwx-bg-color);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    overflow: hidden; /* Segredo do cover: clip na borda do card */
    margin-bottom: 0;
}

html[data-theme='dark'] .fwx-news-block-side-item {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

.fwx-news-block-side-item .fwx-post-thumb {
    width: 38%; /* Proporção fixa - sem height */
    flex-shrink: 0;
    line-height: 0; /* Remove espaço fantasma */
}

.fwx-news-block-side-item .fwx-post-thumb a {
    display: block;
    height: 100%;
    width: 100%;
}

.fwx-news-block-side-item .fwx-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0; /* O card já tem radius */
}

.fwx-news-block-side-item .fwx-post-content {
    padding: 12px 15px; /* Padding só no texto */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fwx-news-block-side-item .entry-title {
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: 600;
    margin: 0;
}

.fwx-news-block-side-item .fwx-cat-label {
    font-size: 10px;
    padding: 2px 6px;
    margin-bottom: 6px;
    display: inline-block;
}


/* News List Items (Post 10+ - Técnica idêntica ao Layout E) */
.fwx-news-list-item {
    display: flex;
    flex-direction: row;
    align-items: stretch; /* Faz o thumb se esticar junto com o conteúdo */
    background: var(--fwx-bg-color);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden; /* Segredo do cover: clip na borda do card */
}

html[data-theme='dark'] .fwx-news-list-item {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

.fwx-news-list-item .fwx-post-thumb {
    width: 35%; /* Proporção fixa - sem height */
    flex-shrink: 0;
    line-height: 0; /* Remove espaço fantasma */
}

.fwx-news-list-item .fwx-post-thumb a {
    display: block;
    height: 100%;
    width: 100%;
}

.fwx-news-list-item .fwx-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0; /* O card já tem radius */
}

.fwx-news-list-item .fwx-post-content {
    padding: 20px 25px; /* Padding só no texto */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fwx-news-list-item .entry-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.25;
}

.fwx-news-list-item .entry-summary {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html[data-theme='dark'] .fwx-news-list-item .entry-summary {
    color: #bbb;
}


@media (max-width: 992px) {
    .fwx-news-hero-section {
        overflow: hidden;
    }
    .fwx-news-hero-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
    }
    .fwx-news-hero-main {
        grid-column: 1 / -1;
        grid-row: auto;
        aspect-ratio: 3/2;
        height: auto;
    }
    .fwx-news-hero-medium {
        grid-column: auto;
        grid-row: auto;
        aspect-ratio: 3/2;
        height: auto;
    }
    .fwx-news-hero-small {
        grid-column: auto;
        grid-row: auto;
        aspect-ratio: 3/2;
        height: auto;
    }
    /* Título do destaque menor em tablet */
    .fwx-news-hero-main .fwx-news-overlay .entry-title {
        font-size: 1.3rem;
    }
    .fwx-news-mixed-block {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    /* Em tablet, list-item vira coluna com imagem no topo */
    .fwx-news-list-item {
        flex-direction: column;
    }
    .fwx-news-list-item .fwx-post-thumb {
        width: 100%;
        height: 220px;
    }
}

@media (max-width: 600px) {
    /* Hero colapsa para 1 coluna totalmente empilhado */
    .fwx-news-hero-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    /* Reseta TODOS os posicionamentos explícitos do desktop */
    .fwx-news-hero-main,
    .fwx-news-hero-medium,
    .fwx-news-hero-small {
        grid-column: 1 / -1; /* força largura total */
        grid-row: auto; /* empilha naturalmente */
    }
    .fwx-news-hero-main {
        aspect-ratio: 3/2;
        height: auto;
    }
    .fwx-news-hero-medium,
    .fwx-news-hero-small {
        aspect-ratio: 3/2;
        height: auto;
    }
    /* Título do post 1 igual aos outros em mobile */
    .fwx-news-hero-main .fwx-news-overlay .entry-title {
        font-size: 1.2rem;
    }
    /* Posts 6-9: mantém a tecnica de width% do Layout E */
    .fwx-news-block-side-item .fwx-post-thumb {
        width: 35%;
    }
    /* List items continuam em coluna */
    .fwx-news-list-item {
        flex-direction: column;
    }
    .fwx-news-list-item .fwx-post-thumb {
        width: 100%;
        height: 180px;
    }
}






@keyframes fwxPopupFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.fwx-exit-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: var(--fwx-text-color);
    opacity: 0.5;
}

.fwx-exit-popup-close:hover {
    opacity: 1;
}

.fwx-exit-popup-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--fwx-primary);
}

.fwx-exit-popup-desc {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.8;
}