/* ============================================================
   Noakhali Zila Samity — Photo Gallery Page Styles
   ============================================================ */

/* ---------- Gallery Section ---------- */
.gallery-section {
    background: var(--bg-body);
    min-height: 80vh;
    padding-top: 50px;
    padding-bottom: 80px;
}

.gallery-header {
    margin-bottom: 40px;
    text-align: center;
}

.breadcrumb-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.breadcrumb-custom a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-custom a:hover {
    color: var(--primary-green);
}

.page-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 12px;
    font-family: "Poppins", "Noto Sans Bengali", sans-serif;
}

.page-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Gallery Grid ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.gallery-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-col);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.gallery-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: var(--bg-soft);
}

.gallery-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-fast);
}

.gallery-card:hover .gallery-card-image {
    transform: scale(1.1);
}

.gallery-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-overlay-content {
    color: var(--brand-white);
    transform: translateY(10px);
    transition: transform var(--transition-fast);
}

.gallery-card:hover .gallery-card-overlay-content {
    transform: translateY(0);
}

.gallery-card-overlay-content i {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.gallery-card-overlay-content p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.gallery-card-body {
    padding: 20px;
    text-align: center;
}

.gallery-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 16px;
    font-family: "Poppins", "Noto Sans Bengali", sans-serif;
}

.btn-view-gallery {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: var(--brand-white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px rgba(24, 169, 87, 0.3);
    font-family: "Inter", sans-serif;
}

.btn-view-gallery:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 169, 87, 0.4);
    color: var(--brand-white);
}

.btn-view-gallery i {
    font-size: 1rem;
}

/* ---------- Gallery Pagination ---------- */
.gallery-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-col);
}

.gallery-pagination-info {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
}

.gallery-pagination-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gallery-page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-soft);
    color: var(--text-main);
    border: 1px solid var(--border-col);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.gallery-page-btn:hover:not(:disabled) {
    background: var(--primary-green);
    color: var(--brand-white);
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.gallery-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gallery-page-info {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 0 12px;
    min-width: 50px;
    text-align: center;
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--brand-white);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--brand-white);
    color: var(--primary-green);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--brand-white);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.lightbox-nav:hover {
    background: var(--brand-white);
    color: var(--primary-green);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-image {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.lightbox-caption {
    padding: 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-col);
}

.lightbox-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
    font-family: "Poppins", "Noto Sans Bengali", sans-serif;
}

.lightbox-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 1024px) {
    .page-title {
        font-size: 2.2rem;
    }

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

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding-top: 30px;
        padding-bottom: 50px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .gallery-filter-buttons {
        padding: 10px 16px;
        gap: 8px;
    }

    .gallery-filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

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

    .gallery-card-body {
        padding: 16px;
    }

    .gallery-card-title {
        font-size: 1rem;
    }

    .gallery-pagination {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .lightbox-close {
        top: -35px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-title {
        font-size: 1.1rem;
    }

    .lightbox-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery-filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .gallery-card-image-wrapper {
        padding-top: 66%;
    }
}

/* ============================================================
   DARK MODE SUPPORT
   ============================================================ */

[data-theme="dark"] .gallery-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .gallery-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .gallery-card-image-wrapper {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .btn-view-gallery {
    box-shadow: 0 4px 14px rgba(24, 169, 87, 0.5);
}

[data-theme="dark"] .btn-view-gallery:hover {
    box-shadow: 0 6px 20px rgba(24, 169, 87, 0.6);
}

[data-theme="dark"] .gallery-pagination {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .lightbox-content {
    background: var(--bg-card);
}

[data-theme="dark"] .lightbox-caption {
    background: var(--bg-card);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .lightbox-close,
[data-theme="dark"] .lightbox-nav {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .lightbox-close:hover,
[data-theme="dark"] .lightbox-nav:hover {
    background: var(--brand-white);
    color: var(--primary-green);
}

[data-theme="dark"] .gallery-card-category {
    background: rgba(24, 169, 87, 0.2);
    color: var(--primary-green);
}

[data-theme="dark"] .gallery-card-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 100%);
}