/*
 * Custom Styles for MCCSW Website
 * File: style.css
*/

/* 1. Global & Body Styles
-----------------------------------*/
body {
    /* Add padding to the top to prevent content from being hidden by the fixed navbar */
    padding-top: 70px;
    background-color: #f8f9fa; /* A light, neutral background for the page */
}

/* Make dark mode background darker */
[data-bs-theme="dark"] body {
    background-color: #212529;
}


/* 2. Layout Components
-----------------------------------*/

/* Style the main banner image */
.banner-image {
    object-fit: cover;
    max-height: 400px;
    border-radius: 0.5rem; /* Soften the image corners */
}

/* Card custom styling */
.card {
    border: none; /* Remove the default border to rely on shadow */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px); /* Add a subtle lift effect on hover */
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    background-color: #e9ecef; /* Light gray header for contrast */
    font-weight: 500;
}

[data-bs-theme="dark"] .card-header {
    background-color: #343a40;
}


/* 3. Specific Element Styling
-----------------------------------*/

/* Modern, tag-like layout for the "Useful Links" section */
.useful-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem; /* Creates consistent spacing between the links */
}

.useful-links-container a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 2rem; /* Creates a modern "pill" shape */
    text-decoration: none;
    color: #212529;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

[data-bs-theme="dark"] .useful-links-container a {
    background-color: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
}

.useful-links-container a:hover {
    background-color: #0d6efd; /* Bootstrap's primary blue for hover */
    color: #fff;
    border-color: #0d6efd;
}

/* NEW: Ensures rally cards in a row are the same height */
#rallies .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#rallies .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Form field focus effects */
.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}


/* 5. Photo Gallery Styles
-----------------------------------*/

/* Homepage Gallery Thumbnail Style */
#gallery .gallery-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.375rem; /* rounded-3 */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}

#gallery .gallery-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Photo Management Page Thumbnail Style */
.gallery-img-manage {
    width: 100%;
    height: 180px;
    object-fit: contain; /* Show the whole image, don't crop */
    background-color: #f8f9fa; /* Light background for any empty space */
    border-bottom: 1px solid #dee2e6;
}

[data-bs-theme="dark"] .gallery-img-manage {
    background-color: #343a40;
    border-color: #495057;
}

/* Submit button enhancement */
#submitButton:not(:disabled) {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    transition: all 0.3s ease;
}

#submitButton:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#submitButton:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Dark Mode Styles */
[data-bs-theme="dark"] {
    .bg-body-tertiary {
        background-color: #333 !important;
    }

    #dateSelection .form-check-label {
        color: #fff;
    }

    #dateSelection .form-check-input:checked {
        background-color: #007bff;
        border-color: #007bff;
    }
}