:root {
    /* District Map Colors */
    --district-hover-fill: #ff6b6b;
    --district-hover-stroke: #e74c3c;
    --district-selected-fill: #245194;
    --district-selected-stroke: #1a3a6b;
    --district-default-stroke: #3b6a92;
    /* Muted body text — WCAG AA 4.5:1 on #fff (replaces #7f8c8d, #95a5a6) */
    --color-text-muted: #6c797a;
}

body {
    font-family: 'DM Sans', sans-serif;
    max-width: none;
    margin: 0;
    padding: 0;
    background-color: #f5f7fb;
    box-sizing: border-box;
}

/* Ensure all elements use border-box sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

.about-link {
    margin: 20px auto 0 auto;
    text-align: center;
    font-weight: bold;
}

/* App “white cards” only — not Bootstrap .container inside DE CLF header/footer */
.site-chrome.container,
main .container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: block;
    gap: 0;
    box-sizing: border-box;
    overflow: visible;
    min-width: 0;
    margin-bottom: 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

main#main-content {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.site-chrome.container {
    margin-top: 16px;
}

.result-data-container {
    
    margin: 10px 0;
}

/* 
h1 {
    background: #245194;
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-family: 'Domine', serif;
    font-weight: bold;
    font-size: 2.5em;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
 */

/* Page title inside main — same bar as home (CLF shell subpages + index in .container) */
main#main-content h1 {
    background: #245194;
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-family: 'Domine', serif;
    font-weight: bold;
    font-size: 2.5em;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

main#main-content h1 .home-icon {
    color: white !important;
}

/* When h1 is followed by nav-bar, connect them visually */
h1 + .nav-bar {
    margin-top: 0;
}

h1:has(+ .nav-bar) {
    margin-bottom: 0;
    border-radius: 10px 10px 0 0;
}

.home-icon {
    position: absolute;
    left: 20px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-icon:hover {
    color: #e3f2fd;
    transform: scale(1.1);
}

.home-icon svg {
    width: 20px;
    height: 20px;
}

/* Navigation Bar */
.nav-bar,
.site-chrome ul.nav-bar {
    background: #1a3a6b !important;
    padding: 12px 20px !important;
    margin: 0 0 20px 0 !important;
    border-radius: 10px !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.nav-bar a {
    color: white !important;
    text-decoration: none !important;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.95em;
    transition: background 0.2s ease, transform 0.2s ease, text-decoration 0.2s ease;
    display: inline-block;
}

.nav-bar a:hover,
.nav-bar a:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    text-decoration-line: underline !important;
    text-decoration-style: solid !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 0.2em;
}

.nav-bar a.active {
    background: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.site-chrome ul.nav-bar {
    margin-bottom: 0 !important;
    padding-right: 52px !important;
}

main#main-content > h1:first-child {
    margin-top: 0;
}

.nav-help-icon {
    margin: 0;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    line-height: 1;
    transition: opacity 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.nav-help-icon:hover {
    opacity: 0.8;
}

.nav-help-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Legacy: <nav class="nav-bar">…inline links + help button (performance table) */
nav.nav-bar .nav-help-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Site chrome: parent li is positioned; absolute button collapsed the row — keep button in-flow */
.site-chrome ul.nav-bar .nav-help-icon {
    position: static;
    right: auto;
    top: auto;
    transform: none;
}

@media (max-width: 768px) {
    .nav-bar {
        gap: 10px;
        padding: 10px 15px;
    }
    
    .nav-bar a {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    nav.nav-bar .nav-help-icon {
        right: 15px;
        padding: 6px;
    }
}

.help-icon {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
}

.help-icon:hover {
    color: #e3f2fd;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.help-icon svg {
    width: 20px;
    height: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #34495e;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

input[type="text"]:focus {
    border-color: #245194;
    outline: none;
}

/* Form buttons - only apply to buttons within forms or with specific classes */
form button,
button[type="submit"],
button[type="button"]:not([id]),
input[type="submit"] {
    background-color: #245194;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
}

form button:hover,
button[type="submit"]:hover,
button[type="button"]:not([id]):hover,
input[type="submit"]:hover {
    background-color: #1a3a6b;
}

form button:disabled,
button[type="submit"]:disabled,
button[type="button"]:not([id]):disabled,
input[type="submit"]:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.coordinates {
    background-color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    display: none;
}

.result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 5px;
    display: none;
    background-color: #f8f9fa;
    color: #000000;
    border: 1px solid #dee2e6;
}

.result.success {
    /* background-color: #d4edda;
    border: 1px solid #c3e6cb; */
    color: #10147f;
}

.result.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.loading {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    padding: 8px 12px;
    background-color: #fdf2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-height: 0;
}

/* Hide error message when empty */
.error-message:empty {
    display: none;
}

/* Report card link button styling - matching explore_districts_and_schools */
.report-card-link {
    display: inline-block;
    background: #245194;
    color: white !important;
    padding: 4px 8px;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
    transition: background 0.2s ease;
}

.report-card-link:hover {
    background: #1a3a6b;
    color: white !important;
    text-decoration: none !important;
}

/* School links container - matching explore_districts_and_schools */
.school-links {
    margin-top: 4px;
}

/* Result content header styling */
.result-content-header {
    font-family: 'Domine', serif;
    font-size: 1.05em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #000;
}

/* Result data styling */
.result-data {
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Responsive two-column grid layout */
.responsive-two-column-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
}

.responsive-two-column-grid div {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.responsive-two-column-grid div:nth-child(odd) {
    font-weight: bold;
    color: #2c3e50;
    background-color: #f8f9fa;
}

.responsive-two-column-grid div:nth-child(even) {
    color: #34495e;
}

.responsive-two-column-grid div:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .site-chrome.container,
    main .container {
        padding: 20px;
    }

    main#main-content {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 400px) {
    .responsive-two-column-grid {
        display: block;
    }
    
    .responsive-two-column-grid div {
        border-bottom: 1px solid #eee;
    }
    
    .responsive-two-column-grid div:nth-child(odd) {
        background-color: #f8f9fa;
        margin-top: 0.5rem;
    }
    
    .responsive-two-column-grid div:first-child {
        margin-top: 0;
    }
}


/* Alternative approach - hide when only whitespace */
.error-message:blank {
    display: none;
}

.error-message.critical {
    color: #dc2626;
    background-color: #fef2f2;
    border-color: #fca5a5;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.result-content {
    /* white-space: pre-line; */
    line-height: 1.6;
}

.result-content a {
    color: #007bff;
    text-decoration: none;
}

.result-content a:hover {
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

.help-text {
    color: #6c757d;
    font-size: 14px;
    margin-top: 10px;
    margin-bottom: 12px;
    font-style: italic;
}

/* School Item Styles - based on explore_districts_and_schools */
.school-item {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid #245194;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.school-item:hover {
    outline: 2px solid #245194;
    outline-offset: -2px;
}

.school-item::after {
    content: "📍";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.8em;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.school-item:hover::after {
    opacity: 1;
}

.school-item.selected {
    outline: 2px solid #ff9800;
    outline-offset: -2px;
}

.school-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
}

.school-details {
    font-size: 0.85em;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.school-address {
    font-size: 0.8em;
    color: var(--color-text-muted);
    margin-bottom: 4px;
    font-style: italic;
}

.school-code {
    font-size: 0.75em;
    color: var(--color-text-muted);
    font-weight: 500;
}

.school-grade-levels {
    font-size: 0.8em;
    color: #495057;
    font-weight: 500;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #e9ecef;
}

.school-links {
    margin-top: 8px;
}

.report-card-link {
    display: inline-block;
    background: #245194;
    color: white;
    padding: 4px 8px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
    transition: background 0.2s ease;
}

.report-card-link:hover {
    background: #1a3a6b;
    color: white;
    text-decoration: none;
}

.school-grade {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    margin-right: 5px;
}

/* Grade color coding */
.grade-elementary { background: #4CAF50; color: white; }
.grade-middle { background: #FF9800; color: white; }
.grade-high { background: #F44336; color: white; }
.grade-early-childhood { background: #9C27B0; color: white; }
.grade-special { background: #607D8B; color: white; }
.grade-admin { background: #795548; color: white; }



/* Safari Fix for Google Maps InfoWindow Close Button */
/* Safari doesn't render SVG content in CSS mask-image properly */
@supports (-webkit-appearance: none) {
    .gm-ui-hover-effect span[style*="mask-image"] {
        /* Fallback: Use a Unicode X character instead of masked SVG */
        mask-image: none !important;
        background-color: transparent !important;
        position: relative !important;
    }
    
    .gm-ui-hover-effect span[style*="mask-image"]::before {
        content: "×" !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        color: #fff !important;
        font-size: 16px !important;
        font-weight: bold !important;
        font-family: Arial, sans-serif !important;
        line-height: 1 !important;
        pointer-events: none !important;
        z-index: 1000 !important;
        display: block !important;
    }
}

/* Alternative approach: Force visibility of the close button in Safari */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .gm-ui-hover-effect span[style*="mask-image"] {
        background-color: #5f6368 !important;
        border-radius: 2px !important;
        opacity: 0.7 !important;
    }
    
    .gm-ui-hover-effect:hover span[style*="mask-image"] {
        opacity: 1 !important;
    }
    
    .gm-ui-hover-effect span[style*="mask-image"]::after {
        content: "✕" !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        color: #5f6368 !important;
        font-size: 18px !important;
        font-weight: bold !important;
        line-height: 1 !important;
        pointer-events: none !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Help Modal Styles */
.modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

/* Specific styles for help modal to ensure proper popup behavior */
#helpModal {
    display: block !important;
    position: fixed !important;
    z-index: 1000 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: auto !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

#helpModal.hidden {
    display: none !important;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    background: #245194;
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Domine', serif;
    font-size: 1.5em;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #e3f2fd;
}

.modal-body {
    padding: 30px;
    line-height: 1.6;
}

.modal-body h3 {
    color: #245194;
    margin-top: 25px;
    margin-bottom: 10px;
    font-family: 'Domine', serif;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 15px;
    color: #333;
}

.modal-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
    color: #333;
}

.modal-body strong {
    color: #245194;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.3em;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* ========================================
   INDEX PAGE STYLES (namespaced)
   ======================================== */

/* Index page: full-bleed canvas; centered column via main / site-chrome */
body.index-page {
    font-family: 'DM Sans', sans-serif;
    max-width: none;
    margin: 0;
    padding: 0;
    background-color: #f5f7fb;
    min-height: 100vh;
}

/* Index page container */
.index-page main .container,
.index-page .site-chrome.container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 1200px;
}

.index-page .site-chrome.container {
    margin-bottom: 20px;
}

/* Match site-chrome width: global main#main-content horizontal padding would inset the card only */
.index-page main#main-content {
    max-width: 1200px;
    padding-left: 0;
    padding-right: 0;
}

/* Same alignment on other CLF shell pages (nav is body-level; main padding was narrowing content) */
.find-page main#main-content,
.boundaries-page main#main-content,
.districts-schools-explorer main#main-content,
.about-page main#main-content {
    padding-left: 0;
    padding-right: 0;
}

/* Index page subtitle */
.index-page .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.2em;
}

/* Index page project description */
.index-page .project-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

/* Index page app grid */
.index-page .app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Index page app cards */
.index-page .app-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.index-page .app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #3498db;
    border-radius: 0 10px 10px 0;
}

.index-page .app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #3498db;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.index-page .app-card:hover::before {
    transform: scaleY(1);
}

/* Index page app name */
.index-page .app-name {
    font-size: 1.4em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.index-page .app-name svg {
    flex-shrink: 0;
}

/* Index page app description */
.index-page .app-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Index page app links */
.index-page .app-link {
    display: inline-block;
    background: #245194;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-weight: 500;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.index-page .app-link:hover {
    background: #1a3a6b;
    transform: translateY(-2px);
}

.index-page .app-link::after {
    content: ' →';
    font-size: 0.9em;
}

/* Index page footer */
.index-page .footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    color: #666;
}

/* Index page about button */
.index-page .about-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
    transition: background 0.3s ease;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
}

.index-page .about-button:hover {
    background: #5a6268;
}

/* Index page modal styles */
.index-page .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.index-page .modal:not(.hidden) {
    display: block;
}

.index-page .modal.hidden {
    display: none;
}

.index-page .modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.index-page .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.index-page .modal-title {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    margin: 0;
    font-family: 'Domine', serif;
}

.index-page .close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.index-page .close:hover,
.index-page .close:focus {
    color: #000;
    text-decoration: none;
}

.index-page .modal-body {
    line-height: 1.6;
    color: #555;
    font-family: 'DM Sans', sans-serif;
}

.index-page .modal-body h3 {
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
    font-family: 'Domine', serif;
    font-weight: 600;
}

.index-page .modal-body ul {
    margin: 10px 0;
    padding-left: 20px;
}

.index-page .modal-body li {
    margin: 5px 0;
}

/* Index page responsive styles */
@media (max-width: 768px) {
    .index-page .app-grid {
        grid-template-columns: 1fr;
    }
    
    .index-page main .container,
    .index-page .site-chrome.container {
        padding: 20px;
    }
    
    main#main-content h1 {
        font-size: 2em;
    }
}

/* ========================================
   DATA DICTIONARY PAGE STYLES (namespaced)
   ======================================== */

/* Data dictionary page specific body styles */
.data-dictionary-page {
    font-family: 'DM Sans', sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f7fb;
    line-height: 1.6;
}

/* Data dictionary page container */
.data-dictionary-page .container,
.data-dictionary-page header.container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Data dictionary page h1 (overrides global) */
.data-dictionary-page h1 {
    background: #245194;
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-family: 'Domine', serif;
    font-weight: bold;
    font-size: 2.5em;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Data dictionary page home icon (overrides global) */
.data-dictionary-page .home-icon {
    position: absolute;
    left: 20px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.data-dictionary-page .home-icon:hover {
    color: #e3f2fd;
    transform: scale(1.1);
}

/* Data dictionary page specific styles */
.data-dictionary-page .intro {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #245194;
}

.data-dictionary-page .category {
    margin-bottom: 40px;
}

.data-dictionary-page .category h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    font-family: 'Domine', serif;
}

.data-dictionary-page .metric {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #245194;
}

.data-dictionary-page .metric-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.data-dictionary-page .metric-description {
    color: #555;
    margin-bottom: 10px;
}

.data-dictionary-page .metric-context {
    background: white;
    padding: 15px;
    border-radius: 6px;
    font-style: italic;
    color: var(--color-text-muted);
    margin-top: 10px;
}

.data-dictionary-page .note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 6px;
}

.data-dictionary-page .toc {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.data-dictionary-page .toc h3 {
    margin-top: 0;
    color: #2c3e50;
}

.data-dictionary-page .toc ul {
    list-style: none;
    padding-left: 0;
}

.data-dictionary-page .toc li {
    margin: 8px 0;
}

.data-dictionary-page .toc a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.data-dictionary-page .toc a:hover {
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

/* ========================================
   BOUNDARIES PAGE STYLES (namespaced)
   ======================================== */

/* Boundaries page: full-bleed CLF; center column in main / nav */
.boundaries-page {
    font-family: 'DM Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f7fb;
}

.boundaries-page main#main-content {
    max-width: 1600px;
}

/* Boundaries intro blurb (namespaced — not generic .container; avoids WP/Avada clashes) */
.boundaries-page .districts-boundaries-intro,
.boundaries-page main .container,
.boundaries-page .site-chrome.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* Boundaries page two-pane container */
.boundaries-page .two-pane-container {
    display: flex;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.boundaries-page .left-pane {
    flex: 0 0 calc(50% - 10px);
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.boundaries-page .right-pane {
    flex: 0 0 calc(50% - 10px);
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    box-sizing: border-box;
}

.boundaries-page .subtitle {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2em;
}

.boundaries-page .filter-section {
    margin-bottom: 20px;
}

.boundaries-page .filter-group {
    margin-bottom: 15px;
}

.boundaries-page .filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.boundaries-page .filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    background: white;
}

.boundaries-page #mapContainer {
    width: 100%;
    height: 800px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.boundaries-page .school-link {
    color: #245194;
    text-decoration: none;
    font-weight: 600;
}

.boundaries-page .school-link:hover {
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

.boundaries-page .school-name {
    color: #245194;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s ease;
}

.boundaries-page .school-name:hover {
    color: #1a3a6b;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

.boundaries-page .district-name {
    color: #2c3e50;
    cursor: pointer;
    transition: color 0.2s ease;
}

.boundaries-page .district-name:hover {
    color: #245194;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

/* Highlight selected school row */
.boundaries-page #schoolsTable tbody tr.selected-school {
    background-color: #e3f2fd !important;
    border-left: 4px solid #2196F3;
}

.boundaries-page #schoolsTable tbody tr.selected-school td {
    font-weight: 600;
}

.boundaries-page .level-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.boundaries-page .level-Elementary { background: #e8f5e9; color: #2e7d32; }
.boundaries-page .level-Middle { background: #e3f2fd; color: #1976d2; }
.boundaries-page .level-High { background: #fff3e0; color: #e65100; }
.boundaries-page .level-EarlyChildhood { background: #fce4ec; color: #c2185b; }

/* Boundaries page responsive */
@media (max-width: 1300px) {
    .boundaries-page .left-pane {
        flex: 0 0 calc(60% - 10px); /* 3/5 = 60% */
    }
    
    .boundaries-page .right-pane {
        flex: 0 0 calc(40% - 10px); /* 2/5 = 40% */
    }
}

@media (max-width: 1000px) {
    .boundaries-page .two-pane-container {
        flex-direction: column;
    }
    
    .boundaries-page .left-pane,
    .boundaries-page .right-pane {
        flex: 1 1 100%;
    }
}

/* ========================================
   ABOUT PAGE STYLES
   ======================================== */

.about-page .about-content {
    padding: 30px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.about-page .about-content p {
    margin-bottom: 15px;
    color: #333;
}

.about-page .about-content p:first-child {
    margin-top: 0;
}

.about-page .about-content p:last-child {
    margin-bottom: 0;
}

.about-page .about-content strong {
    color: #245194;
}

.about-page .about-content a {
    color: #245194;
    text-decoration: none;
    font-weight: 500;
}

.about-page .about-content a:hover {
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}
