/* ==========================================================================
   Base & Variables
   ========================================================================== */

:root {
    /* Colors */
    --primary-yellow: #f5ee6b;
    --primary-dark: #161819;
    --neutral-white: #ffffff;
    --neutral-light-grey: #f8f9fa;
    /* Lighter grey for backgrounds */
    --neutral-medium-grey: #adb5bd;
    /* Mid grey adjusted for info icons/borders */
    --neutral-dark-grey: #343a40;
    /* Darker grey */
    --accent-tan: #dbc193;
    --accent-orange: #f98c3d;
    /* Estimated from mockup */
    --accent-blue-map: #87ceeb;
    /* Light blue for arrival paths */
    --accent-orange-map: #ffdcb1;
    /* Light orange for departure paths */
    --text-on-dark: var(--neutral-white);
    --text-on-light: var(--primary-dark);
    --link-color: var(--primary-dark);
    --link-hover-color: var(--neutral-dark-grey);
    --info-icon-color: var(--neutral-medium-grey);

    /* Typography */
    --font-size-base: 1rem;
    /* 16px */
    --font-size-lg: 1.25rem;
    --font-size-sm: 0.875rem;
    /* 14px */
    --font-size-xs: 0.75rem;
    /* 12px - For subtitles */
    --font-size-xl: 1.5rem;
    --font-size-h1: 2.5rem;
    --font-size-h2: 2rem;
    --font-size-h3: 1.75rem;
    --font-size-h4: 1.25rem;
    /* Adjusted H4 size for sidebar titles etc */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-base: 1.6;
    --line-height-heading: 1.3;
    --line-height-tight: 1.2;

    /* Spacing */
    --spacer: 1rem;
    /* Base spacing unit */
    --spacer-1: calc(var(--spacer) * 0.25);
    /* 4px */
    --spacer-2: calc(var(--spacer) * 0.5);
    /* 8px */
    --spacer-3: var(--spacer);
    /* 16px */
    --spacer-4: calc(var(--spacer) * 1.5);
    /* 24px */
    --spacer-5: calc(var(--spacer) * 2);
    /* 32px */
    --spacer-6: calc(var(--spacer) * 3);
    /* 48px */

    /* Borders */
    --border-width: 1px;
    --border-color: var(--neutral-medium-grey);
    --border-radius: 8px;
    /* Consistent corner rounding */
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --border-radius-pill: 50rem;

    /* Box Shadow */
    --box-shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .075);
    --box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .175);

    /* Transitions */
    --transition-base: all 0.2s ease-in-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    /* Typically 16px */
}

*:focus {
    outline: 0 none !important;
    box-shadow: none;
}

body {
    margin: 0;
    color: var(--text-on-light);
    background-color: var(--neutral-light-grey);
    /* Default background */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html,
body {
    max-height: 100vh !important;
    /* never exceed the viewport */
}

/* ==========================================================================
      Typography
      ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: var(--spacer-3);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-heading);
    color: var(--primary-dark);
}

h1 {
    font-size: var(--font-size-h1);
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

h4 {
    font-size: var(--font-size-h4);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

p {
    margin-top: 0;
    margin-bottom: var(--spacer-3);
}

a {
    color: var(--link-color);
    text-decoration: none;
    /* Remove default underline */
    transition: var(--transition-base);
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

strong,
b {
    font-weight: var(--font-weight-bold);
}

/* ==========================================================================
      Layout & Container
      ========================================================================== */

.ca-map {
    height: 100vh;
}

.container {
    width: 100%;
    padding-right: var(--spacer-4);
    padding-left: var(--spacer-4);
    margin-right: auto;
    margin-left: auto;
}

/* Override conflicting styles on the outermost map container */
.ca-map.vvc-map-section {
    display: block;
    /* Override display: flex */
    height: auto;
    /* Let the wrapper control the height relative to viewport */
    width: 100%;
}

/* Bootstrap Breakpoints (example, adjust as needed) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {

    /* Increased container width for wider screens if needed */
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Map Layout Specifics */
.vvc-map-section .ca-map-wrapper {
    display: flex;
    position: relative;
    /* Adjust height calculation if header/footer height changes */
    height: 100vh;
    /* Example: Adjust if header/nav height is ~100px */
    gap: 0;
}

.vvc-sidebar {
    /* Styles applied via <aside class="ca-map-sidebar"> */
    width: 320px;
    flex-shrink: 0;
    background-color: var(--primary-dark);
    color: var(--text-on-dark);
    height: 100%;
    /* Takes height from wrapper */
    overflow-y: auto;
    padding: 0;
    border-radius: 0;
    margin-left: 0;
    transition: margin-left var(--transition-sidebar);
}

/* Resetting potential conflicting styles from original template */
.ca-map-sidebar .sidebar-container,
.ca-map-sidebar .sidebar-wrapper {
    height: 100%;
    transform: none !important;
    /* Override any transforms */
    background: var(--primary-dark)
}

.vvc-map-container {
    /* Styles applied via <div class="ca-map-container"> */
    flex-grow: 1;
    position: relative;
    height: 100%;
    background-color: var(--neutral-light-grey);
    border-radius: 0;
}

.vvc-map-container .ca-map-mapbox {
    width: 100%;
    height: 100%;
}


/* ==========================================================================
      Components
      ========================================================================== */

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-base);
    color: var(--text-on-light);
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: var(--border-width) solid transparent;
    padding: var(--spacer-2) var(--spacer-4);
    /* Base padding */
    font-size: var(--font-size-base);
    /* Base font size */
    border-radius: var(--border-radius);
    transition: var(--transition-base);
}

.btn:hover {
    text-decoration: none;
}

.btn.btn-sm {
    /* Override if .btn-sm is still used elsewhere */
    padding: var(--spacer-2) var(--spacer-2);
    font-size: var(--font-size-sm);
}

/* Dark Button Variation */
.btn-dark {
    color: var(--text-on-dark);
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-dark:hover {
    color: var(--text-on-dark) !important;
    background-color: var(--neutral-dark-grey ) !important;
    border-color: var(--neutral-dark-grey);
}

.btn-dark:active {
    background-color: var(--neutral-light-grey) !important;
    border-color: var(--neutral-light-grey);
    color: var(--text-on-dark) !important;
}


.btn-dark:focus {
    color: var(--text-on-dark) !important;
    background-color: var(--neutral-dark-grey);
    border-color: var(--neutral-dark-grey);
}


/* Primary Button Style */
.btn-primary {
    color: var(--primary-dark);
    background-color: var(--neutral-white);
    border-color: var(--neutral-white);
}

.btn-primary:hover {
    background-color: var(--neutral-light-grey);
    border-color: var(--neutral-light-grey);
    color: var(--primary-dark);
}

/* Outline Button Style */
.btn-outline-dark {
    color: var(--primary-dark);
    border-color: var(--primary-dark);
    background-color: transparent;
}

.btn-outline-dark:hover {
    color: var(--neutral-white);
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Pill/Tab Style Buttons */
.btn-pill {
    border-radius: var(--border-radius-pill);
    padding: var(--spacer-2) var(--spacer-4);
}

.btn-pill.active,
.btn-pill:active {
    background-color: var(--primary-yellow);
    border-color: var(--primary-yellow);
    color: var(--primary-dark);
    /* Changed to dark text on yellow */
}

/* --- Forms --- */
/* Hide Bootstrap's visual radio/check implementation */
.btn-check {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

/* --- Cards --- */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--neutral-white);
    background-clip: border-box;
    border: none;
    /* No border by default */
    border-radius: var(--border-radius);
    margin-bottom: var(--spacer-5);
    /* Spacing between cards */
    color: var(--text-on-light);
    transition: var(--transition-base);
}

.card-body {
    flex: 1 1 auto;
    padding: var(--spacer-5);
    /* Generous padding */
}

.card-title {
    margin-bottom: var(--spacer-2);
    font-size: var(--font-size-h4);
    /* Using H4 size for card titles */
    font-weight: var(--font-weight-bold);
}

.card-text {
    font-size: var(--font-size-base);
    color: var(--neutral-medium-grey);
    /* Subdued color for byline */
    margin-bottom: 0;
    /* Adjust if needed */
}

.card-dark {
    background-color: var(--primary-dark);
    color: var(--text-on-dark);
}

.card-dark .card-title {
    color: var(--text-on-dark);
}

.card-dark .card-text {
    color: rgba(255, 255, 255, 0.7);
    /* Lighter grey for byline on dark */
}

.card-dark .card-link-arrow {
    color: var(--neutral-white);
}

.card-link {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    /* Ensure link covers card */
    border-radius: var(--border-radius);
    /* Match card rounding */
}

.card-link-arrow {
    position: absolute;
    top: var(--spacer-5);
    right: var(--spacer-5);
    font-size: var(--font-size-xl);
    /* Arrow size */
    color: var(--primary-dark);
    transition: transform 0.2s ease-in-out;
}

.card:hover .card-link-arrow {
    transform: translateX(5px);
    /* Subtle hover effect on arrow */
}

.card-header-tags {
    display: flex;
    gap: var(--spacer-2);
    margin-bottom: var(--spacer-3);
}


/* --- Tags / Pills / Badges --- */
.tag,
.badge {
    display: inline-block;
    padding: var(--spacer-1) var(--spacer-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--border-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-dark {
    color: var(--text-on-dark);
    background-color: var(--neutral-dark-grey);
}

.tag-light {
    color: var(--text-on-light);
    background-color: var(--neutral-white);
    border: var(--border-width) solid var(--neutral-medium-grey);
    /* Slight border for contrast on yellow */
}

.tag-yellow {
    color: var(--text-on-light);
    background-color: var(--primary-yellow);
}

/* --- Project Browse Grid --- */
.project-browse-section {
    padding: var(--spacer-6) 0;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Responsive grid */
    gap: var(--spacer-5);
}


/* --- Job Opportunity Banner --- */
.job-banner {
    background-color: var(--primary-dark);
    color: var(--text-on-dark);
    padding: var(--spacer-5);
    margin-top: var(--spacer-6);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: var(--spacer-5);
}

.job-banner-img img {
    display: block;
    max-width: 100px;
    /* Adjust as needed */
    height: auto;
    border-radius: var(--border-radius-sm);
}

.job-banner-content {
    flex-grow: 1;
}

.job-banner-tag {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--primary-yellow);
    /* Use accent color for tag */
    margin-bottom: var(--spacer-1);
    text-transform: uppercase;
}

.job-banner-title {
    font-size: var(--font-size-h4);
    color: var(--text-on-dark);
    margin-bottom: var(--spacer-1);
    font-weight: var(--font-weight-bold);
}

.job-banner-location {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.job-banner .btn {
    flex-shrink: 0;
    /* Prevent button from shrinking */
}

/* --- Modal / Popup (Magnific Popup Example) --- */
/* Basic Magnific Popup overrides */
.mfp-bg {
    /* Overlay */
    background: rgba(0, 0, 0, 0.7);
}

.mfp-wrap {
    padding: var(--spacer-5);
}

.mfp-content {
    /* Container for your popup content */
    position: relative;
    background: var(--neutral-white);
    padding: 0;
    /* Remove default padding */
    width: auto !important;
    max-width: 1200px;
    /* Example max width */
    margin: var(--spacer-5) auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.mfp-close {
    /* Close button styling */
    width: 44px;
    height: 44px;
    line-height: 44px;
    position: absolute;
    right: 5px;
    top: 5px;
    text-decoration: none;
    text-align: center;
    opacity: 0.8;
    padding: 0;
    cursor: pointer;
    font-style: normal;
    font-size: 28px;
    font-family: Arial, Baskerville, monospace;
    color: var(--primary-dark);
    /* Make X darker */
    transition: opacity 0.2s;
    z-index: 10;
    /* Ensure above content */
}

.mfp-close:hover {
    opacity: 1;
}

/* Custom styles for project category popup content based on Screenshot 2 */
.popup-project-category {
    padding: var(--spacer-5);
    border-bottom: var(--border-width) solid var(--neutral-light-grey);
}

.popup-project-category .popup-header {
    /* Similar to card header */
    margin-bottom: var(--spacer-4);
}

.popup-project-category .popup-title {
    font-size: var(--font-size-h3);
    margin-bottom: var(--spacer-2);
}

.popup-project-category .popup-byline {
    color: var(--neutral-medium-grey);
    margin-bottom: 0;
}

.popup-project-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-project-item {
    background-color: var(--primary-dark);
    color: var(--text-on-dark);
    padding: var(--spacer-4) var(--spacer-5);
    border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.1);
    /* Subtle separator */
    display: block;
    /* Treat as block for full click area */
    position: relative;
    /* For arrow positioning */
    transition: background-color 0.2s ease;
}

.popup-project-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.popup-project-item:hover {
    background-color: var(--neutral-dark-grey);
    /* Slight hover change */
    color: var(--text-on-dark);
    /* Ensure text color remains */
    text-decoration: none;
    /* Remove underline on hover if it's a link */
}

.popup-project-item-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacer-1);
}

.popup-project-item-byline {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.popup-project-item .card-link-arrow {
    /* Reuse arrow style */
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-white);
}

.popup-project-item:hover .card-link-arrow {
    transform: translateY(-50%) translateX(5px);
    /* Add horizontal movement on hover */
}

/* --- Project Detail Page --- */
.page-header-strip {
    background-color: var(--primary-dark);
    padding: var(--spacer-1) 0;
    /* Style the vertical lines if needed */
}

.main-header {
    background-color: var(--neutral-white);
    /* Assuming white bg behind logo/menu */
    padding: var(--spacer-3) 0;
    border-bottom: var(--border-width) solid var(--neutral-light-grey);
    /* Styles for logo, VVC text, burger menu */
}

.project-title-section {
    padding: var(--spacer-5) 0;
    position: relative;
    /* For close button */
    /* Add styles for tags, title */
}

.project-title-section .page-close-btn {
    /* Close button on page */
    position: absolute;
    top: var(--spacer-4);
    right: var(--spacer-4);
    font-size: 1.5rem;
    color: var(--primary-dark);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.project-title-section .page-close-btn:hover {
    opacity: 1;
}


.project-nav-tabs {
    padding: 0 var(--spacer-4) var(--spacer-4) var(--spacer-4);
    margin: 0 auto var(--spacer-5) auto;
    /* Center tabs within container if desired */
    max-width: 1320px;
    /* Match container width */
    display: flex;
    gap: var(--spacer-2);
    flex-wrap: wrap;
    list-style: none;
}

.project-nav-tabs li a {
    display: inline-block;
    font-weight: var(--font-weight-medium);
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: var(--border-width) solid var(--primary-dark);
    padding: var(--spacer-2) var(--spacer-4);
    font-size: var(--font-size-sm);
    /* Slightly smaller text for tabs */
    border-radius: var(--border-radius-pill);
    color: var(--text-on-light);
    transition: var(--transition-base);
    white-space: nowrap;
    /* Prevent wrapping */
}

.project-nav-tabs li a:hover {
    text-decoration: none;
    background-color: var(--neutral-light-grey);
}

.project-nav-tabs li a.active {
    background-color: var(--primary-yellow);
    border-color: var(--primary-yellow);
    color: var(--text-on-light);
    /* Dark text on yellow */
}

.project-nav-tabs li a.btn-dark {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--text-on-dark);
}

.project-nav-tabs li a.btn-dark:hover {
    background-color: var(--neutral-dark-grey);
    border-color: var(--neutral-dark-grey);
    color: var(--text-on-dark);
}

.project-content-dark {
    background-color: var(--primary-dark);
    color: var(--text-on-dark);
    padding: var(--spacer-6) var(--spacer-5);
    border-radius: var(--border-radius);
}

.project-content-dark h1,
.project-content-dark h2,
.project-content-dark h3,
.project-content-dark h4 {
    color: var(--text-on-dark);
}

.stat-item {
    text-align: center;
    margin-bottom: var(--spacer-4);
}

.stat-number {
    font-size: 2.5rem;
    /* Large stats */
    font-weight: var(--font-weight-bold);
    color: var(--primary-yellow);
    /* Highlight stats */
    display: block;
    line-height: 1.1;
}

.stat-label {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.8);
}

/* Timeline specific styles */
.timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--spacer-5);
    padding: 0 var(--spacer-4);
    /* Add padding to prevent items touching edges */
    position: relative;
    /* For the line */
}

.timeline::before {
    /* The connecting line */
    content: '';
    position: absolute;
    top: 20px;
    /* Adjust vertical position based on checkmark size */
    left: var(--spacer-5);
    /* Start after first checkmark */
    right: var(--spacer-5);
    /* End before last checkmark */
    height: 2px;
    background-color: var(--neutral-medium-grey);
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    /* Ensure steps are above the line */
    text-align: center;
}

.timeline-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    /* Size of the circle/check */
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-dark);
    /* Match background */
    border: 2px solid var(--neutral-medium-grey);
    margin: 0 auto var(--spacer-2);
    position: relative;
    color: var(--primary-yellow);
    /* Checkmark color */
}

.timeline-icon.active {
    border-color: var(--primary-yellow);
}

.timeline-icon.active::before {
    /* Inner fill for active, example */
    content: '✓';
    /* Use FontAwesome or SVG */
    font-size: 1.5rem;
    line-height: 1;
}

.timeline-icon.current {
    /* Example 'we are here' */
    border-color: var(--primary-yellow);
    background-color: var(--primary-yellow);
}

.timeline-icon.current::before {
    /* Inner dot for current */
    content: '';
    width: 10px;
    height: 10px;
    background-color: var(--primary-dark);
    border-radius: 50%;
    display: block;
}


.timeline-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.timeline-status {
    font-size: var(--font-size-sm);
    color: var(--primary-yellow);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
}


/* ==========================================================================
      VVC MAP TOOL SPECIFIC STYLES
      ========================================================================== */

/* --- VVC Map Sidebar --- */
.vvc-sidebar-content {
    padding: var(--spacer-4);
    /* Consistent padding */
}

.vvc-sidebar-title {
    /* e.g., "Map Layers" */
    font-size: var(--font-size-h3);
    /* Match mockup better */
    color: var(--text-on-dark);
    margin-bottom: var(--spacer-4);
    font-weight: var(--font-weight-bold);
}

.vvc-sidebar-section {
    margin-bottom: var(--spacer-4);
}

.vvc-sidebar-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacer-2);
}

.vvc-sidebar-section-title {
    /* e.g., MAP VIEW, SCENARIO */
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--text-on-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.vvc-info-icon {
    color: var(--info-icon-color);
    font-size: var(--font-size-sm);
    cursor: help;
    /* Indicate it's clickable/hoverable */
}

.vvc-popup-data-label .vvc-info-icon {
    color: var(--info-icon-color);
    /* Ensure popup icons match */
}

.vvc-btn-group {
    /* Wrapper for toggle buttons */
    display: flex;
    gap: var(--spacer-2);
    /* Space between buttons */
    border-radius: 0;
    /* Rounded corners for the group look */
    overflow: hidden;
    /* Helps maintain the shape */
}

.vvc-sidebar-toggle {
    flex: 1 1 auto;
    /* Make buttons fill space */
    padding: var(--spacer-3) var(--spacer-2);
    /* Increased vertical padding to py-3 */
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
    color: var(--text-on-dark);
    background-color: var(--neutral-dark-grey);
    /* Inactive background */
    border: none;
    /* Remove individual borders */
    border-radius: 0;
    /* No radius on individual buttons */
    text-align: center;
    transition: var(--transition-base);
    cursor: pointer;
    white-space: normal;
    /* Allow text wrapping */
}

/* Use adjacent sibling selector with Bootstrap's .btn-check */
.btn-check:checked+.vvc-sidebar-toggle {
    background-color: var(--neutral-white);
    color: var(--primary-dark);
}

.vvc-sidebar-toggle:hover {
    background-color: #5a6268;
    /* Slightly lighter grey on hover */
    color: var(--text-on-dark);
}

.btn-check:checked+.vvc-sidebar-toggle:hover {
    background-color: var(--neutral-light-grey);
    /* Slightly darker white on hover */
    color: var(--primary-dark);
}

.vvc-toggle-subtitle {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-normal);
    color: var(--neutral-medium-grey);
    /* Greyer subtitle */
    margin-top: var(--spacer-1);
}

.btn-check:checked+.vvc-sidebar-toggle .vvc-toggle-subtitle {
    color: var(--neutral-medium-grey);
    /* Keep subtitle grey even when active */
}

.vvc-sidebar-divider {
    border: 0;
    border-top: var(--border-width) solid rgba(255, 255, 255, 0.1);
    /* Subtle divider */
    margin: var(--spacer-4) 0;
}

.vvc-sidebar-info-section {
    margin-bottom: var(--spacer-4);
}

.vvc-sidebar-info-section h4 {
    /* Titles like "How is sound calculated?" */
    font-size: var(--font-size-lg);
    /* Slightly larger */
    color: var(--text-on-dark);
    margin-bottom: var(--spacer-2);
}

.vvc-sidebar-text {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.8);
    /* Lighter text */
    line-height: 1.5;
    margin-bottom: 0;
}


/* --- VVC Map Sidebar --- */
.vvc-sidebar-content {
    padding: var(--spacer-4);
}

.vvc-sidebar-title {
    /* "Map Layers" */
    font-size: var(--font-size-h2);
    /* Increased size */
    color: var(--text-on-dark);
    margin-bottom: var(--spacer-5);
    /* Increased bottom margin */
    font-weight: var(--font-weight-bold);
}

.vvc-sidebar-section {
    margin-bottom: var(--spacer-5);
    /* Increased spacing between sections */
}

.vvc-sidebar-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacer-3);
    /* Increased space below header */
}

.vvc-sidebar-section-title {
    /* e.g., MAP VIEW, SCENARIO */
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--text-on-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Increased letter spacing */
    margin-bottom: 0;
}

.vvc-info-icon {
    color: var(--info-icon-color);
    font-size: var(--font-size-base);
    /* Slightly larger icon */
    cursor: help;
}

.vvc-popup-data-label .vvc-info-icon {
    color: var(--info-icon-color);
}

.vvc-btn-group {
    /* Wrapper for toggle buttons */
    display: flex;
    gap: var(--spacer-2);
    border-radius: 0;
    overflow: hidden;
}

.vvc-sidebar-toggle {
    /* The clickable label styled as a button */
    flex: 1 1 auto;
    padding: var(--spacer-3);
    /* Increased padding for larger buttons */
    font-size: var(--font-size-base);
    /* Increased font size */
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
    color: var(--text-on-dark);
    background-color: var(--neutral-dark-grey);
    /* Inactive background */
    border: none;
    border-radius: 0;
    /* No radius on individual buttons */
    text-align: center;
    transition: var(--transition-base);
    cursor: pointer;
    white-space: normal;
}

/* Checked state for the toggle buttons */
.btn-check:checked+.vvc-sidebar-toggle {
    background-color: var(--neutral-white);
    color: var(--primary-dark);
    /* Dark text on white */
    font-weight: var(--font-weight-semibold);
    /* Make active bolder */
}

.vvc-sidebar-toggle:hover {
    background-color: #5a6268;
    color: var(--text-on-dark);
}

.btn-check:checked+.vvc-sidebar-toggle:hover {
    background-color: var(--neutral-light-grey);
    color: var(--primary-dark);
}

.vvc-toggle-subtitle {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-normal);
    color: var(--neutral-medium-grey);
    margin-top: var(--spacer-1);
    line-height: 1.3;
    /* Adjust line height if needed */
}

.btn-check:checked+.vvc-sidebar-toggle .vvc-toggle-subtitle {
    color: var(--neutral-dark-grey);
    /* Keep subtitle grey */
}

.vvc-sidebar-divider {
    border: 0;
    border-top: var(--border-width) solid rgba(255, 255, 255, 0.15);
    /* Slightly more visible */
    margin: var(--spacer-5) 0;
    /* Increased margin */
}

.vvc-sidebar-info-section {
    margin-bottom: var(--spacer-4);
}

.vvc-sidebar-info-section h3.vvc-sidebar-info-title {
    /* New class for info titles */
    font-size: var(--font-size-lg);
    color: var(--text-on-dark);
    margin-bottom: var(--spacer-2);
    font-weight: var(--font-weight-semibold);
    /* Semibold titles */
}

.vvc-sidebar-text {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.85);
    /* Slightly brighter text */
    line-height: 1.6;
    /* Increase line height for readability */
    margin-bottom: 0;
}

.ca-map-top-left-controls .search-controls {
    display: flex !important;
}

/* --- VVC Geocoder Adjustments --- */
.vvc-geocoder {
    flex-grow: 1;
    border-radius: 0;
    /* NO radius */
    box-shadow: none;
    /* Remove shadow from wrapper */
    position: relative;
    /* Needed for suggestions */
}

.vvc-geocoder .mapboxgl-ctrl-geocoder {
    max-width: none;
    width: 100%;
    box-shadow: var(--box-shadow);
    /* Apply shadow to control */
    border-radius: 0;
    /* NO radius */
}

.vvc-geocoder .mapboxgl-ctrl-geocoder--input {
    height: 48px;
    padding-left: 40px;
    padding-right: 40px;
    border-radius: 0;
    /* NO radius */
    border: none;
    /* Remove border, shadow handles edge */
    font-size: var(--font-size-base);
    color: var(--text-on-light);
    box-shadow: none;
}

.vvc-geocoder .mapboxgl-ctrl-geocoder--icon-search {
    left: 12px;
    top: 14px;
}

.vvc-geocoder .mapboxgl-ctrl-geocoder--button {
    /* Mapbox clear button */
    right: 10px;
    top: 12px;
}

.vvc-geocoder .mapboxgl-ctrl-geocoder--icon-loading {
    right: 10px;
    top: 12px;
}

.vvc-geocoder .suggestions {
    background: var(--neutral-white);
    border-radius: 0;
    /* NO radius */
    box-shadow: var(--box-shadow);
    border: none;
    color: var(--text-on-light);
    font-size: var(--font-size-sm);
    /* Position suggestions correctly */
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    /* Position below input */
    z-index: 15;
    /* Above reset button */
}

.vvc-geocoder .suggestions>li>a {
    color: var(--text-on-light);
    padding: var(--spacer-2) var(--spacer-3);
}

.vvc-geocoder .suggestions>li.active>a,
.vvc-geocoder .suggestions>li>a:hover {
    background-color: var(--neutral-light-grey);
    color: var(--text-on-light);
}

/* --- VVC Inline Reset Button (White) --- */
.vvc-reset-btn-inline {
    flex-shrink: 0;
    height: 48px;
    padding: var(--spacer-2) var(--spacer-3);
    margin: 0 var(--spacer-1);
    font-size: var(--font-size-sm);
    line-height: 1;
    white-space: nowrap;
    /* White button styles */
    background-color: var(--neutral-white) !important;
    color: var(--text-on-light);
    border: var(--border-width) solid var(--border-color);
    /* Standard border */
    border-left: none;
    /* Remove left border to merge */
    border-radius: 0;
    /* NO radius */
    box-shadow: var(--box-shadow);
    /* Consistent shadow */
}

.vvc-reset-btn-inline i {
    font-size: 0.9em;
    margin-right: var(--spacer-1);
}

.vvc-reset-btn-inline:hover {
    background-color: var(--neutral-light-grey);
    /* Hover state */
    color: var(--primary-dark);
    border-color: var(--neutral-medium-grey);
    /* Darker border on hover */
}


/* --- VVC Map Info Popup (Yellow Box) --- */
.vvc-info-popup {
    background-color: var(--primary-yellow);
    color: var(--text-on-light);
    border-radius: 0;
    box-shadow: var(--box-shadow);
    padding: var(--spacer-4);
    min-width: 320px;
    max-width: 385px;
    z-index: 0;
    position: relative;
}

.vvc-popup-close {
    position: absolute;
    top: var(--spacer-2);
    right: var(--spacer-2);
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-on-light);
    opacity: 0.7;
    padding: var(--spacer-1);
    cursor: pointer;
}

.vvc-popup-close:hover {
    opacity: 1;
}

.vvc-popup-title {
    /* "At this location" */
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacer-1);
}

.vvc-popup-context {
    /* "in 2026 during Daytime..." */
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacer-3);
}

/* --- Custom Styling for Popup Time of Day Select --- */
.vvc-popup-timeofday-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Remove default border and background */
    border: none;
    background-color: transparent;

    /* Font styling to match surrounding text */
    font-family: inherit;
    /* Inherit from .vvc-popup-context */
    font-size: inherit;
    /* Inherit from .vvc-popup-context */
    color: var(--text-on-light);
    /* Match your text color */
    font-weight: var(--font-weight-medium);
    /* Or inherit/match */
    line-height: inherit;

    /* Spacing and Sizing */
    padding: 0 18px 0 4px;
    /* Adjust padding: 0 top/bottom, right for caret, left for slight indent */
    margin: 0 2px;
    /* Small margin to separate from "during" */
    display: inline-block;
    /* Allows it to sit inline */
    vertical-align: baseline;
    /* Align with text */
    cursor: pointer;

    /* Custom Caret using SVG background image */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23161819' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    /* Position caret */
    background-size: 10px 10px;
    /* Size of the caret */
}

/* Optional: Style for when the select is focused (clicked) */
.vvc-popup-timeofday-select:focus {
    outline: none;
    /* Remove default focus outline if you don't want it */
}

/* Ensure it fits within the popup context line */
.vvc-popup-context {
    display: flex;
    /* Helps align items if needed */
    align-items: baseline;
    /* Align text baselines */
    flex-wrap: wrap;
    /* Allow wrapping if space is tight */
}

.vvc-popup-context>span,
.vvc-popup-context>select {
    margin-right: 0.25em;
    /* Small space between elements */
}

.vvc-popup-context>select {
    margin-left: 0.15em;
    /* Small space before select if "during" is close */
}

.vvc-popup-change-link {
    text-decoration: underline;
    color: var(--link-color);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
}

.vvc-popup-change-link:hover {
    color: var(--link-hover-color);
}

.vvc-popup-check-item {
    display: flex;
    align-items: flex-start;
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacer-3);
    font-weight: var(--font-weight-semibold);
    /* Make text bolder */
}

.vvc-popup-check-icon {
    color: var(--primary-dark);
    margin-right: var(--spacer-2);
    margin-top: 3px;
    /* Fine-tune vertical alignment */
    font-size: 1.1em;
    /* Slightly larger check */
}

.vvc-popup-data-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacer-4) 0;
}

.vvc-popup-data-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacer-2) 0;
    /* Increase padding */
    border-bottom: var(--border-width) solid rgba(0, 0, 0, 0.08);
    /* Slightly darker line */
    font-size: var(--font-size-sm);
}

.vvc-popup-data-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
    /* Remove bottom padding on last item */
}

.vvc-popup-data-label {
    color: var(--primary-dark);
    font-weight: var(--font-weight-medium);
    flex-basis: 75%;
    /* Adjust basis */
    padding-right: var(--spacer-2);
    line-height: 1.4;
    font-size: 0.8rem;
}

.vvc-popup-data-value {
    font-weight: var(--font-weight-bold);
    text-align: right;
    white-space: nowrap;
    font-size: 0.95em;
    /* Slightly smaller value text */
}

.vvc-popup-download-btn {
    /* Uses .btn and .btn-dark styles */
    width: 100%;
    font-weight: var(--font-weight-semibold);
    padding: var(--spacer-3) var(--spacer-4);
    /* Larger padding */
    font-size: var(--font-size-sm);
    /* Ensure font size matches tabs etc */
    text-transform: uppercase;
    /* Match mockup */
    letter-spacing: 0.5px;
    background-color: var(--primary-dark) !important;
}

.vvc-popup-download-btn i {
    /* Icon styling */
    margin-right: var(--spacer-2);
}

.vvc-info-popup {
    min-height: 55px;
}

.vvc-popup-toggle {
    position: absolute;
    display: flex;
    right: 0px;
    align-items: center;
    justify-content: space-between;
    width: unset;
    /* Adjust width as needed */
    background: none;
    border: none;
    font-size: 1.125rem;
    padding: 4px 8px;
    cursor: pointer;
    z-index: 10;
}

.vvc-popup-toggle-label {
    font-size: 1.25rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.vvc-info-popup.collapsed .vvc-popup-toggle {
    width: 100%;
    text-align: left;
    padding: 0 1rem;
}

.vvc-info-popup.collapsed .vvc-popup-toggle-label {
    display: inline;
    font-weight: 700;
}

.vvc-info-popup:not(.collapsed) .vvc-popup-toggle-label {
    display: none;
}

#addressLocationResultsContainer.collapsed ul,
#addressLocationResultsContainer.collapsed .btn,
#addressLocationResultsContainer.collapsed .vvc-popup-context,
#addressLocationResultsContainer.collapsed .vvc-popup-title,
.vvc-popup-address.collapsed {
    display: none;
}

/* ———————————————————————————————————————————————
   ❶ Anchor the legend ABOVE the toggle             (drop-up)
   ——————————————————————————————————————————————— */

.vvc-map-key-toggle {
    min-width: 200px;
    /* Ensure the button is wide enough */
}

/* Force the dropdown to forget the default “top:100%” and grow upward */
.map-key-toggle-container .dropdown-menu {
    top: auto !important;
    /* neutralise Bootstrap’s top */
    bottom: calc(100% + .5rem);
    /* sit 0.5 rem above button  */
    left: 0;
    /* keep aligned to button     */
    right: auto;
}

/* ———————————————————————————————————————————————
   ❷ Let the legend open to full height
   ——————————————————————————————————————————————— */

#mapKeyContent {
    width: auto;
    max-height: none;
    /* ← remove the 70 vh cap            */
    overflow: visible;
    /* no internal scroll; show all rows */
}

/* – smooth “scale-up” animation (height not limited) – */
#mapKeyContent.collapse:not(.show) {
    transform: scaleY(0);
    opacity: 0;
}

#mapKeyContent.collapsing {
    transform: scaleY(0);
}

#mapKeyContent.collapse.show {
    transform: scaleY(1);
    opacity: 1;
    border-radius: 0;
}

/* ———————————————————————————————————————————————
   ❸ Make sure the button + menu follow the MAP, not viewport
   ——————————————————————————————————————————————— */

/* your map wrapper already has position:relative, so: */
.vvc-map-key-container {
    position: absolute;
    /* inside the map frame        */
    bottom: 0 !important;
    left: 0 !important;
    z-index: 20;
}

/* neat little colour square */
.legend-swatch {
    display: inline-block;
    width: 28px;
    height: 20px;
    border-radius: 3px;
}

/* group titles */
.legend-group-title {
    font-weight: 600;
    margin: 0 0 .25rem 0;
}

/* rows */
.legend-row {
    display: flex;
    align-items: center;
    margin-bottom: .35rem;
    font-size: .75rem;
}

/* --- Old Map Section Styles (potentially remove or adjust) --- */
/* Re-evaluate if these are still needed or conflict */
.map-section-layout {
    display: none;
    /* Hide if replaced by vvc-map-section */
}

.map-sidebar {
    /* Base styles moved to vvc-sidebar */
}

.map-container {
    /* Base styles moved to vvc-map-container */
}

#map {
    /* Ensure this selector still works within vvc-map-container */
    width: 100%;
    height: 100%;
    border-radius: 0;
    /* Remove radius if it was on the inner element */
}

.map-info-box {
    display: none;
    /* Hide if replaced by vvc-info-popup */
}


/* --- About Page --- */
.about-content {
    padding: var(--spacer-6) 0;
}

.about-content .graphic-element {
    /* Styles for the orange/tan/dark shapes */
    /* This would likely involve absolute positioning or background images */
}

.footer-links {
    margin-top: var(--spacer-5);
    padding-bottom: var(--spacer-6);
    /* Space below links */
}

.footer-links a {
    display: inline-block;
    margin-right: var(--spacer-4);
    color: var(--primary-dark);
    font-weight: var(--font-weight-medium);
    text-decoration: underline;
}

.footer-links a:hover {
    color: var(--neutral-dark-grey);
}

@media (min-width: 1194px) {
    .btn.map-scroll-to-sidebar-btn {
        display: none !important;
    }
}

.btn.map-scroll-to-sidebar-btn {
    position: absolute;
    bottom: 0;
    left: 50%;
    padding: 0.5em 1em;
    transform: translateX(-50%);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* if focus or active, keep the text-black */
.btn.map-scroll-to-sidebar-btn:focus,
.btn.map-scroll-to-sidebar-btn:active {
    color: var(--primary-dark) !important;
    background-color: var(--primary-yellow);
    box-shadow: none;
}

.map-scroll-to-sidebar-btn:before {
    content: '';
    position: absolute;
    left: -3%;
    bottom: -0.1em;
    width: 106%;
    height: 0.5em;
    background: rgba(0, 0, 0, 0.3);
    filter: blur(0.4em);
}

/* --- Floating Chat Widget --- */
.chat-widget {
    position: fixed;
    bottom: var(--spacer-4);
    right: var(--spacer-4);
    width: 60px;
    height: 60px;
    background-color: var(--primary-dark);
    color: var(--neutral-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    /* Icon size */
    cursor: pointer;
    box-shadow: var(--box-shadow);
    z-index: 1000;
    transition: var(--transition-base);
}

.chat-widget:hover {
    background-color: var(--neutral-dark-grey);
    transform: scale(1.05);
}


/* --- Utility Classes --- */
.text-yellow {
    color: var(--primary-yellow) !important;
}

.bg-dark {
    background-color: var(--primary-dark) !important;
}

.bg-light {
    background-color: var(--neutral-white) !important;
}

.text-on-dark {
    color: var(--text-on-dark) !important;
}

.text-on-light {
    color: var(--text-on-light) !important;
}

/* Add more utility classes as needed (e.g., spacing helpers if not using Bootstrap's) */
.m-0 {
    margin: 0 !important;
}

.mt-1 {
    margin-top: var(--spacer-1) !important;
}

.mb-1 {
    margin-bottom: var(--spacer-1) !important;
}

.me-1 {
    margin-right: var(--spacer-1) !important;
}

.ms-1 {
    margin-left: var(--spacer-1) !important;
}

.mt-2 {
    margin-top: var(--spacer-2) !important;
}

.mb-2 {
    margin-bottom: var(--spacer-2) !important;
}

.me-2 {
    margin-right: var(--spacer-2) !important;
}

.ms-2 {
    margin-left: var(--spacer-2) !important;
}

.mt-3 {
    margin-top: var(--spacer-3) !important;
}

.mb-3 {
    margin-bottom: var(--spacer-3) !important;
}

.me-3 {
    margin-right: var(--spacer-3) !important;
}

.ms-3 {
    margin-left: var(--spacer-3) !important;
}

.mt-4 {
    margin-top: var(--spacer-4) !important;
}

.mb-4 {
    margin-bottom: var(--spacer-4) !important;
}

.me-4 {
    margin-right: var(--spacer-4) !important;
}

.ms-4 {
    margin-left: var(--spacer-4) !important;
}

.mt-5 {
    margin-top: var(--spacer-5) !important;
}

.mb-5 {
    margin-bottom: var(--spacer-5) !important;
}

.me-5 {
    margin-right: var(--spacer-5) !important;
}

.ms-5 {
    margin-left: var(--spacer-5) !important;
}

.mt-6 {
    margin-top: var(--spacer-6) !important;
}

.mb-6 {
    margin-bottom: var(--spacer-6) !important;
}

.p-1 {
    padding: var(--spacer-1) !important;
}

.p-2 {
    padding: var(--spacer-2) !important;
}

.p-3 {
    padding: var(--spacer-3) !important;
}

.p-4 {
    padding: var(--spacer-4) !important;
}

.p-5 {
    padding: var(--spacer-5) !important;
}

.p-lg-4 {
    /* Example responsive padding */
    padding: var(--spacer-4);
}

.w-100 {
    width: 100% !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.align-items-start {
    align-items: flex-start !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.flex-fill {
    flex: 1 1 auto !important;
}

.list-unstyled {
    padding-left: 0;
    list-style: none;
}

.rounded {
    border-radius: var(--border-radius) !important;
}

.text-white {
    color: var(--neutral-white) !important;
}

.text-lowercase {
    text-transform: lowercase !important;
}

/* Add more Bootstrap-like utilities as needed */

.ca-modal {
    margin: 0;
    width: 100%;
}

.ca-accordionitem .card-body p {
    padding-bottom: 0;
}

/* ==========================================================================
     Universal Result Spinner
    ========================================================================== */
@keyframes loadingspin {
    to {
        transform: rotate(1turn);
    }
}

.loadingspinner {
    pointer-events: none;
    margin: 0 auto;
    width: 2.5em;
    /* matches  ✔︎/✖︎ icons nicely */
    height: 2.5em;
    border: .4em solid #eee;
    border-top-color: #353735;
    border-radius: 50%;
    animation: loadingspin 1s linear infinite;
}

.result-text.visually-hidden {
    opacity: 0 !important
}

/* keep layout */

/* -----------------------------------------------------------
   Global map-loading veil (brand look & feel)
    ----------------------------------------------------------- */
#mapGlobalSpinner {
    /* full cover, but only within the map container */
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(22, 24, 25, .55);
    /* brand charcoal @ ~55 % */
    backdrop-filter: blur(2px);
    /* subtle polish */
    z-index: 1000;
    pointer-events: none;
    /* sit above controls */

    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}

#mapGlobalSpinner.active {
    opacity: 1;
    visibility: visible
}

/* the spinning ring */
#mapGlobalSpinner .loader {
    width: 4rem;
    height: 4rem;
    border: .6rem solid #f5ee6b33;
    /* translucent ring */
    border-top-color: #f5ee6b;
    /* solid brand yellow */
    border-radius: 50%;
    animation: loadingspin 1s linear infinite;
}

@keyframes loadingspin {
    to {
        transform: rotate(1turn)
    }
}


/* ==========================================================================
      Media Queries (Basic Examples)
      ========================================================================== */

@media (max-width: 1280px) {

    .ca-map-sidebar .sidebar-container,
    .ca-map-sidebar .sidebar-wrapper {
        position: absolute;
        background: var(--primary-dark);
        overflow-y: hidden !important;
        min-height: 120vh !important;
    }

    /* ca-components.css  ── replace the existing .sidebar-container rule */
    .sidebar-container {
        width: 100%;
        /* existing props */
        background: #ffffff;
        position: inherit;
        padding-top: 0;

        /* new / updated props ↓ */
        overflow-x: hidden;
        /* already there – keep */
        overflow-y: auto !important;
        /* make it a vertical scroll area            */
        max-height: 90vh !important;
        /* stop at viewport bottom                    */
        scroll-behavior: smooth !important;
        /* nice smooth snap-to-top when JS triggers   */
    }

    .ca-map-container {
        height: 80vh;
    }

}

@media (max-width: 991.98px) {
    :root {
        --font-size-h1: 2.2rem;
        --font-size-h2: 1.8rem;
    }

    .vvc-map-section .ca-map-wrapper {
        flex-direction: column;
        /* Stack sidebar below map */
        height: 85vh;
        /* Allow height to adjust based on content */
    }

    .vvc-sidebar {
        width: 100%;
        max-height: 50vh;
        /* Limit sidebar height */
        order: 2;
        /* Sidebar below map */
        margin-left: 0 !important;
        /* Ensure visible */
        transition: none;
    }

    .vvc-map-container {
        height: 50vh;
        /* Fixed height for map */
        order: 1;
        /* Map first */
        width: 100%;
    }

    .ca-map-top-left-controls {
        left: 0;
        top: 0;
        width: calc(100% - var(--spacer-2) * 2);
        max-width: none;
        transition: none;
        /* Adjust position if sidebar toggle is still shown */
        /* left: calc(44px + var(--spacer-1) + var(--spacer-2)); */
        /* width: calc(100% - 44px - var(--spacer-1) - var(--spacer-2)*2); */
    }

    .vvc-info-popup {
        max-width: 350px;
        width: auto;
        left: var(--spacer-1);
        right: var(--spacer-1);
        z-index: 10;
    }

    .ca-map-top-left-controls {
        /* Adjust positioning if needed */
        padding: var(--spacer-2);
        width: auto;
    }

    .vvc-geocoder {
        margin-bottom: var(--spacer-2) !important;
        /* Ensure space */
        max-width: 260px;
    }

    .vvc-map-key-container {
        bottom: var(--spacer-2);
        left: var(--spacer-2);
        border-radius: none;
    }

    .p-lg-4 {
        /* Example responsive padding */
        padding: var(--spacer-3);
        /* Reduce padding on smaller screens */
    }

    .vvc-map-key-toggle {
        min-width: auto;
        /* Ensure the button is wide enough */
    }

    .noise-tool-modal .ca-cardbody,
    .noise-tool-modal .ca-cardtitle {
        padding: 1.5rem;
    }

}

/* mobile: keep the legend inside the screen */
@media (max-width: 576px) {
    .map-key-toggle-container .dropdown-menu {
        /* anchor to the right instead of the left */
        left: 0 !important;
        right: 0 !important;
        /* optional nice-to-haves */
        width: 200px !important;
        max-height: 75vh;
        overflow-y: auto;
    }

    .vvc-info-popup {
        max-width: 300px;
        width: auto;
        left: var(--spacer-1);
        right: var(--spacer-1);
        z-index: 10;
    }

    .vvc-popup-title {
        font-size: 1.1rem;
    }

    .vvc-popup-download-btn {
        padding: 0.5rem;
    }

    .vvc-popup-data-label {
        font-size: 0.7rem;
    }

    .vvc-popup-data-value {
        font-size: 0.8em;
    }
}


@media (max-width: 767.98px) {
    .job-banner {
        flex-direction: column;
        text-align: center;
    }

    .job-banner-img {
        margin-bottom: var(--spacer-4);
    }

    .project-grid {
        grid-template-columns: 1fr;
        /* Stack cards */
    }

    .timeline {
        /* Consider stacking timeline items vertically */
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }

    .timeline::before {
        /* Hide or adjust line for vertical layout */
        display: none;
    }

    .timeline-step {
        margin-bottom: var(--spacer-4);
        width: 100%;
        text-align: left;
        /* Align text left */
        display: flex;
        /* Align icon and text */
        align-items: center;
    }

    .timeline-icon {
        margin: 0 var(--spacer-3) 0 0;
        /* Margin right instead of bottom */
        flex-shrink: 0;
        /* Prevent icon from shrinking */
    }

    .project-nav-tabs li {
        flex-basis: calc(50% - var(--spacer-1));
        /* Two tabs per row */
    }

    .project-nav-tabs li a {
        width: 100%;
        /* Make link fill the basis */
        text-align: center;
    }

    .vvc-geocoder .mapboxgl-ctrl-geocoder--input {
        height: 44px;
    }

    .vvc-reset-btn-inline {
        height: 44px;
        padding: var(--spacer-1) var(--spacer-2);
        font-size: 0.8rem;
    }

    .vvc-reset-btn-inline:active {
        background-color: var(--neutral-light-grey);
        color: var(--primary-dark) !important;
        border-color: var(--neutral-medium-grey);
    }

    .vvc-sidebar-toggle-btn {
        width: 44px;
        height: 44px;
        font-size: var(--font-size-base);
    }
}


/* ① let the wrapper shrink to its children + stop eating clicks  */
.results-container-wrapper {
    width: max-content;
    /* only as wide as the popup */
    height: auto;
    /* only as tall as the popup */
    pointer-events: none;
    /* map is now clickable through it */
}

/* ② re-enable interaction *inside* the popup itself              */
#addressLocationResultsContainer {
    pointer-events: auto;
    /* buttons + scroll still work */
}


  .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl:last-child,
        .mapboxgl-ctrl-bottom-right .mapboxgl-ctrl:last-child,
        .mapboxgl-ctrl-bottom .mapboxgl-ctrl:last-child {
            margin-bottom: 10px;
        }

        @media (min-width: 1194px) {
            .ca-map {
                height: 100vh;
            }

            .ca-map-wrapper {
                flex-direction: row-reverse;
            }

            .ca-map-sidebar {
                width: 25%;
                max-width: 400px !important;
                overflow: auto;
                height: 100vh;
            }

            .ca-map-container {
                height: auto;
            }

            .sidebar-wrapper, #sidebarLvl1 {
                width: 400px !important;
            }

            .ca-map-sidebar .sidebar-container,
            .ca-map-sidebar .sidebar-wrapper {
                position: absolute;
                background: var(--primary-dark);
                overflow-y: scroll !important;
                width: 400px !important;
                min-height: 100% !important;
            }
        }

        @media (max-width: 1194px) {
            #fullScreenToggle {
                display: none !important;
            }
        }

        .project-accordion .ca-accordion-btn:not(.collapsed) .fas:before {
            content: "—" !important;
            font-weight: 500;
            font-style: normal;
        }
