/**
 * Fluix Article Archive — article-archive.css
 * Struttura e layout puri. Tutti i colori vengono iniettati
 * come <style> inline dal PHP (stesso approccio del modulo News List).
 * NON aggiungere colori hardcodati qui.
 *
 * @package    FluixLabSuite
 * @subpackage ArticleArchive
 * @version    1.0.0
 */

/* ============================================================
   Wrapper principale
   ============================================================ */
.fluix-aa-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* ============================================================
   Chip filtro categorie
   ============================================================ */
.fluix-aa-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    align-items: center;
}

.fluix-aa-chip {
    display: inline-block;
    padding: 8px 20px;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
    white-space: nowrap;
    font-family: inherit;
    /* I colori vengono dallo stile inline */
}

.fluix-aa-chip:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ============================================================
   Griglia card
   ============================================================ */
.fluix-aa-grid {
    display: grid;
    /* grid-template-columns e gap vengono dallo stile inline */
    width: 100%;
}

/* Stato di caricamento AJAX */
.fluix-aa-grid--loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Messaggio nessun risultato */
.fluix-aa-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    font-size: 1.4rem;
}

/* ============================================================
   Card
   ============================================================ */
.fluix-aa-card {
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    /* background, border-color, border-radius dallo stile inline */
}

.fluix-aa-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

/* Thumbnail */
.fluix-aa-card__thumb {
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f0f0f0;
    flex-shrink: 0;
}

.fluix-aa-card__thumb--placeholder {
    /* Segnaposto se non c'è immagine */
    background: #e8e8e8;
}

.fluix-aa-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

/* Body */
.fluix-aa-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    gap: 8px;
}

/* Categoria */
.fluix-aa-card__cat {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    /* color dallo stile inline */
}

.fluix-aa-card__cat:hover {
    text-decoration: underline;
}

/* Titolo */
.fluix-aa-card__title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.35;
}

.fluix-aa-card__title a {
    text-decoration: none;
    transition: color 0.15s ease;
    /* color e color:hover dallo stile inline */
}

/* Data */
.fluix-aa-card__date {
    display: block;
    font-size: 1.2rem;
    /* color dallo stile inline */
}

/* Excerpt */
.fluix-aa-card__excerpt {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.6;
    flex: 1;
    /* color dallo stile inline */
}

/* Bottone "Leggi tutto" */
.fluix-aa-card__btn {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 22px;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
    align-self: flex-start;
    /* color, background, border-color, border-radius dallo stile inline */
}

/* ============================================================
   Paginazione
   ============================================================ */
.fluix-aa-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 36px;
}

.fluix-aa-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    font-size: 1.3rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #333;
    background: #fff;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.fluix-aa-page-btn--arrow {
    font-size: 1.5rem;
    line-height: 1;
    min-width: 42px;
    padding: 0 8px;
}

.fluix-aa-page-btn:hover {
    border-color: #999;
    background: #f5f5f5;
    color: #111;
}

.fluix-aa-page-btn--active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    pointer-events: none;
    cursor: default;
}

.fluix-aa-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 42px;
    font-size: 1.1rem;
    color: #999;
    user-select: none;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet: max 2 colonne */
@media ( max-width: 900px ) {
    .fluix-aa-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile: 1 colonna */
@media ( max-width: 560px ) {
    .fluix-aa-grid {
        grid-template-columns: 1fr !important;
    }

    .fluix-aa-card__body {
        padding: 16px;
    }

    .fluix-aa-filters {
        gap: 6px;
        margin-bottom: 20px;
    }

    .fluix-aa-chip {
        font-size: 1rem;
        padding: 6px 14px;
    }
}