/* =====================================================
   Video Archive — va-style.css
   Prefix: va-
   Primary: #0077d0  |  Fonts: Poppins, Montserrat
===================================================== */

/* ---------- Reset scoped ---------- */
.va-archive *,
.va-archive *::before,
.va-archive *::after { box-sizing: border-box; }

/* ---------- Wrapper ---------- */
.va-archive {
    font-family: 'Poppins', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px 64px;
}

/* ---------- Header archivio ---------- */
.va-archive__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0077d0;
}

.va-archive__title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: #111;
    margin: 0;
}

.va-archive__title span {
    color: #0077d0;
}

/* ---------- Filtri categoria ---------- */
.va-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.va-filters__btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1.5px solid #0077d0;
    color: #0077d0;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.va-filters__btn:hover,
.va-filters__btn.is-active {
    background: #0077d0;
    color: #fff;
}

/* ---------- Griglia video ---------- */
.va-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

/* ---------- Card video ---------- */
.va-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.va-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
}

/* ---------- Thumbnail wrapper ---------- */
.va-card__thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #111;
    cursor: pointer;
    text-decoration: none;
}

.va-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.3s;
}

.va-card__thumb:hover .va-card__img {
    transform: scale(1.04);
    opacity: 0.85;
}

/* ---------- Play button ---------- */
.va-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.va-card__play-icon {
    width: 56px;
    height: 56px;
    background: rgba(0, 119, 208, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(4px);
}

.va-card__thumb:hover .va-card__play-icon {
    background: #0077d0;
    transform: scale(1.12);
}

.va-card__play-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
    margin-left: 3px; /* ottico */
}

/* ---------- Badge tipo ---------- */
.va-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

/* ---------- Durata ---------- */
.va-card__duration {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: rgba(0,0,0,.75);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
}

/* ---------- Corpo card ---------- */
.va-card__body {
    padding: 16px 18px 18px;
}

.va-card__cat {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0077d0;
    margin-bottom: 6px;
    display: block;
}

.va-card__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 8px;
    line-height: 1.35;
}

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

.va-card__title a:hover { color: #0077d0; }

.va-card__excerpt {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Paginazione ---------- */
.va-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.va-pagination a,
.va-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1.5px solid #ddd;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.va-pagination a:hover {
    border-color: #0077d0;
    color: #0077d0;
}

.va-pagination .current,
.va-pagination span.current {
    background: #0077d0;
    border-color: #0077d0;
    color: #fff;
}

/* ---------- Empty state ---------- */
.va-empty {
    text-align: center;
    padding: 64px 16px;
    color: #999;
}

.va-empty svg { opacity: 0.25; margin-bottom: 16px; }
.va-empty p { font-size: 1rem; }

/* ---------- Singolo video ---------- */
.va-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 16px 64px;
    font-family: 'Poppins', sans-serif;
}

.va-single__video-wrap {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 28px;
}

.va-single__video-wrap iframe,
.va-single__video-wrap video {
    width: 100%;
    height: 100%;
    border: none;
}

.va-single__title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    font-weight: 700;
    color: #111;
    margin: 0 0 12px;
}

.va-single__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.va-single__meta strong { color: #0077d0; font-weight: 600; }

.va-single__excerpt {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
}

.va-single__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0077d0;
    text-decoration: none;
}

.va-single__back:hover { text-decoration: underline; }

/* ---------- GLightbox overrides ---------- */
.glightbox-clean .gslide-description { background: rgba(0,0,0,.85); }
.glightbox-clean .gdesc-inner { padding: 16px 20px; }
.glightbox-clean .gslide-title { font-family: 'Poppins', sans-serif; font-size: 0.95rem; color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .va-grid { grid-template-columns: 1fr; }
    .va-archive__header { flex-direction: column; align-items: flex-start; }
}
