/* =========================================================================
   CLEAN GALLERY PAGE & BIG IMAGE MODAL STYLESHEET
   Kalpavrikshalaya Montessori - Little Sprouts / Childit Theme
   Plain, subtle, elegant design with funny micro-animations
   ========================================================================= */

/* --- 1. HERO BANNER DECORATIONS --- */
.gallery-hero-daisy {
    position: absolute;
    right: 5%;
    top: 25%;
    pointer-events: none;
    opacity: 0.9;
    animation: floatDaisy 8s ease-in-out infinite alternate;
}

@keyframes floatDaisy {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-12px) rotate(15deg); }
}

.gallery-wave-divider {
    background: transparent;
    margin-top: -1px;
    margin-bottom: 0;
}
.gallery-wave-divider svg {
    height: 38px;
    display: block;
    width: 100%;
}

/* --- 2. MAIN SECTION --- */
.gallery-main-section {
    padding: 60px 0 90px;
    background: #F8FAFC;
}

/* --- 3. STATS HIGHLIGHT BAR --- */
.gallery-stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 45px;
}

.gallery-stat-card {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 2px solid #E2E8F0;
    box-shadow: 0 4px 12px rgba(10, 29, 55, 0.04);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.gallery-stat-card:hover {
    transform: translateY(-4px);
    border-color: #CBD5E1;
    box-shadow: 0 8px 20px rgba(10, 29, 55, 0.08);
}

.gallery-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.stat-icon-yellow { background: #FFF9E6; }
.stat-icon-pink   { background: #FFEBF2; }
.stat-icon-blue   { background: #E6FAFB; }
.stat-icon-green  { background: #EDFBF2; }

.gallery-stat-number {
    font-family: var(--font-heading, 'Fredoka', sans-serif);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--childit-navy, #0A1D37);
    line-height: 1.2;
}

.gallery-stat-label {
    font-size: 0.88rem;
    color: #64748B;
    font-weight: 600;
}

/* --- 4. CONTROLS, SEARCH & FILTER TOOLBAR --- */
.gallery-controls-card {
    background: #FFFFFF;
    border-radius: 22px;
    padding: 28px;
    border: 2px solid #E2E8F0;
    box-shadow: 0 6px 18px rgba(10, 29, 55, 0.04);
    margin-bottom: 40px;
}

/* Category Filter Navigation Pills */
.gallery-filter-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.gallery-filter-pill {
    padding: 10px 22px;
    border-radius: 999px;
    font-family: var(--font-heading, 'Fredoka', sans-serif);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid #E2E8F0;
    background: #FFFFFF;
    color: var(--childit-navy, #0A1D37);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gallery-filter-pill .pill-count {
    background: #F1F5F9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    transition: all 0.25s ease;
}

.gallery-filter-pill:hover {
    border-color: var(--childit-navy, #0A1D37);
    color: var(--childit-navy, #0A1D37);
    transform: translateY(-2px);
}

.gallery-filter-pill.active {
    background: var(--childit-navy, #0A1D37);
    border-color: var(--childit-navy, #0A1D37);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(10, 29, 55, 0.12);
    transform: translateY(-2px);
}

.gallery-filter-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

/* Secondary Filter Toolbar: Year Pills & Search */
.gallery-subtoolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px dashed #E2E8F0;
    flex-wrap: wrap;
}

.gallery-year-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gallery-year-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748B;
    margin-right: 4px;
}

.gallery-year-pill {
    padding: 6px 15px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1.5px solid #CBD5E1;
    background: #F8FAFC;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-year-pill:hover {
    border-color: var(--childit-navy, #0A1D37);
    color: var(--childit-navy, #0A1D37);
}

.gallery-year-pill.active {
    background: var(--childit-orange, #FF5722);
    border-color: var(--childit-orange, #FF5722);
    color: #FFFFFF;
}

/* Search Bar */
.gallery-search-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 380px;
}

.gallery-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #94A3B8;
}

.gallery-search-input {
    width: 100%;
    padding: 10px 38px 10px 42px;
    border-radius: 999px;
    border: 2px solid #CBD5E1;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--childit-navy, #0A1D37);
    outline: none;
    background: #FFFFFF;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gallery-search-input:focus {
    border-color: var(--childit-navy, #0A1D37);
    box-shadow: 0 0 0 2px rgba(10, 29, 55, 0.08);
}

.gallery-clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #CBD5E1;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    color: #1E293B;
}

/* Showing count bar */
.gallery-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 6px;
    font-size: 0.92rem;
    color: #64748B;
    font-weight: 600;
}
.gallery-hint-text {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94A3B8;
    font-size: 0.85rem;
}

/* --- 5. PHOTOS GRID & CARDS --- */
.gallery-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 80px;
}

.gallery-photo-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #FFFFFF;
    border: 2px solid #E2E8F0;
    box-shadow: 0 4px 14px rgba(10, 29, 55, 0.05);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-photo-card.is-hidden {
    display: none !important;
}

.gallery-photo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(10, 29, 55, 0.09);
    border-color: #CBD5E1;
}

/* Image Container */
.gallery-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #F1F5F9;
}

.gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-photo-card:hover .gallery-img-wrap img {
    transform: scale(1.06);
}

/* Corner Badges */
.card-badge-category {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.card-badge-year {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: rgba(10, 29, 55, 0.75);
    color: #FFFFFF;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* No icon on hover - direct click opens image */
.gallery-hover-overlay {
    display: none !important;
}

/* Card Body (Below Image) */
.gallery-card-body {
    padding: 18px 20px;
    background: #FFFFFF;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-card-title {
    font-family: var(--font-heading, 'Fredoka', sans-serif);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--childit-navy, #0A1D37);
    line-height: 1.35;
    margin-bottom: 8px;
}

.gallery-card-caption {
    font-size: 0.86rem;
    color: #64748B;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Badge Colors */
.gallery-tag-festivals { background: #FFD200; color: #0A1D37; }
.gallery-tag-work      { background: #28C76F; color: #FFFFFF; }
.gallery-tag-nature    { background: #00C2CB; color: #FFFFFF; }
.gallery-tag-sports    { background: #FF7A00; color: #FFFFFF; }
.gallery-tag-daily     { background: #FF2A6D; color: #FFFFFF; }

/* Empty State */
.gallery-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 20px;
    background: #FFFFFF;
    border-radius: 20px;
    border: 2px dashed #CBD5E1;
}
.empty-icon {
    font-size: 3rem;
    margin-bottom: 14px;
}
.gallery-empty-state h3 {
    font-family: var(--font-heading, 'Fredoka', sans-serif);
    color: var(--childit-navy, #0A1D37);
    margin-bottom: 10px;
}
.gallery-empty-state p {
    color: #64748B;
    max-width: 460px;
    margin: 0 auto 24px;
}

/* --- 6. CLEAN BIG IMAGE MODAL POPUP (Only the image, no content) --- */
.gallery-image-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.gallery-image-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Backdrop */
.modal-backdrop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 29, 55, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

/* Image Wrapper */
.modal-image-wrapper {
    position: relative;
    z-index: 10;
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Big Image */
.modal-big-img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.15);
    animation: modalImagePop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: #0A1D37;
}

@keyframes modalImagePop {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Close Button (Subtle & Clean) */
.modal-close-btn {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #E2E8F0;
    color: #0A1D37;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    z-index: 20;
}

.modal-close-btn:hover {
    background: #FF2A6D;
    border-color: #FF2A6D;
    color: #FFFFFF;
    transform: scale(1.1);
}

/* --- 7. RESPONSIVE BREAKPOINTS --- */
@media (max-width: 992px) {
    .gallery-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .gallery-main-section {
        padding: 40px 0 60px;
    }
    .gallery-stats-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 30px;
    }
    .gallery-stat-card {
        padding: 14px 16px;
        gap: 12px;
        border-radius: 16px;
    }
    .gallery-stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
        border-radius: 12px;
    }
    .gallery-stat-number {
        font-size: 1.35rem;
    }
    .gallery-stat-label {
        font-size: 0.78rem;
    }
    .gallery-controls-card {
        padding: 18px 14px;
        border-radius: 18px;
        margin-bottom: 30px;
    }
    .gallery-filter-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
    }
    .gallery-filter-nav::-webkit-scrollbar {
        display: none;
    }
    .gallery-filter-pill {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 8px 16px;
        font-size: 0.88rem;
    }
    .gallery-subtoolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .gallery-search-wrap {
        max-width: 100%;
        min-width: 100%;
    }
    .gallery-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
        gap: 18px;
        margin-bottom: 50px;
    }
    .gallery-photo-card {
        border-radius: 18px;
    }
    .modal-close-btn {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }
}
