/*Archive Template CSS*/

.archive-body {
    background-color: rgb(204 191 174 / 30%);
    --pc-accent: var(--primary-color, #632921);
}

/* Estilos para o Archive */
.archive-page-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 30px;
}

.archive-header {
    text-align: center;
    position: relative;
    min-height: 400px;
    margin: 0;
    overflow: hidden;
}

.header-background {
    height: 100%;
    display: flex;
    align-items: center;
    color: white;
    padding: 2rem;
    background: var(--primary-color);
    min-height: 400px;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 15px;
}

.archive-title {
    font-size: 3.25rem;
    font-weight: 400 !important;
    text-transform: uppercase;
    color: #fff !important;
    margin-bottom: 1rem;
    text-align: start;
    padding-top: 60px;
}

/* ========================================
   GRID
   ======================================== */
.archive-content .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin: 0 0 50px;
    padding: 0;
    list-style: none;
}

.posts-grid__item {
    margin: 0;
    padding: 0;
    min-width: 0;
}

/* ========================================
   CARD (layout magazine)
   ======================================== */
.post-card {
    position: relative; /* âncora do link esticado */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 5 / 4;
    background: var(--pc-accent);
}

.post-card .post-card__img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}

.post-card:hover .post-card__img {
    transform: scale(1.04);
}

/* Placeholder (post sem imagem destacada) */
.post-card__placeholder {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, .14), transparent 55%),
        var(--pc-accent);
}

.post-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding-top: 16px;
}

/* Categoria */
.post-card .post-card__cat {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 .65rem;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .16em;
    line-height: 1.2;
    text-transform: uppercase;
    color: #6b6b6b;
}

.post-card__cat-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--pc-accent);
}

/* Título (link esticado: o card inteiro é clicável) */
.post-card .post-card__title {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
    text-transform: none;
    color: #1b120d;
    transition: color .3s ease;
}

.post-card .post-card__title a {
    color: inherit;
    text-decoration: none;
}

.post-card .post-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.post-card:hover .post-card__title,
.post-card:focus-within .post-card__title {
    color: var(--pc-accent);
}

.post-card .post-card__title a:focus-visible::after {
    outline: 2px solid var(--pc-accent);
    outline-offset: 4px;
}

/* Meta: autor • data → */
.post-card .post-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem .6rem;
    margin-top: auto;
    font-size: .78rem;
    line-height: 1.2;
    color: #6b6b6b;
}

.post-card__dot {
    flex-shrink: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--pc-accent);
}

.post-card__arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--pc-accent);
    transition: transform .3s ease;
}

.post-card:hover .post-card__arrow,
.post-card:focus-within .post-card__arrow {
    transform: translateX(5px);
}

/* ========================================
   SIDEBAR
   ======================================== */
.archive-sidebar {
    padding: 30px 0;
    align-self: start;
}

.widget-title {
    font-size: 1.4rem;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #2d2d2d;
}

.categories-list {
    display: flex;
    flex-direction: row;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 12px;
    font-weight: 300;
}

.category-link {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #6d6d6d;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #E84C23;
}

.post-count {
    background: #f0f0f0;
    padding: 2px 8px;
    font-size: 0.8rem;
}

/* Pagination */
.archive-pagination {
    text-align: center;
    margin-top: 40px;
}

/* ========================================
   RESPONSIVO
   ======================================== */
@media (max-width: 992px) {
    .archive-page-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .archive-sidebar {
        position: static;
    }

    .archive-title {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .archive-title {
        font-size: 2rem;
    }

    .archive-content .posts-grid {
        grid-template-columns: 1fr;
    }

    .archive-header,
    .header-background {
        min-height: 300px;
    }

    .post-card .post-card__title {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .post-card .post-card__img,
    .post-card__arrow,
    .post-card .post-card__title {
        transition: none;
    }

    .post-card:hover .post-card__img,
    .post-card:hover .post-card__arrow {
        transform: none;
    }
}