/* =========================
   GRID
========================= */
.materiais-lista {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* RESPONSIVO */
@media (max-width: 1024px) {
    .materiais-lista {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .materiais-lista {
        grid-template-columns: 1fr;
    }
}

/* =========================
   CARD
========================= */
.material-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.material-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

/* =========================
   IMAGEM
========================= */
.material-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* =========================
   CONTEÚDO
========================= */
.material-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* =========================
   CATEGORIA (badge)
========================= */
.material-categoria {
    display: inline-block;
    color: #5f7d95;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    width: fit-content;
}

/* =========================
   TÍTULO
========================= */
.material-content h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #2F3F52;
    font-family: "Flama-Regular", "Roboto Condensed", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* =========================
   DATA
========================= */
.material-data {
    font-size: 13px;
    color: #888;
}

/* =========================
   IDIOMA (com barrinha)
========================= */
.material-idioma {
    position: relative;
    padding-left: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 20px;
}

.material-idioma::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #7199bc;
    border-radius: 2px;
}

/* =========================
   BOTÃO
========================= */
.btn-download {
    margin-top: auto;
    max-width: 190px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #1f2d3d;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-download:hover {
    background: #2f3f52;
    color: #fff !important;
    transform: translateY(-3px) scale(1.03);
}

/* ÍCONE */
.btn-download svg {
    width: 16px;
    height: 16px;
}

/* =========================
   PAGINAÇÃO
========================= */
.paginacao {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.paginacao a,
.paginacao span {
    padding: 8px 14px;
    border-radius: 8px;
    background: #f1f3f5;
    height: 40px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;   /* centraliza vertical */
    justify-content: center; /* centraliza horizontal (se precisar) */
    gap: 6px;
    transition: all 0.2s ease;
}

/* HOVER */
.paginacao a:hover {
    background: #1f2d3d;
    color: #fff;
}

.paginacao svg {
    width: 18px;
    height: 18px;
    display: block; /* 👈 importante */
}

/* ATIVO */
.paginacao .current {
    background: #1f2d3d;
    color: #fff;
}

/* =========================
   ANIMAÇÃO AO TROCAR (AJAX)
========================= */
#materiais-container {
    transition: opacity 0.3s ease;
}

#materiais-container.loading {
    opacity: 0.4;
}