/* ==================== CHAPTERS.CSS ====================
   Specific styles for all regional chapter pages
   Relies on variables defined in styles.css
*/


/* ==================== PAGE HEADER & INTRO ==================== */

.section-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--medium-green);
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* ==================== UPDATE MESSAGE ==================== */

.update-message {
    text-align: center;
    padding: 4rem 2rem;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-light);
    background-color: var(--bg-white);
    border: 1px solid var(--light-green);
    border-radius: var(--radius-lg);
    max-width: 800px;
    margin: 3rem auto;
    box-shadow: var(--shadow-sm);
}

/* ==================== CHAPTER GALLERY ==================== */

.chapter-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

/* ==================== REGULAR FIGURE STYLES ==================== */

.chapter-gallery figure {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.chapter-gallery figure:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ==================== REGULAR IMAGE STYLES ==================== */

.chapter-gallery img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: contain;
    display: block;
}

/* ==================== FIGCAPTION STYLES ==================== */

.chapter-gallery figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    font-style: italic;
    text-align: center;
    color: var(--dark-green);
    background-color: rgba(184, 226, 163, 0.95);
    backdrop-filter: blur(4px);
    z-index: 10;
    margin: 0;
}

/* ==================== SLIDER FIGURE STYLES ==================== */

/* Remove default figure styling for slider containers */
.chapter-gallery .slider-figure {
    position: relative;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: block;
    line-height: 0; /* Remove line-height gap */
}

.chapter-gallery .slider-figure:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Style the slider container itself */
.chapter-gallery .slider-figure .slider-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; /* Round only top corners */
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    width: 100%;
    display: block;
    margin-bottom: 0; /* Remove any bottom margin */
}

/* Slider figcaption - flows naturally after container */
.chapter-gallery .slider-figure figcaption {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    margin: 0;
    margin-top: 0 !important; /* Force no top margin */
    padding: 0.875rem 1.25rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg); /* Round only bottom corners */
    box-shadow: var(--shadow-md);
    line-height: 1.6; /* Restore line-height for text */
    display: block;
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */

@media (max-width: 920px) {
    .section-subtitle {
        font-size: 1.5rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .chapter-gallery {
        gap: 2rem;
    }

    .chapter-gallery figcaption {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 600px) {
    .section-subtitle {
        font-size: 1.3rem;
    }

    .intro-text {
        font-size: 0.95rem;
    }

    .chapter-gallery figcaption {
        font-size: 0.8rem;
        padding: 0.625rem 0.875rem;
    }

    .update-message {
        font-size: 1.2rem;
        padding: 3rem 1.5rem;
    }
}
