/* gallery.css - Professional Photo Gallery Styles */

/* Gallery Page Container */
.gallery-page {
    padding: 40px 0;
    background: linear-gradient(to bottom, #f5f5f5 0%, #ffffff 100%);
    min-height: 100vh;
    position: relative;
}

/* Admin Login Floating Button (Top Right) */
.admin-login-floating {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #7b2cbf 0%, #9d4edd 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(123, 44, 191, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.admin-login-floating:hover {
    background: linear-gradient(135deg, #9d4edd 0%, #7b2cbf 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(123, 44, 191, 0.6);
}

.admin-login-floating i {
    font-size: 18px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 42px;
    color: #7b2cbf;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.page-header p {
    font-size: 18px;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4/3;
    background: #f0f0f0;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(123, 44, 191, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(123, 44, 191, 0.95) 0%, rgba(123, 44, 191, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.overlay-content i {
    font-size: 48px;
    margin-bottom: 15px;
}

.overlay-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}

.overlay-content p {
    font-size: 14px;
    opacity: 0.9;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: #ff4444;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: #ff0000;
    transform: rotate(90deg) scale(1.1);
}

/* Lightbox Content */
.lightbox-content {
    max-width: 90%;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 80px;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
    margin-bottom: 15px;
}

/* Lightbox Caption */
.lightbox-caption {
    text-align: center;
    color: white;
    max-width: 600px;
}

.lightbox-caption h3 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
}

.lightbox-caption p {
    font-size: 16px;
    color: #bbb;
}

/* Lightbox Controls (Bottom Bar) */
.lightbox-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 15px 25px;
    background: rgba(123, 44, 191, 0.95);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-2px);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn i {
    font-size: 16px;
}

/* Image Counter */
.lightbox-counter {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(123, 44, 191, 0.95);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #7b2cbf;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(123, 44, 191, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: #9d4edd;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(123, 44, 191, 0.6);
}

.back-to-top i {
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .lightbox-controls {
        flex-wrap: wrap;
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 32px;
    }

    .page-header p {
        font-size: 16px;
        padding: 0 15px;
    }

    .admin-login-floating {
        top: 80px;
        right: 10px;
        padding: 10px 16px;
        font-size: 13px;
    }

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

    .lightbox-controls {
        flex-direction: column;
        gap: 8px;
        border-radius: 15px;
        padding: 12px 15px;
        max-width: 95%;
    }

    .control-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 15px;
        font-size: 13px;
    }

    .lightbox-content {
        max-height: 60vh;
        margin-bottom: 120px;
    }

    .lightbox-content img {
        max-height: 50vh;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .lightbox-counter {
        font-size: 16px;
        padding: 8px 20px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .page-header p {
        font-size: 14px;
    }

    .control-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }

    .lightbox-caption h3 {
        font-size: 18px;
    }

    .lightbox-caption p {
        font-size: 14px;
    }
}
