/* ==========================================
   CURRICULUM PAGE STYLES
   ========================================== */

/* Page Banner */
.page-banner {
    background-color: var(--primary-color);
    padding: 50px 0;
    text-align: center;
    color: var(--white);
    border-bottom: 3px solid var(--accent-color);
}

.page-banner h1 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.page-banner p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Wrapper for all modules */
.curriculum-wrapper {
    padding: 60px 0;
}

/* Individual Module Section */
.curriculum-module {
    margin-bottom: 75px;
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary-color);
}

.curriculum-module:last-child {
    margin-bottom: 0;
}

/* Module Typography */
.curriculum-module h2 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gold-divider {
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 12px auto 20px auto;
    border-radius: 2px;
}

.module-desc {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 35px auto;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ==========================================
   DYNAMIC CSS GRIDS FOR IMAGES
   ========================================== */
.module-gallery {
    display: grid;
    gap: 20px;
}

/* Base grid rules for different image counts */
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Image Box Styling */
.img-box {
    width: 100%;
    aspect-ratio: 4/3; /* Keeps all images uniformly shaped */
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(212, 175, 55, 0.2); /* Faint gold border */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Image element styling and hover effect */
.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.img-box:hover img {
    transform: scale(1.08); /* Zoom effect on hover */
    filter: brightness(1.1); /* Slight brighten on hover */
}

/* ==========================================
   MOBILE RESPONSIVENESS
   ========================================== */

/* Tablets (iPad, etc) */
@media (max-width: 992px) {
    /* Compress 4-col and 3-col grids down to 2 columns */
    .grid-4, .grid-3 { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .curriculum-module {
        padding: 30px 20px;
    }
}

/* Mobile Phones */
@media (max-width: 600px) {
    /* Stack everything into 1 single column */
    .grid-2, .grid-3, .grid-4 { 
        grid-template-columns: 1fr; 
    }
    
    .curriculum-module h2 {
        font-size: 1.5rem;
    }
    
    .module-desc {
        font-size: 0.95rem;
    }
}

/* ==========================================
   CURRICULUM LIGHTBOX MODAL STYLES
   ========================================== */

/* Make curriculum images look clickable */
.img-box img {
    cursor: pointer;
}

/* Fullscreen Overlay Backdrop */
.curriculum-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 37, 64, 0.95); /* Deep navy theme tint with high opacity */
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Active State */
.curriculum-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Lightbox Content Container */
.lightbox-content {
    position: relative;
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Enlarged Image */
.lightbox-content img {
    max-width: 85vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--accent-color);
}

/* Image Counter Badge (e.g. 1 / 8) */
.lightbox-counter {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--accent-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Close Button (X) */
.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--accent-color);
}

/* Navigation Arrow Buttons */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 37, 64, 0.8);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.lightbox-arrow:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* Responsive adjustments for mobile screens */
@media (max-width: 768px) {
    .lightbox-arrow {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    .lightbox-prev {
        left: 10px;
    }
    .lightbox-next {
        right: 10px;
    }
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2rem;
    }
}
