/*
CHANGE LOG
File: /static/css/afh_main.css
Document Type: CSS Stylesheet
Purpose: Main styling for Affordable Housing Partnership presentation
Main App: grants_app.py or housing_app.py
Blueprint: housing_blueprint.py
Routes: /affordable-housing-partnership
Context: Professional styling for PHA-focused housing development presentation
HTML Templates: affordable_housing_partnership.html
Dependencies: None
Version History:
2025-01-19 v1.0 - Initial creation with card-based layout and professional styling
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8f9fa;
    scroll-behavior: smooth;
}

/* Container and Layout */
.afh-main-container {
    min-height: 100vh;
}

/* Sidebar Navigation */
.afh-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
    color: white;
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.afh-sidebar-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.afh-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.afh-sidebar-header p {
    margin: 5px 0 0 0;
    font-size: 12px;
    opacity: 0.8;
    color: rgba(255,255,255,0.8);
}

.afh-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.afh-sidebar li {
    margin-bottom: 8px;
}

.afh-sidebar a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.afh-sidebar a:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateX(5px);
    text-decoration: none;
}

.afh-sidebar a.active {
    background-color: rgba(255,255,255,0.2);
    border-left-color: #90cdf4;
}

/* Main Content Area */
main {
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
}

/* Hero Section */
.afh-hero {
    text-align: center;
    margin-bottom: 60px;
    padding: 60px 0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.afh-hero h1 {
    color: #2c5282;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.afh-hero-subtext {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.afh-hero-cta {
    margin-top: 30px;
}

.afh-primary-cta {
    display: inline-block;
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.2);
}

.afh-primary-cta:hover {
    background: linear-gradient(135deg, #2a4f7c 0%, #2c7bb8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 82, 130, 0.3);
    text-decoration: none;
    color: white;
}

/* Use Cases Section */
.afh-use-cases-section {
    margin-bottom: 60px;
}

.afh-use-cases-section h2 {
    color: #2c5282;
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.afh-section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.afh-use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.afh-use-case-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
}

.afh-use-case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    text-decoration: none;
    color: inherit;
}

/* SVG card icons – 50% smaller, no cropping */
.afh-use-case-card img[src$=".svg"] {
    height: 100px;        /* was 200px */
    width: auto;          /* prevent stretch */
    object-fit: contain;  /* don't crop vector art */
    display: block;
    margin: 12px auto 0;  /* center within card top */
    background-color: #f7fafc;
}

.afh-use-case-content { padding: 20px; }  /* was 24px */



.afh-use-case-content {
    padding: 24px;
}

.afh-use-case-content h3 {
    color: #2c5282;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.afh-use-case-content p {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Answer Sections */
.afh-answers {
    margin-top: 60px;
}

.afh-answers h2 {
    color: #2c5282;
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 50px;
}

.afh-answer-section {
    background: white;
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    scroll-margin-top: 20px;
}

.afh-answer-section h2 {
    color: #2c5282;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: left;
}

.afh-answer-section h3 {
    color: #2c5282;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 30px 0 15px 0;
}

.afh-answer-section p {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.afh-answer-section ul {
    color: #4a5568;
    margin-left: 20px;
    margin-bottom: 20px;
}

.afh-answer-section ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.afh-answer-section ul li strong {
    color: #2c5282;
    font-weight: 600;
}

/* Example Metrics */
.afh-example-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.afh-metric {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.afh-metric-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c5282;
    margin-bottom: 8px;
}

.afh-metric-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Back to Top */
.afh-back-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.afh-back-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.afh-back-top-btn:hover {
    background: linear-gradient(135deg, #2a4f7c 0%, #2c7bb8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 82, 130, 0.4);
}

.afh-back-top {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.afh-back-link {
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.afh-back-link:hover {
    color: #2c5282;
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .afh-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 260px;
    }
    
    .afh-sidebar.open {
        transform: translateX(0);
    }
    
    main {
        margin-left: 0;
        padding: 20px;
    }
    
    .afh-hero {
        padding: 40px 20px;
        margin-bottom: 40px;
    }
    
    .afh-hero h1 {
        font-size: 2rem;
    }
    
    .afh-hero-subtext {
        font-size: 1rem;
    }
    
    .afh-use-cases-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .afh-answer-section {
        padding: 24px;
    }
    
    .afh-example-metrics {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        padding: 20px;
    }
    
    .afh-metric-number {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .afh-hero h1 {
        font-size: 1.8rem;
    }
    
    .afh-use-cases-section h2 {
        font-size: 1.8rem;
    }
    
    .afh-answer-section h2 {
        font-size: 1.5rem;
    }
    
    .afh-example-metrics {
        grid-template-columns: 1fr;
    }
}
