/* ===================================================================
   WebePC Hall of Fame — hof.css  v1.2.0
   Palette: navy #00385F | beige #C4B89E | grigio #9F9B8F | oro #B8860B
   Font: Libre Baskerville (headings) + Lato (body)
=================================================================== */

/* ── Variabili di default (override via impostazioni plugin) ── */
:root {
    --whof-navy:   #00385F;
    --whof-beige:  #C4B89E;
    --whof-grey:   #9F9B8F;
    --whof-badge:  #00385F;
    --whof-text:   #1A1A1A;
    --whof-white:  #FFFFFF;
    --whof-radius: 4px;
    --whof-shadow: 0 2px 16px rgba(0,56,95,.12);
}

/* ══════════════════════════════════════════
   HEADER ARCHIVIO
══════════════════════════════════════════ */
.whof-archive-header {
    background-color: var(--whof-navy);
    color: var(--whof-white);
    text-align: center;
    padding: 64px 24px 56px;
    position: relative;
    overflow: hidden;
}

.whof-archive-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 120%, rgba(196,184,158,.18) 0%, transparent 70%);
    pointer-events: none;
}

.whof-header-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.whof-header-trophy {
    color: var(--whof-beige);
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
}

.whof-archive-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    letter-spacing: .04em;
    color: var(--whof-white);
    margin: 0 0 12px;
    line-height: 1.15;
}

.whof-archive-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    color: var(--whof-beige);
    margin: 0;
    line-height: 1.6;
}

/* ══════════════════════════════════════════
   FILTRI
══════════════════════════════════════════ */
.whof-filters {
    background: #f8f6f2;
    border-bottom: 1px solid rgba(159,155,143,.25);
    padding: 20px 24px;
}

.whof-filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    align-items: flex-start;
}

.whof-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.whof-filter-label {
    font-family: 'Lato', sans-serif;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--whof-grey);
    white-space: nowrap;
    min-width: 36px;
}

.whof-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.whof-pill {
    font-family: 'Lato', sans-serif;
    font-size: .8rem;
    font-weight: 400;
    padding: 5px 14px;
    border: 1.5px solid var(--whof-grey);
    background: transparent;
    color: var(--whof-text);
    border-radius: 40px;
    cursor: pointer;
    transition: all .2s ease;
    line-height: 1.4;
}

.whof-pill:hover,
.whof-pill.active {
    background: var(--whof-badge);
    border-color: var(--whof-badge);
    color: var(--whof-white);
}

/* ══════════════════════════════════════════
   GRIGLIA
══════════════════════════════════════════ */
.whof-archive-wrap,
.whof-grid {
    width: 100%;
}

.whof-grid {
    display: grid;
    gap: 28px;
    padding: 48px 24px 64px;
    max-width: 1200px;
    margin: 0 auto;
    grid-template-columns: repeat(3, 1fr); /* default 3 colonne */
}

.whof-grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.whof-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.whof-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }

/* ══════════════════════════════════════════
   CARD
══════════════════════════════════════════ */
.whof-card {
    background: var(--whof-white);
    border-radius: var(--whof-radius);
    box-shadow: var(--whof-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Immagine — altezza uniforme garantita su tutte le card */
.whof-card-img-wrap {
    display: block;
    position: relative;
    width: 100% !important;
    aspect-ratio: 4 / 3;
    /* fallback per browser che non supportano aspect-ratio */
    height: 0;
    padding-bottom: 75%; /* 3/4 = 75% */
    overflow: hidden;
    background: #eae7e0;
    flex-shrink: 0;
}

/* Se aspect-ratio è supportato, annulla il padding-bottom trick */
@supports (aspect-ratio: 4 / 3) {
    .whof-card-img-wrap {
        height: auto;
        padding-bottom: 0;
        aspect-ratio: 4 / 3;
    }
}

.whof-card-img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* Placeholder no-foto */
.whof-card-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--whof-grey);
    width: 100%;
    height: 100%;
}
.whof-card-img--placeholder svg {
    width: 60px;
    height: 60px;
    opacity: .5;
}

/* ── Body ── */
.whof-card-body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whof-card-cane {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
    color: var(--whof-navy);
}

.whof-card-descrizione {
    font-family: 'Lato', sans-serif;
    font-size: .88rem;
    color: #444;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

/* Badge — in fondo al body, dopo descrizione */
.whof-card-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 4px;
}

.whof-card-badge {
    display: inline-block;
    align-self: flex-start;
    background: var(--whof-badge);
    color: var(--whof-white);
    font-family: 'Lato', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 2px;
    line-height: 1;
}

/* card nascosta dal filtro */
.whof-card.is-hidden {
    display: none;
}

/* ══════════════════════════════════════════
   NO RESULTS
══════════════════════════════════════════ */
.whof-no-results {
    text-align: center;
    padding: 64px 24px;
    color: var(--whof-grey);
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .whof-grid[data-cols="4"] { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .whof-grid[data-cols="3"],
    .whof-grid[data-cols="4"] { grid-template-columns: repeat(2, 1fr); }

    .whof-filters-inner { gap: 14px 20px; }
}

@media (max-width: 480px) {
    .whof-grid[data-cols="2"],
    .whof-grid[data-cols="3"],
    .whof-grid[data-cols="4"] { grid-template-columns: 1fr; }

    .whof-archive-header { padding: 44px 16px 40px; }
}

/* ══════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .whof-card,
    .whof-card-img,
    .whof-pill,
    .whof-back-link { transition: none; }
    .whof-card:hover { transform: none; }
}

/* ══════════════════════════════════════════
   PAGINAZIONE
══════════════════════════════════════════ */
.whof-pagination {
    padding: 40px 24px 56px;
    display: flex;
    justify-content: center;
}

.whof-pagination-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.whof-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 14px;
    font-family: 'Lato', sans-serif;
    font-size: .95rem;
    font-weight: 400;
    color: var(--whof-navy);
    background: var(--whof-white);
    border: 1.5px solid rgba(0,56,95,.25);
    border-radius: var(--whof-radius);
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
    line-height: 1;
}

.whof-page-btn:hover {
    background: var(--whof-navy);
    color: var(--whof-white);
    border-color: var(--whof-navy);
}

.whof-page-current {
    background: var(--whof-navy);
    color: var(--whof-white);
    border-color: var(--whof-navy);
    font-weight: 700;
    cursor: default;
}

.whof-page-prev svg,
.whof-page-next svg {
    width: 18px;
    height: 18px;
}

.whof-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    color: var(--whof-grey);
    letter-spacing: .05em;
}

/* Mobile: bottoni più grandi, gap ridotto */
@media (max-width: 480px) {
    .whof-page-btn {
        min-width: 44px;
        height: 44px;
        font-size: .9rem;
    }
    .whof-pagination-list {
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .whof-page-btn { transition: none; }
}
