@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

.arq-listing {
    font-family: 'Roboto', sans-serif;
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 0px;
    color: #21272A;
    box-sizing: border-box;
}

.arq-listing *,
.arq-listing *::before,
.arq-listing *::after {
    box-sizing: border-box;
}

/* ── CABEÇALHO ── */
.arq-listing__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.arq-listing__title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 8px;
    color: #21272A;
}

.arq-listing__count {
    font-size: 14px;
    color: #697077;
    margin: 0;
}

/* ── BUSCA ── */
.arq-search {
    position: relative;
    flex: 0 0 320px;
    max-width: 100%;
}

.arq-search__input {
    width: 100%;
    height: 44px;
    /* !important para vencer o padding de input do tema/Elementor
       (senão a lupa fica sobre o texto). */
    padding: 0 38px 0 40px !important;
    font-family: inherit;
    font-size: 14px;
    line-height: 44px;
    color: #21272A;
    background: #f2f4f8;
    border: 1px solid #dde1e6;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s, background .15s;
}

.arq-search__input::placeholder {
    color: #697077;
}

.arq-search__input:focus {
    background: #fff;
    border-color: #697077;
}

.arq-search__icon,
.arq-search__chevron {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #697077;
    display: flex;
    pointer-events: none;
}

.arq-search__icon { left: 14px; }
.arq-search__chevron { right: 12px; }

/* dropdown de resultados */
.arq-search__results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    background: #fff;
    border: 1px solid #dde1e6;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
    max-height: 380px;
    overflow-y: auto;
    padding: 4px;
}

.arq-search__results[hidden] { display: none; }

.arq-search__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: #21272A;
}

.arq-search__item:hover,
.arq-search__item.is-active {
    background: #f2f4f8;
}

.arq-search__thumb {
    flex: 0 0 40px;
    width: 40px;
    height: 44px;
    object-fit: cover;
    background: #e3e6eb;
    border-radius: 2px;
}

.arq-search__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    letter-spacing: .5px;
    color: #a2a9b0;
}

.arq-search__text { min-width: 0; }

.arq-search__name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arq-search__meta {
    font-size: 12px;
    color: #697077;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arq-search__empty {
    padding: 14px 12px;
    font-size: 13px;
    color: #697077;
}

/* ── GRADE ── */
/* Colunas travadas em 308px (nunca esticam além do tamanho da imagem),
   distribuídas ao longo da largura máxima de 1440px. */
.arq-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 308px));
    justify-content: space-between;
    gap: 32px 24px;
}

/* ── CARD ── */
.arq-card {
    display: flex;
    flex-direction: column;
}

.arq-card__media {
    position: relative;
    display: block;
    width: 100%;
    max-width: 308px;
    margin: 0 auto;
    aspect-ratio: 308 / 343;
    overflow: hidden;
    background: #e3e6eb;
}

/* posição absoluta + inset:0 força a imagem a preencher os 308x343,
   vencendo o "img { height:auto }" do tema/Elementor. */
.arq-card__img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    display: block;
}

.arq-card__img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    letter-spacing: 1px;
    color: #a2a9b0;
}

.arq-card__name {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
    color: #21272A;
    text-align: center;
    margin: 16px 0 6px;
}

.arq-card__name a {
    color: inherit;
    text-decoration: none;
}

.arq-card__name a:hover { text-decoration: underline; }

.arq-card__meta {
    font-size: 14px;
    color: #697077;
    line-height: 1.4;
    text-align: center;
    margin: 0 0 16px;
}

.arq-card__btn {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 24px;
    margin-top: auto;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 400;
    color: #21272A;
    text-decoration: none;
    background: #fff;
    border: 1px solid #c1c7cd;
    border-radius: 2px;
    transition: border-color .15s, background .15s;
}

.arq-card__btn:hover {
    border-color: #21272A;
    background: #f2f4f8;
}

.arq-card__btn-arrow { font-size: 16px; line-height: 1; }

/* ── CARREGAR MAIS ── */
.arq-listing__more {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.arq-loadmore {
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #21272A;
    background: #fff;
    border: 1px solid #21272A;
    border-radius: 2px;
    padding: 12px 32px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.arq-loadmore:hover { background: #21272A; color: #fff; }
.arq-loadmore[hidden] { display: none; }
.arq-loadmore.is-loading { opacity: .6; pointer-events: none; }

/* ── RESPONSIVO ── */
/* Abaixo do desktop voltamos a ter padding lateral (o 40px 0 só faz
   sentido no container de 1440px) e as colunas passam a preencher a
   largura (1fr). A imagem continua limitada a 308px e centralizada. */
@media (max-width: 1024px) {
    .arq-listing { padding: 40px 24px; }
    .arq-grid { grid-template-columns: repeat(3, 1fr); gap: 32px 20px; }
}

@media (max-width: 768px) {
    .arq-listing { padding: 32px 20px; }
    .arq-listing__head { margin-bottom: 28px; gap: 16px; }
    .arq-listing__title { font-size: 28px; }
    /* flex: 1 1 100% (em vez de só trocar o basis) para a busca encolher
       e não estourar a largura no celular. */
    .arq-search { flex: 1 1 100%; width: 100%; max-width: 100%; }
    .arq-search__input { min-width: 0; }
    .arq-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
}

@media (max-width: 480px) {
    .arq-listing { padding: 24px 16px; }
    .arq-grid { grid-template-columns: 1fr; gap: 28px; }
}
