/* ==========================================================================
   PRESIDENCY ACADEMY - GALLERY ARCHIVE STYLESHEET
   Target: archive-gallery.php
   Theme: Blocksy Child
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES & DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
    --primary: #4B3427;
    --accent: #C9973E;
    --bg: #F9F7F3;
    --text: #2E2E2E;
    --text-muted: #666666;
    --white: #ffffff;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(75, 52, 39, 0.15);
    --transition: 0.35s ease;
    
    /* Typography */
    --font-heading: 'Poppins', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   2. GLOBAL ARCHIVE SCOPE
   -------------------------------------------------------------------------- */
.gallery-archive-page {
    background-color: var(--bg);
    font-family: var(--font-body);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   3. PREMIUM HERO SECTION
   -------------------------------------------------------------------------- */
.gallery-hero-section {
    position: relative;
    padding: 120px 0 100px;
    background: linear-gradient(135deg, var(--primary) 0%, #2A1D15 100%);
    color: var(--white);
    text-align: center;
    overflow: hidden;
}

.gallery-hero-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.gallery-hero-section .hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Breadcrumb */
.gallery-breadcrumb {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gallery-breadcrumb a {
    color: var(--white);
    text-decoration: none;
    transition: color var(--transition);
}

.gallery-breadcrumb a:hover {
    color: var(--accent);
}

.gallery-breadcrumb .sep {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.gallery-breadcrumb .current {
    color: var(--accent);
}

/* Hero Typography */
.gallery-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 20px 0;
    color: var(--white);
    letter-spacing: -0.02em;
}

.gallery-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 760px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   4. GALLERY GRID SECTION
   -------------------------------------------------------------------------- */
.gallery-content-section {
    padding: 80px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* --------------------------------------------------------------------------
   5. GALLERY CARD DESIGN
   -------------------------------------------------------------------------- */
.gallery-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform var(--transition), box-shadow var(--transition);
    
    /* Native CSS Fade Up Animation */
    opacity: 0;
    animation: galleryFadeUp 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes galleryFadeUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Staggered animation delays for the first row of cards */
.gallery-card:nth-child(1) { animation-delay: 0.05s; }
.gallery-card:nth-child(2) { animation-delay: 0.10s; }
.gallery-card:nth-child(3) { animation-delay: 0.15s; }
.gallery-card:nth-child(4) { animation-delay: 0.20s; }

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.gallery-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    outline: none;
}

/* Accessibility Focus */
.gallery-card-link:focus-visible {
    box-shadow: 0 0 0 3px var(--accent);
    border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   6. CARD IMAGE & PLACEHOLDER
   -------------------------------------------------------------------------- */
.gallery-card-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    background-color: var(--bg);
}

.gallery-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
}

.gallery-card:hover .gallery-card-image {
    transform: scale(1.08);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F0EAE1 0%, #E2D9CD 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-placeholder .placeholder-text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: rgba(75, 52, 39, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    padding: 20px;
}

/* --------------------------------------------------------------------------
   7. CARD CONTENT
   -------------------------------------------------------------------------- */
.gallery-card-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gallery-card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px 0;
    line-height: 1.4;
    transition: color var(--transition);
    
    /* Line clamp for title */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-card:hover .gallery-card-title {
    color: var(--accent);
}

.gallery-card-excerpt {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    
    /* Line clamp for excerpt */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-card-excerpt p {
    margin: 0;
}

/* --------------------------------------------------------------------------
   8. PAGINATION
   -------------------------------------------------------------------------- */
.gallery-pagination-area {
    padding-top: 60px;
    text-align: center;
}

.gallery-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.gallery-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background-color: var(--white);
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.gallery-pagination .page-numbers:hover {
    background-color: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(201, 151, 62, 0.2);
}

.gallery-pagination .current {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(75, 52, 39, 0.2);
    pointer-events: none;
}

.gallery-pagination .dots {
    background-color: transparent;
    box-shadow: none;
    color: var(--text-muted);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   9. EMPTY STATE
   -------------------------------------------------------------------------- */
.gallery-empty-state {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 60px 30px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.gallery-empty-illustration {
    margin-bottom: 24px;
}

.gallery-empty-illustration svg {
    width: 80px;
    height: 80px;
    color: var(--accent);
    opacity: 0.8;
}

.gallery-empty-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 12px 0;
}

.gallery-empty-message {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */

/* Extra Large Desktop Tweaks */
@media (max-width: 1400px) {
    .gallery-grid {
        gap: 24px;
    }
}

/* Tablet Landscape & Small Desktop */
@media (max-width: 1200px) {
    .gallery-hero-section {
        padding: 100px 0 80px;
    }
}

/* Tablet Portrait */
@media (max-width: 992px) {
    .gallery-hero-section {
        padding: 90px 0 70px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    .gallery-content-section {
        padding: 60px 0;
    }
}

/* Large Mobile */
@media (max-width: 768px) {
    .gallery-hero-section {
        padding: 70px 0 60px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .gallery-card-content {
        padding: 20px;
    }
    
    .gallery-card-title {
        font-size: 17px;
    }
}

/* Standard Mobile */
@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-pagination .nav-links {
        gap: 8px;
    }
    
    .gallery-pagination .page-numbers {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .gallery-hero-section {
        padding: 60px 0 50px;
    }
    
    .gallery-card-content {
        padding: 16px;
    }
    
    .gallery-card-title {
        font-size: 16px;
    }
    
    .gallery-card-excerpt {
        font-size: 14px;
    }
}