/**
 * Pages CSS
 * Extracted inline styles from PHP templates
 */

/* ==========================================================================
   archive.php - Archive page styles
   ========================================================================== */

/* Archive header — editorial hero title, sem caixa */
.archive-header {
    text-align: left;
    margin-bottom: clamp(2rem, 4vw, 3rem);
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.archive-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--foreground, #18181b);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Divider fino apos o titulo */
.archive-header::after {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: var(--evte-primary, #0056b3);
    margin-top: 1rem;
}

.archive-description {
    font-size: 15px;
    color: var(--muted-foreground, #71717a);
    max-width: 600px;
    margin: 0;
    line-height: 1.6;
}

/* Category intro — limpo, sem caixa cinza */
.category-intro {
    max-width: 600px;
    margin: 0.75rem 0 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.category-intro .archive-description {
    margin: 0 0 4px;
}

.category-post-count {
    font-size: 13px;
    color: var(--muted-foreground, #a1a1aa);
    margin: 0;
}

/* ==========================================================================
   404.php - Error page styles
   ========================================================================== */

.error-404 {
    background: var(--card, #fff);
    border-radius: 8px;
    padding: 60px 40px;
    margin-bottom: 40px;
}

.error-404-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.error-404-title {
    font-size: 120px;
    font-weight: 900;
    /* Cor controlada via CSS dinâmico */
    line-height: 1;
    margin-bottom: 20px;
}

.error-404-subtitle {
    font-size: 32px;
    font-weight: 700;
    color: var(--foreground, #18181b);
    margin-bottom: 20px;
}

.error-404-text {
    font-size: 16px;
    color: var(--muted-foreground, #666);
    line-height: 1.6;
    margin-bottom: 40px;
}

.error-404-search form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.error-404-search input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border, #e4e4e7);
    border-radius: var(--radius, 5px);
    font-size: 16px;
}

.error-404-search button {
    padding: 15px 30px;
    background: var(--evte-primary, #0056b3);
    color: #fff;
    border: none;
    border-radius: var(--radius, 5px);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.error-404-search button:hover {
    background: color-mix(in srgb, var(--evte-primary, #0056b3) 80%, #000);
}

.btn-home {
    display: inline-block;
    padding: 15px 40px;
    background: var(--foreground, #18181b);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-home:hover {
    background: var(--zinc-800, #27272a);
    color: #fff;
}

.error-404-recent-posts h3 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .error-404 {
        padding: 40px 20px;
    }

    .error-404-title {
        font-size: 80px;
    }

    .error-404-subtitle {
        font-size: 24px;
    }

    .error-404-recent-posts .posts-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   search.php - Search page styles
   ========================================================================== */

.search-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--card, #fff);
    border-radius: 8px;
}

.search-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--foreground, #18181b);
    margin-bottom: 10px;
}

.search-title span {
    /* Cor controlada via CSS dinâmico */
}

.no-results {
    text-align: center;
    padding: 60px 30px;
    background: var(--card, #fff);
    border-radius: 8px;
}

.no-results h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.no-results p {
    font-size: 16px;
    color: var(--muted-foreground, #666);
    margin-bottom: 30px;
}

.search-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.search-form-wrapper form {
    display: flex;
    gap: 10px;
}

.search-form-wrapper input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border, #e4e4e7);
    border-radius: var(--radius, 5px);
    font-size: 16px;
}

.search-form-wrapper button {
    padding: 15px 30px;
    background: var(--evte-primary, #0056b3);
    color: #fff;
    border: none;
    border-radius: var(--radius, 5px);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form-wrapper button:hover {
    background: color-mix(in srgb, var(--evte-primary, #0056b3) 80%, #000);
}

/* ==========================================================================
   single.php - Full-width layout override
   ========================================================================== */

/* ====================================================
   SINGLE POST SEM SIDEBAR — Layout estilo Medium/Substack
   Container externo: 1000px (imagens, author box, related)
   Texto + titulo: 768px (leitura confortavel)
   ==================================================== */
.content-area.single-full-width {
    grid-template-columns: 1fr !important;
    max-width: min(1000px, 100% - var(--site-padding, 1rem) * 2);
    margin-inline: auto;
}

/* Texto centralizado para leitura (768px = ~70 chars/linha) */
.content-area.single-full-width .entry-content,
.content-area.single-full-width .entry-header,
.content-area.single-full-width .evte-breadcrumbs {
    max-width: 768px;
    margin-inline: auto;
}

/* Imagens full-width do container (1000px) — efeito "wide" */
.content-area.single-full-width .entry-featured-image {
    max-width: 100%;
}

/* Imagens dentro do texto tambem podem expandir alem dos 768px */
.content-area.single-full-width .entry-content img,
.content-area.single-full-width .entry-content figure,
.content-area.single-full-width .entry-content .wp-block-image {
    max-width: min(100%, 900px);
    margin-inline: auto;
}

/* Elementos full-width do container */
.content-area.single-full-width .author-box,
.content-area.single-full-width .expert-reviewer-box,
.content-area.single-full-width .related-posts {
    max-width: 100%;
}

/* ==========================================================================
   page.php - Full-width layout override
   ========================================================================== */

.content-area.page-full-width {
    grid-template-columns: 1fr !important;
    max-width: min(1000px, 100% - var(--site-padding, 1rem) * 2);
    margin-inline: auto;
}

.content-area.page-full-width .entry-content {
    max-width: 768px;
    margin-inline: auto;
}

/* ==========================================================================
   header-centered.php - Centered header layout
   ========================================================================== */

/* Header Centered - Modern Editorial */
.header-centered {
    background: var(--card, #fff);
}

.header-centered .header-top {
    display: none; /* Clean modern look — no date bar */
}

.header-centered .header-main {
    padding: var(--space-8, 32px) 0 var(--space-6, 24px);
}

.header-centered .header-centered-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: min(var(--site-max-width, 1280px), 100% - var(--site-padding, 1rem) * 2);
    margin-inline: auto;
}

.header-centered .site-logo {
    margin-bottom: 0;
    text-align: center;
}

.header-centered .site-logo-h1,
.header-centered .site-title {
    margin: 0;
    line-height: 1;
    text-align: center;
}

.header-centered .site-title a,
.header-centered .site-title-link {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    text-decoration: none;
    color: var(--foreground, #18181b);
    display: block;
    text-align: center;
    letter-spacing: -0.03em;
    transition: color 0.2s ease;
}

.header-centered .site-title a:hover,
.header-centered .site-title-link:hover {
    color: var(--evte-primary, #0056b3);
}

.header-centered .site-logo img {
    max-height: 60px;
    width: auto;
    margin: 0 auto;
}

/* Navigation Centered — clean, no bg, thin border */
.header-centered .site-navigation {
    background: transparent;
    border-top: 1px solid var(--border, #e4e4e7);
    padding: 0;
}

.header-centered .site-navigation .container {
    display: flex;
    justify-content: center;
}

.header-centered .main-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

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

/* Underline animation */
.header-centered .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: center;
    transition: transform 0.25s ease;
}

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

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

.header-centered .mobile-menu-toggle {
    display: none;
}

/* Header Centered - Mobile */
@media (max-width: 768px) {
    .header-centered .header-main {
        padding: 15px 0;
    }

    .header-centered .header-centered-container {
        flex-direction: row;
        justify-content: center;
        position: relative;
        padding: 0 var(--site-padding, 24px);
    }

    .header-centered .site-logo {
        margin-bottom: 0;
    }

    .header-centered .site-title a,
    .header-centered .site-title-link {
        font-size: 1.5rem;
    }

    .header-centered .site-logo img {
        max-height: 40px;
    }

    .header-centered .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 100;
    }

    .header-centered .site-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card, #fff);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 999;
        border: none;
    }

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

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

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

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

    .header-centered .main-menu > li > a {
        display: block;
        padding: 15px 20px;
        text-align: left;
    }
}

/* [3.3.4] Related Posts Grid (removido inline style) */
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Article Type Labels + Sponsored + Expert Reviewer
   ============================================================ */
.article-type-label {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius, 8px);
    background: var(--evte-primary-tint-8, #eaf1f8);
    color: var(--evte-primary, #0056b3);
    margin-bottom: 12px;
}
.sponsored-label {
    background: var(--destructive-bg, #fef2f2);
    color: var(--destructive, #dc2626);
    border: 1px solid var(--destructive-border, #fecaca);
}

.expert-reviewer-box {
    padding: 12px 16px;
    background: var(--evte-primary-tint-2, #f8fafc);
    border-left: 3px solid var(--evte-primary, #0056b3);
    border-radius: var(--radius, 8px);
    font-size: 14px;
    margin: 24px 0;
}
.reviewer-label {
    color: var(--muted-foreground, #666);
}
.reviewer-credentials {
    color: var(--muted-foreground, #666);
    font-size: 13px;
}
