/* ============================================
   GALLERY PAGE STYLES
   ============================================ */

.upload-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 2px solid rgba(16, 185, 129, 0.3);
    margin-bottom: 3rem;
    padding: 2rem;
}

.upload-section h3 {
    color: #10b981;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Upload Label */
.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(16, 185, 129, 0.05);
    border: 2px dashed rgba(16, 185, 129, 0.5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #999;
}

.upload-label:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.upload-label input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 2rem;
}

.upload-label span:last-child {
    font-weight: 600;
}

/* Form Control */
.form-control {
    padding: 0.8rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.05);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-toggle {
    padding: 0.7rem 1.5rem;
    background: none;
    border: 2px solid rgba(16, 185, 129, 0.5);
    color: #999;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-toggle:hover {
    border-color: #10b981;
    color: #10b981;
}

.btn-toggle.active {
    background: #10b981;
    border-color: #10b981;
    color: #000;
}

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

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(30, 58, 138, 0.3);
}

.gallery-item:hover {
    border-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-overlay-button {
    padding: 0.5rem 1rem;
    background: #10b981;
    color: #000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gallery-overlay-button:hover {
    background: #0a9470;
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    color: #fff;
    font-size: 0.9rem;
    max-height: 80px;
    overflow: hidden;
}

/* Gallery Slider */
.gallery-slider {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
}

.slider-btn {
    padding: 0.8rem 1.2rem;
    background: #10b981;
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: #0a9470;
    transform: scale(1.1);
}

.slider-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.slider-image-container {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

.slider-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-caption {
    color: #10b981;
    font-weight: 600;
    font-size: 1rem;
}

.slider-indicators {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.slider-indicator {
    width: 8px;
    height: 8px;
    background: rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-indicator.active {
    background: #10b981;
    width: 24px;
    border-radius: 4px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    right: 2rem;
    top: 2rem;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #10b981;
}

.lightbox-image-container {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightboxImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 1rem;
    background: rgba(16, 185, 129, 0.8);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.lightbox-btn:hover {
    background: #10b981;
}

.lightbox-btn.prev {
    left: 2rem;
}

.lightbox-btn.next {
    right: 2rem;
}

.lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    max-width: 80%;
    font-size: 1.1rem;
}

.lightbox-delete {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    padding: 0.8rem 1.5rem;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lightbox-delete:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(16, 185, 129, 0.3);
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

    .gallery-slider {
        flex-direction: column;
        gap: 1rem;
    }

    .slider-btn {
        width: 100%;
    }

    .lightbox-btn {
        padding: 0.6rem;
        font-size: 1.2rem;
    }

    .lightbox-btn.prev {
        left: 1rem;
    }

    .lightbox-btn.next {
        right: 1rem;
    }

    .lightbox-delete {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
