/**
 * archive-formacao.css
 * Coloca em: themes/gti/css/archive-formacao.css
 * Enqueue via functions.php em is_post_type_archive('formacao')
 */

/* ── Reset / base ─────────────────────────────────────────── */
.fc-arquivo *,
.fc-arquivo *::before,
.fc-arquivo *::after { box-sizing: border-box; }

/* ── Layout raiz ──────────────────────────────────────────── */
.fc-arquivo {
    padding: 2rem 1rem 4rem;
}

.fc-arquivo__inner {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2.5rem;
    max-width: 1440px;
    margin: 0 auto;
    align-items: start;
}

/* ══ SIDEBAR ══════════════════════════════════════════════════ */
.fc-sidebar__sticky {
    position: sticky;
    top: 1.5rem;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fc-sidebar__heading {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    padding-bottom: .75rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Grupo de filtro */
.fc-filter-group__label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #888;
    margin-bottom: .6rem;
}

.fc-filter-group__options {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.fc-filter-group__options::-webkit-scrollbar { width: 4px; }
.fc-filter-group__options::-webkit-scrollbar-track { background: #f5f5f5; border-radius: 99px; }
.fc-filter-group__options::-webkit-scrollbar-thumb { background: #ddd; border-radius: 99px; }

/* Campo de pesquisa */
.fc-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.fc-search-wrap svg {
    position: absolute;
    left: .75rem;
    color: #aaa;
    pointer-events: none;
    flex-shrink: 0;
}

.fc-search {
    width: 100%;
    padding: .55rem .75rem .55rem 2.25rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: .9rem;
    color: #333;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    -webkit-appearance: none;
}

.fc-search:focus {
    border-color: #e87722;   /* laranja GTI */
    box-shadow: 0 0 0 3px rgba(232,119,34,.12);
    background: #fff;
}

/* Checkbox personalizada */
.fc-checkbox {
    display: flex;
    align-items: center;
    gap: .55rem;
    cursor: pointer;
    user-select: none;
}

.fc-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fc-checkbox__box {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
}

.fc-checkbox__box::after {
    content: '';
    display: block;
    width: 9px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(0px, -1px);
    opacity: 0;
    transition: opacity .1s;
}

.fc-checkbox input:checked ~ .fc-checkbox__box {
    background: #e87722;
    border-color: #e87722;
}

.fc-checkbox input:checked ~ .fc-checkbox__box::after {
    opacity: 1;
}

.fc-checkbox__label {
    font-size: .88rem;
    color: #444;
    line-height: 1.3;
}

/* Filtro desativado (sem resultados para aquela cat/prog) */
.fc-checkbox.is-disabled {
    opacity: .35;
    pointer-events: none;
}

.fc-btn-apply {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
        background: #faa635;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(250, 166, 53, 0.3);
}

/* Botão limpar */
.fc-btn-clear {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: none;
    background: none;
    color: #e87722;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: opacity .15s;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fc-btn-clear:hover { opacity: .7; }

/* ══ CONTEÚDO ════════════════════════════════════════════════ */
.fc-content {
    min-width: 0;
}

/* Contador */
.fc-results-count {
    font-size: .82rem;
    color: #999;
    margin: 0 0 1.5rem;
    min-height: 1.2em;
}

/* Sem resultados */
.fc-no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #aaa;
}

.fc-no-results svg {
    margin-bottom: 1rem;
    opacity: .4;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.fc-no-results p {
    font-size: 1rem;
    margin: 0 0 1rem;
}

/* ── Grupo de categoria ───────────────────────────────────── */
.fc-cat-group {
    margin-bottom: 2.5rem;
}

.fc-cat-group__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
    width: 100%;
}

.fc-cat-group__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: #e87722;
    border-radius: 99px;
}

/* ── Grid de cards ────────────────────────────────────────── */
.fc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

/* ── Card ─────────────────────────────────────────────────── */
.fc-card {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}

.fc-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.1);
    transform: translateY(-3px);
}

.fc-card__link {
    display: block;
    text-decoration: none;
}

.fc-card__thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f0f0f0;
}

.fc-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.fc-card:hover .fc-card__thumb img {
    transform: scale(1.05);
}

.fc-card__no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    color: #bbb;
}

.fc-card__body {
    display: flex;
    flex-direction: row;
}

.fc-card__body_wrapper {
    padding: .85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.fc-card__body_price {
    padding: .85rem 1rem 1rem;
    font-size: 20px;
}

.fc-card__title {
font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

.fc-card__preco {
 	font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary); 
}

.fc-card__title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color .15s;
}

.fc-card__title a:hover { color: #e87722; }

/* Badges de programa */
.fc-card__programas {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: auto;
}

.fc-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 99px;
    background: #fff3e8;
    color: #c45e00;
    border: 1px solid #ffd4a8;
    line-height: 1.3;
    white-space: nowrap;
}

/* Card oculto pelo filtro jQuery */
.fc-card.is-hidden {
    display: none;
}

/* Categoria oculta (todos os cards ocultos dentro dela) */
.fc-cat-group.is-hidden {
    display: none;
}

/* ══ RESPONSIVE ══════════════════════════════════════════════ */
@media (max-width: 900px) {
    .fc-arquivo__inner {
        grid-template-columns: 1fr;
    }

    .fc-sidebar__sticky {
        position: static;
    }

    /* Em mobile a sidebar colapsa como um painel */
    .fc-sidebar {
        order: -1;
    }

    .fc-filter-group__options {
        max-height: 180px;
    }
}

@media (max-width: 480px) {
    .fc-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

input#fc-date-inicio, input#fc-date-fim {
    width: 100%;
    padding: .55rem .75rem .55rem .75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: .9rem;
    color: #333;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    -webkit-appearance: none;
}