/* --- Global Reset & Typography --- */
body, .usa-label, .usa-button, h1, h2, h3, select, input {
    font-family: "Public Sans Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}
/* --- Global Font Size Reduction --- */
html {
    font-size: 14px; /* Reduced from default 16px to shrink overall scale */
}

body, .usa-label, .usa-button, h1, h2, h3, select, input {
    font-family: "Public Sans Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* --- Header & Hero Adjustments --- */
.header-title {
    font-size: 1.25rem; /* Reduced from 1.5rem */
}

.hero-section {
    padding: 1.5rem 1rem !important; /* Tightened padding */
}

.font-heading-xl {
    font-size: 1.8rem !important; /* Scaled down heading */
}

.usa-intro {
    font-size: 1.1rem !important; /* Reduced intro text size */
}

/* --- Info Section & Cards --- */
.info-section {
    padding: 1rem 2rem !important;
}

.info-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.info-content p, .info-content li {
    font-size: 0.95rem;
    line-height: 1.4;
}

.tool-card {
    width: 380px;
    padding: 1.5rem; /* Reduced padding inside cards */
}

    .tool-card h3 {
        font-size: 1.15rem;
    }

    .tool-card p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

.usa-button--big {
    padding: 0.6rem 1.5rem; /* Smaller button footprint */
}
body {
    background-color: #ffffff;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* --- Shared Header & Footer --- */
.header-custom {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
}

.header-logo {
    height: 45px;
    margin-right: 2.5rem;
    display: block;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    margin: 0;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.maryland-footer {
    width: 100%;
    margin-top: auto;
}

/* --- Common UI Components --- */
.instruction-banner {
    background-color: #fff9e6;
    border-left: 5px solid #fcd116;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

/* --- Index Page Specifics --- */
.hero-section {
    padding: 4rem 2rem;
    background: #fcfcfc;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.info-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.info-content {
    background-color: #f9f9fb;
    padding: 2rem;
    border-left: 5px solid #005ea2;
    border-radius: 4px;
}

.card-grid {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    padding: 2rem 2rem 4rem 2rem;
    flex-wrap: wrap;
}

.tool-card {
    width: 400px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dfe1e2;
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
}

    .tool-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }

.source-footer {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    padding-bottom: 3rem;
}

/* --- Dashboard & Plotting Layouts --- */
.dashboard-container, #myChartWrapper {
    max-width: 1200px;
    margin: 2rem auto;
    background: white;
    padding: 20px;
}

#myChartWrapper {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
    border: 1px solid #eee;
}

/* Dashboard Control Rows */
.controls-row, .controls {
    display: flex;
    gap: 20px;
    background: #f0f0f0;
    padding: 20px;
    border-radius: 6px;
    align-items: flex-end;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.control-group, .usa-form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

/* Specific sizing for Date Range to prevent clipping */
.control-date {
    flex: 2;
    min-width: 300px;
}

/* Container for Leaflet Map and Highcharts */
#map, #chartContainer, #graphcontainer {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #dfe1e2;
    background: #ffffff;
}

#map {
    height: 480px;
    margin-bottom: 20px;
    z-index: 1;
}

#chartContainer, #graphcontainer {
    min-height: 400px;
    margin-top: 2rem;
    padding: 1rem;
}

/* Daterangepicker z-index fix */
.daterangepicker {
    z-index: 10001 !important;
}
#waste-water-dashboard {
    display: flex;
    flex-direction: column;
    min-height: 50vh; /* Adjusted for embedding */
    font-family: 'Public Sans Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
}

    /* Targeted overrides for embedded view */
    #waste-water-dashboard .hero-section {
        padding: 2rem 1rem !important;
        background-color: #f0f0f0;
        text-align: center;
    }

    #waste-water-dashboard .info-section {
        padding: 1.5rem 2rem !important;
    }

    #waste-water-dashboard .card-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
        padding: 1rem 2rem 2rem 2rem !important;
    }

    #waste-water-dashboard .tool-card {
        border: 1px solid #dfe1e2;
        padding: 1.5rem;
        border-radius: 4px;
    }

    #waste-water-dashboard .source-footer {
        font-size: 0.875rem;
        color: #565c65;
        padding: 1rem 2rem;
        border-top: 1px solid #dfe1e2;
    }
/* Targeted overrides to reduce scrolling */
.hero-section {
    padding: 2rem 1rem !important;
}

.info-section {
    padding: 1.5rem 2rem !important;
}

.card-grid {
    padding: 1rem 2rem 2rem 2rem !important;
}