/* Galleries Page Typography & Layout */
.page-header {
    text-align: center;
    padding: 180px 20px 60px;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #111 100%);
    position: relative;
}

.page-header h1 {
    font-family: 'Bebas Neue', 'Lato', sans-serif;
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    background: linear-gradient(to right, #ffffff, #cfcfcf);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.25rem;
    font-weight: 300;
}

.galleries-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 40px 100px;
    background-color: var(--bg-dark);
}

/* Premium Filter Buttons */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 60px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-primary, 'Lato');
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    box-shadow: 0 4px 15px rgba(253, 173, 1, 0.3);
}

/* Stunning CSS Grid Layout */
.dynamic-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Individual Gallery Card (Glassmorphism & Micro-animations) */
.gallery-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.gallery-card:nth-child(1) {
    animation-delay: 0.1s;
}

.gallery-card:nth-child(2) {
    animation-delay: 0.2s;
}

.gallery-card:nth-child(3) {
    animation-delay: 0.3s;
}

.gallery-card:nth-child(4) {
    animation-delay: 0.4s;
}

.gallery-card:nth-child(n+5) {
    animation-delay: 0.5s;
}

.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(253, 173, 1, 0.1);
    border-color: rgba(253, 173, 1, 0.3);
    z-index: 2;
}

.gallery-card-image {
    width: 100%;
    height: 300px;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* Smooth Image Zoom on Hover */
.gallery-card:hover .gallery-card-image {
    background-size: 110%;
    /* Creates a smooth zoom effect if transitioning background-size, but better to use an img tag for performance. We'll stick to CSS hack for now */
}

.gallery-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.gallery-card:hover .gallery-card-image::before {
    opacity: 0.8;
}

.gallery-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0) 100%);
    box-sizing: border-box;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.gallery-card-title {
    font-size: 1.5rem;
    margin: 0 0 8px 0;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Bebas Neue', 'Lato', sans-serif;
    letter-spacing: 0.03em;
}

.gallery-card-date {
    font-size: 0.85rem;
    color: var(--primary);
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.9;
}

/* Loading & Empty States */
.loading-spinner,
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 300;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 140px 20px 40px;
    }

    .galleries-main {
        padding: 1rem 20px 60px;
    }

    .dynamic-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .gallery-card-image {
        height: 250px;
    }
}