/* ===== GALLERY PAGE SPECIFIC STYLES ===== */

/* ===== Filter Buttons Section ===== */
.gallery-filters {
    background: var(--background-light);
    padding: 1.2rem 0; /* thoda kam padding */
    position: sticky;
    top: 80px;
    z-index: 100;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem; /* button ke beech ka gap kam */
}

.gallery-filters button {
    background: var(--white);
    border: 2px solid #d4af37; /* 🟡 golden border */
    color: #d4af37;
    font-size: 0.9rem; /* text thoda chhota */
    font-weight: 600;
    border-radius: 25px; /* halki roundness */
    padding: 0.4rem 1.1rem; /* button height aur width dono kam */
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.4px;
}

.gallery-filters button:hover {
    background: #d4af37;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(212,175,55,0.3);
}

.gallery-filters button.active {
    background: #d4af37;
    color: var(--white);
    border-color: #d4af37;
    box-shadow: 0 4px 10px rgba(212,175,55,0.4);
    transform: scale(1.03);
}

/* Stats text below filters */
.gallery-stats {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .gallery-filters {
        gap: 0.5rem;
        padding: 1.5rem 1rem;
    }

    .gallery-filters button {
        font-size: 0.9rem;
        padding: 0.5rem 1.2rem;
    }
}

/* ===== Dynamic Gallery Section ===== */
.dynamic-gallery-section {
    padding: 3rem 0;
    background: var(--white);
}

.dynamic-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-media-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.gallery-media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.media-thumbnail {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.media-thumbnail img,
.media-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.media-thumbnail:hover img {
    transform: scale(1.1);
}

.media-thumbnail:hover video {
    transform: scale(1.05);
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.8), rgba(44, 62, 80, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.media-thumbnail:hover .media-overlay {
    opacity: 1;
}

.media-icon {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.media-info {
    color: var(--white);
    text-align: center;
}

.media-type {
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== Video Styles ===== */
.video-thumbnail {
    position: relative;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(231, 76, 60, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
    opacity: 0.9;
}

.video-thumbnail:hover .video-play-btn {
    background: var(--secondary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

/* ===== Empty Gallery State ===== */
.empty-gallery {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--background-light);
    border-radius: 15px;
    border: 2px dashed #ddd;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.empty-gallery h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.empty-gallery p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.empty-gallery code {
    background: var(--white);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-family: monospace;
    color: var(--secondary-color);
}

/* ===== Lightbox Modal ===== */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-nav:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-media-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.lightbox-media {
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media img,
.lightbox-media video {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-media video {
    width: 100%;
    height: auto;
}

.lightbox-caption {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    padding: 1rem;
}

.media-counter {
    color: #ccc;
    font-size: 0.9rem;
    margin-left: 1rem;
}

/* ===== Gallery CTA ===== */
.gallery-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color), #1a252f);
    color: var(--white);
    text-align: center;
}

/* ===== Loading Animation ===== */
.gallery-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.gallery-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
