/*
===========================================================================
CHANGE LOG
File: /var/www/html/leafriver.nsgia.com/static/css/leafriver.css
Type: CSS Stylesheet
Purpose: Leaf River site-specific styles
App: leafriver_app.py
Templates: leafriver.html + sections/_sec1 through _sec8
Base CSS: afh_main.css (layout, sidebar, hero)
===========================================================================
2025-12-09 v1.0 - Initial
2025-12-09 v1.1 - Fixed images 500px centered, accordion panel.open
===========================================================================
*/

/* SECTION BASICS */
.section-intro {
    color: #5a7a8a;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.highlight-box {
    background: linear-gradient(135deg, #e8f4f8, #d4e8ed);
    border-left: 4px solid #2b6777;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

/* DATA GRID */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.data-card {
    background: #f5f9fa;
    border: 1px solid #d4e8ed;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.data-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2b6777;
}

.data-label {
    font-size: 0.9rem;
    color: #666;
}

/* IMAGES - 500px CENTERED, MODAL EXPAND */
.image-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.image-row figure {
    margin: 0;
    text-align: center;
}

.feature-image {
    margin: 1.5rem 0;
    text-align: center;
}

.image-row img,
.feature-image img,
.panel-image {
    width: 500px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #d4e8ed;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

/* MODAL EXPAND */
.image-row img.expanded,
.feature-image img.expanded,
.panel-image.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1200px;
    max-height: 90vh;
    object-fit: contain;
    z-index: 9999;
    border: none;
    border-radius: 0;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.8);
}

.panel-image {
    margin: 1rem auto;
}

figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.image-placeholder {
    background: #e8f4f8;
    border: 2px dashed #2b6777;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    color: #2b6777;
    font-weight: 600;
}

/* ACCORDION */
.accordion {
    background: #f5f9fa;
    color: #2b6777;
    cursor: pointer;
    padding: 1rem 1.25rem;
    width: 100%;
    border: 1px solid #d4e8ed;
    border-radius: 6px;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.75rem;
    transition: all 0.2s;
}

.accordion::after {
    content: '+';
    float: right;
    color: #52ab98;
}

.accordion.active::after {
    content: '−';
}

.accordion:hover {
    background: #e8f4f8;
    border-color: #52ab98;
}

.accordion.active {
    background: #2b6777;
    color: white;
    border-radius: 6px 6px 0 0;
}

.accordion.active::after {
    color: white;
}

.panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #fafcfd;
    border: 1px solid #d4e8ed;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 0 1.25rem;
}

.panel.open {
    max-height: 2000px;
}

.panel p, .panel ul, .panel ol {
    margin: 1rem 0;
}

.panel ul, .panel ol {
    padding-left: 1.5rem;
}

.panel li {
    margin-bottom: 0.5rem;
}

/* TABLES */
.data-table, .comparison-table, .timeline-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.data-table th, .data-table td,
.comparison-table th, .comparison-table td,
.timeline-table th, .timeline-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e8eb;
}

.data-table th, .comparison-table th, .timeline-table th {
    background: #2b6777;
    color: white;
    font-weight: 600;
}

.timeline-table .current-step {
    background: #e8f4f8;
    font-weight: 600;
}

/* PARCEL BOXES */
.parcel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.parcel-box {
    background: #f5f9fa;
    border: 1px solid #d4e8ed;
    border-radius: 8px;
    padding: 1.25rem;
}

.parcel-box h4 {
    color: #2b6777;
    margin: 0 0 0.5rem;
}

.parcel-box p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

.parcel-status {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.parcel-status.zone-ae { background: #ffe0b2; color: #e65100; }
.parcel-status.zone-mixed { background: #e8f4f8; color: #2b6777; }
.parcel-status.zone-clear { background: #c8e6c9; color: #2e7d32; }

.parcel-highlight {
    border-color: #52ab98;
    background: linear-gradient(135deg, #e8f8f4, #d4f0e8);
}

/* OPTION BOXES */
.option-box {
    border: 2px solid #d4e8ed;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1rem 0;
    background: #fafcfd;
}

.option-box ul { margin: 0.5rem 0; padding-left: 1.5rem; }
.option-box p { margin: 0.5rem 0; font-size: 0.95rem; }

.option-a { border-left: 5px solid #2b6777; }
.option-b { border-left: 5px solid #52ab98; }
.option-c { border-left: 5px solid #f0a500; }

/* FLOOD ZONES */
.flood-zones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.zone-box {
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
}

.zone-box h4 { margin: 0 0 0.5rem; }
.zone-box p { margin: 0.25rem 0; }

.zone-box.zone-ae {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 2px solid #ff9800;
}
.zone-box.zone-ae h4 { color: #e65100; }

.zone-box.zone-clear {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border: 2px solid #4caf50;
}
.zone-box.zone-clear h4 { color: #2e7d32; }

/* DECISION BOX */
.decision-box {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.decision-box h4 {
    margin: 0 0 0.5rem;
    color: #f57c00;
}

.decision-box.final {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #2196f3;
    text-align: center;
}

.decision-box.final h4 { color: #1565c0; }

/* SECTION NAV */
.section-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e8eb;
}

.nav-prev, .nav-next {
    color: #2b6777;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-prev:hover, .nav-next:hover {
    background: #e8f4f8;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .data-grid, .parcel-grid, .flood-zones {
        grid-template-columns: 1fr;
    }
    .image-row {
        flex-direction: column;
        align-items: center;
    }
    .section-nav {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}
