/* ========== Gallery Styles ========== */
.page-title {
    text-align: center;
    margin: 100px 0 30px 0;
    color: #2c3e50;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.gallery-intro {
    text-align: center;
    margin-bottom: 30px;
    color: #555;
    line-height: 1.6;
}

.gallery-wrapper {
    margin: 30px 0;
}

.gallery-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    border-bottom: 2px solid #ffbd59;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
}

.gallery-item.hidden {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: fadeIn 0.5s forwards;
    animation-delay: 0.2s;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Show More/Less Button */
.show-more-btn {
    display: block;
    width: 180px;
    margin: 20px auto;
    padding: 10px 15px;
    background-color: #ffbd59;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    font-weight: 600;
}

.show-more-btn:hover {
    background-color: #0c2759;
    transform: scale(1.05);
}

/* Animation for revealing images */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-item.fade-in {
    animation: fadeIn 0.5s forwards;
}

/* ========== Admin Upload Form Styles ========== */
.admin-section {
    background-color: #f8f9fa;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 30px;
}

.admin-form,
.upload-form {
    max-width: 500px;
    margin: 0 auto;
}

/* Form Groups */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
}

/* ========== Buttons ========== */
.btn,
.upload-btn {
    padding: 10px 15px;
    background-color: #ffbd59;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover,
.upload-btn:hover {
    background-color: #0c2759;
    transform: scale(1.02);
}

/* ========== Alerts ========== */
.alert {
    padding: 15px;
    margin: 20px auto;
    border-radius: 5px;
    max-width: 600px;
    text-align: center;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeInAlert 0.5s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========== Upload Form Card for Users ========== */
.upload-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin: 30px auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease-out;
}

.upload-title {
    font-size: 28px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.upload-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* Upload Form Specific */
.upload-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.upload-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-form .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border 0.3s ease;
}

.upload-form .form-control:focus {
    border-color: #ffbd59;
    outline: none;
}

/* Upload Button */
.upload-btn {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    background-color: #ffbd59;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.upload-btn:hover {
    background-color: #0c2759;
    transform: scale(1.03);
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInAlert {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Slide in animation for the card */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Responsive Media Queries ========== */
/* Large tablets and small desktops */
@media screen and (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 15px;
    }
}

/* Tablets */
@media screen and (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 15px;
    }
    
    .container {
        width: 95%;
    }
}

/* Mobile phones */
@media screen and (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
        grid-gap: 20px;
    }
    
    .gallery-item img {
        height: 250px;
    }
    
    .page-title {
        margin: 70px 0 20px 0;
        font-size: 24px;
    }
    
    .section-title {
        font-size: 20px;
    }
}