/* ===================================
   MJEATSS Gallery Page Styles
   =================================== */

/* Hero Section */
.gallery-page .hero-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(34, 34, 34, 0.8) 100%);
    padding: 120px 0 80px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 69, 0, 0.2);
}

.gallery-page .hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.gallery-page .hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(255, 69, 0, 0.3);
    animation: fadeInDown 0.8s ease-out;
}

.gallery-page .hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Filter Section */
.gallery-page .filter-section {
    padding: 40px 0 20px;
    background: rgba(0, 0, 0, 0.3);
    position: sticky;
    top: var(--navbar-height);
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 69, 0, 0.1);
}

.gallery-page .filter-tabs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.gallery-page .filter-tab {
    background: rgba(34, 34, 34, 0.6);
    border: 2px solid rgba(255, 69, 0, 0.2);
    border-radius: 25px;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
}

.gallery-page .filter-tab:hover {
    background: rgba(255, 69, 0, 0.1);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: var(--orange-shadow);
}

.gallery-page .filter-tab.active {
    background: linear-gradient(135deg, #ff5722 0%, #ff4500 100%);
    border-color: var(--bs-primary);
    color: #ffffff;
    box-shadow: var(--orange-glow);
}

.gallery-page .filter-tab .count {
    opacity: 0.7;
    font-size: 0.9rem;
    margin-left: 4px;
}

.gallery-page .filter-tab.active .count {
    opacity: 1;
}

/* Gallery Section */
.gallery-page .gallery-section {
    padding: 60px 0 100px;
    min-height: 60vh;
}

/* Loading Spinner Container */
.gallery-page .gallery-loading-container {
    text-align: center;
    padding: 60px 20px;
}

.gallery-page .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 69, 0, 0.1);
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.gallery-page .empty-state {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.gallery-page .empty-state i {
    font-size: 4rem;
    color: rgba(255, 69, 0, 0.3);
    margin-bottom: 20px;
}

.gallery-page .empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

/* Gallery Grid */
.gallery-page .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.5s ease-out;
}

@media (max-width: 768px) {
    .gallery-page .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-page .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Gallery Item */
.gallery-page .gallery-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.gallery-page .gallery-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.gallery-page .gallery-item.hidden {
    display: none;
}

/* Image Card */
.gallery-page .image-card {
    background: rgba(34, 34, 34, 0.6);
    border: 1px solid rgba(255, 69, 0, 0.2);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
    backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-page .image-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--orange-shadow);
    border-color: var(--bs-primary);
}

.gallery-page .image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
}

.gallery-page .image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
}

.gallery-page .image-card:hover .image-wrapper img {
    transform: scale(1.05);
}

/* Image Overlay */
.gallery-page .image-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.3) 50%,
        rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-page .image-card:hover .image-overlay {
    opacity: 1;
}

.gallery-page .view-btn {
    background: var(--bs-primary);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}

.gallery-page .view-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.6);
}

/* Image Info */
.gallery-page .image-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
}

.gallery-page .image-album {
    font-weight: 600;
    color: var(--bs-primary);
    font-size: 0.9rem;
}

.gallery-page .image-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Lightbox */
.gallery-page .lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    backdrop-filter: blur(20px);
    animation: fadeIn 0.3s ease-out;
}

.gallery-page .lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lightbox Close Button */
.gallery-page .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 69, 0, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10001;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}

.gallery-page .lightbox-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.6);
}

/* Lightbox Navigation */
.gallery-page .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 69, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10001;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}

.gallery-page .lightbox-nav:hover {
    background: var(--bs-primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.6);
}

.gallery-page .lightbox-prev {
    left: 30px;
}

.gallery-page .lightbox-next {
    right: 30px;
}

.gallery-page .lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Lightbox Content */
.gallery-page .lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 120px 40px;
}

.gallery-page .lightbox-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: calc(100vh - 250px);
}

.gallery-page .lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Lightbox Info */
.gallery-page .lightbox-info {
    width: 100%;
    padding: 30px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 69, 0, 0.2);
    margin-top: 20px;
}

.gallery-page .lightbox-metadata {
    flex: 1;
}

.gallery-page .lightbox-filename {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.gallery-page .lightbox-details {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.gallery-page .lightbox-details .separator {
    margin: 0 8px;
}

.gallery-page .lightbox-counter {
    font-size: 1rem;
    color: var(--bs-primary);
    font-weight: 600;
}

/* Lightbox Actions */
.gallery-page .lightbox-actions {
    display: flex;
    gap: 15px;
    padding: 20px 0 0;
}

.gallery-page .lightbox-action-btn {
    background: rgba(34, 34, 34, 0.8);
    border: 1px solid rgba(255, 69, 0, 0.3);
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.gallery-page .lightbox-action-btn:hover {
    background: rgba(255, 69, 0, 0.2);
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.gallery-page .lightbox-action-btn i {
    font-size: 1.1rem;
}

/* Lightbox Loading */
.gallery-page .lightbox-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gallery-page .lightbox-loading.active {
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .gallery-page .hero-title {
        font-size: 2.5rem;
    }

    .gallery-page .lightbox-content {
        padding: 100px 20px 20px;
    }

    .gallery-page .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .gallery-page .lightbox-prev {
        left: 10px;
    }

    .gallery-page .lightbox-next {
        right: 10px;
    }

    .gallery-page .lightbox-info {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .gallery-page .lightbox-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .gallery-page .lightbox-action-btn {
        flex: 1;
        min-width: calc(50% - 7.5px);
        justify-content: center;
    }

    .gallery-page .filter-tabs {
        gap: 0.75rem;
    }

    .gallery-page .filter-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
