/* ==========================================================================
     PÁGINA DEDICADA DE EDITORIAL / COLUNA (CSS)
     Identidade visual refinada, coesa com o portal, mobile-first e alta performance
     ========================================================================== */

.editorial-archive-page {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

/* Header do Editorial / Colunista */
.editorial-header-card {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #eaeaea);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.editorial-author-meta {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.editorial-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary, #0d6efd);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.editorial-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.editorial-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--primary, #0d6efd);
    background: rgba(13, 110, 253, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    width: fit-content;
}

.editorial-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-heading, #111111);
    line-height: 1.2;
    margin: 0;
}

.editorial-bio {
    font-size: 0.95rem;
    color: var(--text-muted, #555555);
    line-height: 1.5;
    margin-top: 0.25rem;
}

.editorial-stats-bar {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #eaeaea);
    font-size: 0.875rem;
    color: var(--text-muted, #666666);
}

.editorial-stats-bar strong {
    color: var(--text-heading, #111111);
}

/* Barra de Filtro e Busca */
.editorial-filter-section {
    background: var(--bg-card, #fcfcfc);
    border: 1px solid var(--border-color, #eaeaea);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #888888);
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.65rem 0.75rem 0.65rem 2.5rem;
    border: 1px solid var(--border-color, #ced4da);
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    color: var(--text-main, #212529);
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.select-sort-wrapper select {
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-color, #ced4da);
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    color: var(--text-main, #212529);
    cursor: pointer;
    transition: border-color 0.2s;
}

.select-sort-wrapper select:focus {
    outline: none;
    border-color: var(--primary, #0d6efd);
}

.btn-filter-submit {
    background: var(--primary, #0d6efd);
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-filter-submit:hover {
    background: var(--primary-hover, #0b5ed7);
}

.btn-clear-filters {
    font-size: 0.875rem;
    color: var(--text-muted, #666666);
    text-decoration: underline;
    padding: 0.25rem;
}

.btn-clear-filters:hover {
    color: var(--text-heading, #111111);
}

/* Paginação */
.pagination-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.35rem;
    align-items: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-main, #212529);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--bg-hover, #f8f9fa);
    border-color: var(--border-hover, #adb5bd);
}

.page-link.active {
    background: var(--primary, #0d6efd);
    border-color: var(--primary, #0d6efd);
    color: #ffffff;
}

/* Estado Vazio */
.empty-state-card {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--bg-card, #ffffff);
    border: 1px dashed var(--border-color, #cccccc);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state-card i {
    font-size: 3rem;
    color: var(--text-muted, #adb5bd);
}

.empty-state-card h1,
.empty-state-card h2,
.empty-state-card h3 {
    font-size: 1.25rem;
    color: var(--text-heading, #333333);
    margin: 0;
}

.empty-state-card p {
    color: var(--text-muted, #666666);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0;
}

.btn-primary-custom {
    margin-top: 0.5rem;
    background: var(--primary, #0d6efd);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Utilitário Acessibilidade */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .editorial-author-meta {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .editorial-info {
        align-items: center;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input-wrapper,
    .select-sort-wrapper,
    .select-sort-wrapper select,
    .btn-filter-submit {
        width: 100%;
    }

    .search-input-wrapper {
        min-width: 0;
    }

    /* evita zoom automático do iOS ao focar campos com fonte < 16px */
    .search-input-wrapper input,
    .select-sort-wrapper select {
        font-size: 16px;
        min-height: 44px;
    }

    .btn-filter-submit {
        min-height: 44px;
    }

    .editorial-header-card {
        padding: 1.5rem 1.25rem;
    }

    .editorial-title {
        font-size: 1.6rem;
    }

    /* Paginação: antes estourava a tela cortando "Anterior" e "Próxima" */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }

    .page-link {
        min-width: 40px;
        min-height: 40px;
        padding: 0.4rem 0.6rem;
    }

    .pagination .page-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .pagination .disabled .page-link {
        opacity: 0.45;
    }
}

.ads-carousel-section,
.ads-grid-section {
    text-align: center !important;
    margin: 2rem 0 !important;
}

.ads-carousel-section img,
.ads-grid-section img {
    margin: 0 auto !important;
    display: block !important;
    border-radius: var(--radius) !important;
}
