/* Custom Styles for Image Gallery */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Gallery Styles */
.gallery-container {
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    height: 100%;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-image {
    opacity: 0.9;
}

.image-info {
    padding: 15px;
}

.image-info h5 {
    margin-bottom: 5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal Zoom Functionality */
.zoom-image {
    transition: transform 0.3s ease;
    transform-origin: center;
}

.modal-body {
    overflow: auto;
    max-height: 70vh;
}

.zoom-controls {
    display: flex;
    gap: 10px;
    margin-right: auto;
}

/* Upload Form Styles */
.upload-area {
    margin-bottom: 20px;
}

.upload-area-inner {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.upload-area-inner:hover, .upload-area-inner.highlight {
    border-color: #0d6efd;
    background-color: #f0f7ff;
}

.preview-image {
    height: 120px;
    object-fit: cover;
}



/* Responsive Adjustments */
@media (max-width: 767px) {
    .gallery-image {
        height: 160px;
    }
    
    .preview-image {
        height: 100px;
    }
    
    header {
        padding: 40px 0;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
}

/* Animation for gallery items */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-item {
    animation: fadeIn 0.5s ease forwards;
}

.gallery-container .col-md-4:nth-child(3n+1) .gallery-item {
    animation-delay: 0.1s;
}

.gallery-container .col-md-4:nth-child(3n+2) .gallery-item {
    animation-delay: 0.2s;
}

.gallery-container .col-md-4:nth-child(3n+3) .gallery-item {
    animation-delay: 0.3s;
}