/* ========================================
   AI Transportation Dashboard Styles
   ======================================== */

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #F5F5F5;
    color: #013C68;
    line-height: 1.6;
}

/* ========================================
   HEADER STYLES
   ======================================== */
.header {
    background: linear-gradient(135deg, #013C68 0%, #356F9D 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    background-size: 50px 50px;
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    gap: 1rem;
}

.logo-container {
    flex-shrink: 0;
}

.logo-container img {
    max-height: 80px;
    width: auto;
}

.title-container {
    text-align: center;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ========================================
   LAYOUT & CONTAINER STYLES
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   SECTION STYLES
   ======================================== */
.section {
    margin: 3rem 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.section-header {
    background: linear-gradient(90deg, #013C68 0%, #356F9D 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.section-header .material-icons {
    font-size: 1.8rem;
}

.section-content {
    padding: 2rem;
}

/* ========================================
   STATISTICS GRID STYLES
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #D8E2EB 0%, #D8D7BF 100%);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #013C68;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: #356F9D;
    font-weight: 500;
}

/* ========================================
   MAP & IMAGE CONTAINER STYLES
   ======================================== */
.wordcloud-container {
    text-align: center;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.wordcloud-container h3 {
    margin-bottom: 1.5rem;
    color: #013C68;
}

.wordcloud-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========================================
   SENTIMENT EXPLANATION STYLES
   ======================================== */
.sentiment-explanation {
    background: linear-gradient(135deg, #D8E2EB 0%, #D8D7BF 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sentiment-explanation h4 {
    color: #013C68;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.sentiment-explanation p {
    color: #356F9D;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.sentiment-explanation p:last-child {
    margin-bottom: 0;
}

/* ========================================
   CHART & PLOT STYLES
   ======================================== */
.hero-plot {
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: white;
}

.hero-plot iframe {
    width: 100%;
    height: 600px;
    border: none;
}

.hero-plot-header {
    background: #D8E2EB;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E0E0E0;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-plot-header h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #013C68;
    margin: 0;
}

.hero-expand-button {
    background: #013C68;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-expand-button:hover {
    background: #356F9D;
}

/* ========================================
   PLOT GRID STYLES
   ======================================== */
.plot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.grid-plot {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.grid-plot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.grid-plot iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.plot-header {
    background: #D8E2EB;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E0E0E0;
}

.plot-header h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #013C68;
    margin: 0;
}

.expand-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #013C68;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.grid-plot:hover .expand-button {
    opacity: 1;
}

.expand-button:hover {
    background: #356F9D;
}

/* ========================================
   FULLSCREEN MODAL STYLES
   ======================================== */
.fullscreen-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.fullscreen-modal.active {
    display: block;
}

.fullscreen-content {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.fullscreen-iframe {
    width: 100%;
    height: calc(100% - 60px);
    border: none;
    background: white;
    border-radius: 8px;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.fullscreen-close:hover {
    color: #ddd;
}

/* ========================================
   RESPONSIVE DESIGN STYLES
   ======================================== */
@media (max-width: 768px) {
    /* Header adjustments for mobile */
    .header {
        padding: 2rem 1rem;
    }
    
    .logo-container img {
        max-height: 60px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    /* Plot grid adjustments for mobile */
    .plot-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-content {
        padding: 1rem;
    }
    
    /* Chart height adjustments for mobile */
    .hero-plot iframe {
        height: 400px;
    }
    
    .grid-plot iframe {
        height: 350px;
    }
    
    /* Stats grid adjustments for mobile */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    /* Additional mobile styles for very small screens */
    .header h1 {
        font-size: 1.5rem;
    }
    
    .section-header {
        padding: 1rem 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
}

/* ========================================
   ANIMATION & TRANSITION STYLES
   ======================================== */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.animate {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus,
iframe:focus {
    outline: 2px solid #356F9D;
    outline-offset: 2px;
}

/* ========================================
   INTERACTIVE MAP SPECIFIC STYLES
   ======================================== */
.interactive-map-section .grid-plot iframe {
    height: 750px;
}

@media (max-width: 768px) {
    .interactive-map-section .grid-plot iframe {
        height: 700px;
    }
}



