/*
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.6.6
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;
}

.fwx-single-header-2 .entry-excerpt {
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 25px;
}

.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 --- */
.fwx-blank-template .fwx-blank-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

/* --- 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(4, 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 {
    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);
}