/* ==========================================================================
   1. ESTRUTURA DO CONTAINER DE RESULTADOS
   ========================================================================== */
.results-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr; /* Padrão mobile: uma coluna */
    gap: 1.5rem;
}

/* ==========================================================================
    FORMS
   ========================================================================== */
.form-search{
    border: #929ca9 solid 1px;
    border-radius: 5px;
    padding: 10px;
    width: 95%;
    margin: 5px;
    display: inline-block;
}

.form-search input {
   padding: 10px;
   display: flex;
   margin: 10px;
}

.form-search div {
    display: flex;
    margin: 10px;
}

.form-search select, button{
    display: inline-block;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 10px;
}

.form-search button{
    margin-left: 5px;
    padding: 5px;
}

/* Anúncio misturado no meio da lista de vagas */

/* Ativa o layout de duas colunas apenas em telas grandes (Desktop) */
@media (min-width: 992px) {
    .results-container {
        grid-template-columns: 450px 1fr; /* Esquerda: Lista | Direita: Detalhes */
        height: calc(100vh - 180px); /* Fixa a altura para criar scroll interno */
    }
}

/* ==========================================================================
   2. COLUNA DA ESQUERDA: LISTA DE VAGAS (COM SCROLL INDEPENDENTE)
   ========================================================================== */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 992px) {
    .results-list {
        overflow-y: auto; /* Scroll apenas na lista de vagas */
        padding-right: 0.5rem;
    }
}

/* Card de vaga compacto para a lista */
.result-card {
    background-color: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.result-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

/* Identifica qual vaga está selecionada/aberta no momento */
.result-card.active {
    border-left: 4px solid var(--primary-color);
    background-color: #f8fafc;
}

.result-card .job-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.result-card .job-title-sm {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

/* ==========================================================================
   3. COLUNA DA DIREITA: VISUALIZAÇÃO COMPLETA DA VAGA (DESKTOP)
   ========================================================================== */
.job-detail-panel {
    background-color: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 2rem;
    display: none; /* Escondido no mobile por padrão */
}

@media (min-width: 992px) {
    .job-detail-panel {
        display: flex;
        flex-direction: column;
        overflow-y: auto; /* Scroll interno para a descrição longa */
        position: sticky;
        top: 90px;
    }
}

.detail-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-body {
    flex-grow: 1;
    font-size: 1rem;
    color: var(--text-color);
}

/* ==========================================================================
   4. MONETIZAÇÃO INTELIGENTE (GOOGLE ADS NOS RESULTADOS)
   ========================================================================== */
/* Anúncio misturado no meio da lista de vagas */
.ad-list-item {
    background-color: #fdfdfd;
    border: 1px dashed #cbd5e1;
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.ad-list-item::before {
    content: "SPONSORED";
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 0.6rem;
    font-weight: bold;
    color: #94a3b8;
}

/* Anúncio fixo no final do painel de detalhes da vaga */
.ad-detail-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    justify-content: center;
}
