/**
 * page-archives.css
 * Dark editorial skin for the "Les Archives" page template.
 * Mirrors the Text A / History / Association Home dark scheme.
 *
 * Scoped under .page-template-page-archives
 */

/* ==================================================================
 * 1. Transparent body so the fixed layer shows through
 * ================================================================== */
.page-template-page-archives {
    background-color: transparent;
}

/* ==================================================================
 * 2. Fixed full-viewport background image (set by PHP via --page-archives-bg)
 * ================================================================== */
.page-template-page-archives .page-archives::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: var(--page-archives-bg, url('../images/BeyrouthMaVille15_1.1.18.tif.jpg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ==================================================================
 * 2. Soft darkening veil so content reads cleanly on the photo
 * ================================================================== */
.page-template-page-archives .page-archives::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
}

/* ==================================================================
 * 3. GOTCHA: null jocelyne-pages.css alternating opaque section fills
 * ================================================================== */
.jocelyne-page.page-archives,
.jocelyne-page.page-archives section,
.jocelyne-page.page-archives section:nth-child(odd),
.jocelyne-page.page-archives section:nth-child(even) {
    background-color: transparent !important;
    background-image: none !important;
}

/* ==================================================================
 * 4. Text -> cream. NEVER use var(--white); it is undefined.
 * ================================================================== */
.jocelyne-page.page-archives .jocelyne-hero h1,
.jocelyne-page.page-archives .content-wrapper,
.jocelyne-page.page-archives .content-wrapper p,
.jocelyne-page.page-archives .content-wrapper li,
.jocelyne-page.page-archives .content-wrapper h2,
.jocelyne-page.page-archives .content-wrapper h3 {
    color: var(--brand-cream, #FEFEFE);
}

/* ==================================================================
 * 4. Content boxes -> translucent glass surface (match Text A exactly)
 * ================================================================== */
.jocelyne-page.page-archives .content-wrapper {
    background-color: rgba(17, 24, 39, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: var(--brand-cream, #FEFEFE);
    -webkit-backdrop-filter: blur(18px) brightness(0.72) saturate(1.05);
    backdrop-filter: blur(18px) brightness(0.72) saturate(1.05);
}

/* ==================================================================
 * Layout: Hero — centered, cream text
 * ================================================================== */
.jocelyne-page.page-archives .jocelyne-hero {
    padding: 120px 20px 60px;
    text-align: center;
}

.jocelyne-page.page-archives .jocelyne-hero .content-wrapper {
    background: none;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

.jocelyne-page.page-archives .archives-hero-title {
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-cream, #FEFEFE);
    margin: 0 0 20px;
    line-height: 1.2;
}

.jocelyne-page.page-archives .archives-hero-intro {
    font-size: 1.125rem;
    color: rgba(254, 254, 254, 0.72);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==================================================================
 * Layout: Filter Tab Bar — glass panel, cream tabs
 * ================================================================== */
.jocelyne-page.page-archives .archives-filter-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px;
}

.jocelyne-page.page-archives .archives-filter-bar-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.jocelyne-page.page-archives .archive-filter-tab {
    padding: 10px 24px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background-color: rgba(17, 24, 39, 0.40);
    color: var(--brand-cream, #FEFEFE);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
    -webkit-backdrop-filter: blur(12px) brightness(0.80) saturate(1.05);
    backdrop-filter: blur(12px) brightness(0.80) saturate(1.05);
}

.jocelyne-page.page-archives .archive-filter-tab:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.40);
}

.jocelyne-page.page-archives .archive-filter-tab.active {
    background-color: var(--brand-cream, #FEFEFE);
    color: #1a1a1a;
    border-color: var(--brand-cream, #FEFEFE);
}

/* ==================================================================
 * Layout: Archive Grid Section
 * ================================================================== */
.jocelyne-page.page-archives .archives-grid-section {
    padding: 40px 20px 80px;
}

.jocelyne-page.page-archives .archives-grid-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.jocelyne-page.page-archives .archives-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ==================================================================
 * Archive Item Card — glass panel
 * ================================================================== */
.jocelyne-page.page-archives .archive-item {
    background-color: rgba(17, 24, 39, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-backdrop-filter: blur(18px) brightness(0.72) saturate(1.05);
    backdrop-filter: blur(18px) brightness(0.72) saturate(1.05);
}

.jocelyne-page.page-archives .archive-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Card image area */
.jocelyne-page.page-archives .archive-item-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background-color: rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.jocelyne-page.page-archives .archive-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jocelyne-page.page-archives .archive-item-placeholder {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.35);
}

/* Card content area */
.jocelyne-page.page-archives .archive-item-content {
    padding: 20px;
}

.jocelyne-page.page-archives .archive-item-category {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.12);
    color: rgba(254, 254, 254, 0.72);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.jocelyne-page.page-archives .archive-item-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-cream, #FEFEFE);
    margin: 0 0 10px;
    line-height: 1.3;
}

.jocelyne-page.page-archives .archive-item-description {
    font-size: 0.9rem;
    color: rgba(254, 254, 254, 0.72);
    line-height: 1.5;
    margin: 0;
}

/* ==================================================================
 * No Items Message
 * ================================================================== */
.jocelyne-page.page-archives .archives-no-items {
    text-align: center;
    padding: 60px 20px;
    color: rgba(254, 254, 254, 0.72);
    font-size: 1.125rem;
}

/* ==================================================================
 * Filter Transition States
 * ================================================================== */
.jocelyne-page.page-archives .archive-item.is-hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.jocelyne-page.page-archives .archive-item.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* ==================================================================
 * Responsive: Tablet (768px - 1023px)
 * ================================================================== */
@media (max-width: 1023px) and (min-width: 768px) {
    .jocelyne-page.page-archives .archives-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================================================================
 * Responsive: Mobile (< 768px)
 * ================================================================== */
@media (max-width: 767px) {
    .jocelyne-page.page-archives .jocelyne-hero {
        padding: 80px 20px 40px;
    }

    .jocelyne-page.page-archives .archives-hero-title {
        font-size: 2rem;
    }

    .jocelyne-page.page-archives .archives-hero-intro {
        font-size: 1rem;
    }

    /* Horizontal scrollable tabs on mobile */
    .jocelyne-page.page-archives .archives-filter-bar-inner {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .jocelyne-page.page-archives .archives-filter-bar-inner::-webkit-scrollbar {
        display: none;
    }

    .jocelyne-page.page-archives .archive-filter-tab {
        flex-shrink: 0;
    }

    .jocelyne-page.page-archives .archives-grid {
        grid-template-columns: 1fr;
    }

    .jocelyne-page.page-archives .archive-item-title {
        font-size: 1rem;
    }

    .jocelyne-page.page-archives .archive-item-description {
        font-size: 0.875rem;
    }
}
