/*
CHANGE LOG
File: /var/www/html/cityplan.nsgia.com/static/css/visual_story.css
Document Type: CSS Stylesheet
Purpose: Styles for visual story section - SVG overlay, hero positioning, story cards
Main App: cityplan_app.py
Blueprint: front_blueprint.py
Routes: /home (visual story appears on main landing page)
Context: Separate CSS file for visual story to avoid bloating cityplan.css (1033 lines).
         Provides SVG strategy map overlay, hero text positioning, story card styling.
HTML Templates: _visual_story.html, visual_story_partials/*.html
Dependencies: Loaded after afh_main.css and cityplan.css in base.html
Version History:
2026-01-04 v1.0 - Initial creation, extracted visual story styles from cityplan.css
*/

/* =============================================================================
   STORY SECTION CONTAINER
   ============================================================================= */
.story-section {
    padding: 0 0 40px 0;
}

/* =============================================================================
   STORY CARDS
   Individual image + accordion containers
   ============================================================================= */
.story-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.story-card h4 {
    color: #006B3F;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 400;
    padding: 20px 25px 0 25px;
    margin: 0;
}

.story-intro {
    padding: 10px 25px 15px 25px;
    color: #666;
    font-style: italic;
    margin: 0;
}

/* =============================================================================
   FEATURE IMAGE WITH HERO OVERLAY
   ============================================================================= */
.feature-image {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.feature-image img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-image-container {
    position: relative;
}

/* Standard hero overlay - centered */
.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    padding: 20px;
    max-width: 90%;
}

.hero-overlay h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0 0 10px 0;
    color: white;
}

.hero-overlay p {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0;
    line-height: 1.5;
}

/* Bottom-positioned overlay - for map/land image */
.hero-overlay-bottom {
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* =============================================================================
   SVG STRATEGY MAP OVERLAY
   Positioned over hero image, transparent background
   ============================================================================= */
.strategy-map-overlay {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1200px;
    opacity: 0.95;
    pointer-events: none;
    z-index: 5;
}

.strategy-map-overlay img {
    width: 100%;
    height: auto;
}

/* When SVG overlay is present, hero text goes to TOP */
.hero-image-container:has(.strategy-map-overlay) .hero-overlay {
    top: 20px;
    bottom: auto;
    transform: translateX(-50%);
}

/* =============================================================================
   ACCORDION STYLING (Story Section Specific)
   Inherits from afh_main.css but with story-specific adjustments
   ============================================================================= */
.story-card .accordion {
    margin: 0;
    border-radius: 0;
}

.story-card .accordion:first-of-type {
    margin-top: 0;
}

.story-card .panel {
    border-radius: 0;
    border-left: none;
    padding: 0 25px;
}

.story-card .panel.open {
    padding: 20px 25px;
}

/* =============================================================================
   PANEL-SECTION (Container for nested accordions)
   Used for section-level accordions that contain sub-accordions
   ============================================================================= */
.story-card .panel-section {
    background-color: #f5f5f5;
    border-left: 4px solid #004d2d;
    padding: 0;
}

.story-card .panel-section.open {
    padding: 15px 20px;
}

/* Nested accordions inside panel-section - lighter shade */
.story-card .panel-section .accordion {
    background-color: #006B3F;
    margin-top: 10px;
    border-radius: 5px;
}

.story-card .panel-section .accordion:first-of-type {
    margin-top: 0;
}

.story-card .panel-section .accordion:hover {
    background-color: #005530;
}

.story-card .panel-section .accordion.active {
    background-color: #005530;
    border-radius: 5px 5px 0 0;
}

/* Nested panels inside panel-section */
.story-card .panel-section .panel {
    background-color: #ffffff;
    border-left: 3px solid #006B3F;
    margin-bottom: 10px;
    border-radius: 0 0 5px 5px;
}

.story-card .panel-section .panel.open {
    padding: 18px 20px;
}

/* Content directly in panel-section (not in nested accordion) */
.story-card .panel-section > p {
    margin-bottom: 15px;
}

.story-card .panel-section > table {
    margin-bottom: 15px;
}

/* =============================================================================
   PANEL CONTENT STYLING
   ============================================================================= */
.story-card .panel h4 {
    padding: 0;
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
}

.story-card .panel h4:first-child {
    margin-top: 0;
}

.story-card .panel p {
    margin-bottom: 12px;
}

.story-card .panel table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.95rem;
}

.story-card .panel th {
    background: #006B3F;
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
}

.story-card .panel td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
}

.story-card .panel tr:nth-child(even) {
    background: #f9f9f9;
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */
@media (max-width: 768px) {
    .hero-overlay h1 {
        font-size: 1.8rem;
    }
    
    .hero-overlay p {
        font-size: 1rem;
    }
    
    .strategy-map-overlay {
        width: 90%;
    }
    
    .story-card .panel {
        padding: 0 15px;
    }
    
    .story-card .panel.open {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .hero-overlay h1 {
        font-size: 1.4rem;
    }
    
    .hero-overlay p {
        font-size: 0.9rem;
    }
}
