/**
 * Homepage Styles
 * Multi-Layer Wheel-Based System with Dotted Pattern Background
 */

/* Prevent body scroll on homepage */
body:has(.layer-container) {
    overflow: hidden;
    height: 100vh;
}

/* Fallback for browsers without :has() support */
html.no-scroll,
body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Fixed viewport container */
.layer-viewport {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
}

/* Layer container - no scroll, wheel-based transitions */
.layer-container {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Base layer styling */
.layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

/* Dotted Pattern Background */
.dotted-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(40, 56, 146, 0.15) 2px, transparent 2px);
    background-size: 58px 58px;
    background-position: 29px 29px;
    pointer-events: none;
    z-index: 1;
}

/* Layer 1: Hero with dotted pattern overlay */
.layer-1 {
    z-index: 30;
    background: #F5F7FA;
}

.layer-1.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Layer 1 background - centered with 12.5% margin on each side (240px at 1920px) */
.layer-1 .map-background {
    left: 12.5%;
    right: 12.5%;
    width: 75%;
}

/* Layer 2: Interactive map */
.layer-2 {
    z-index: 20;
    background: #FFFFFF;
}

.layer-2.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

/* Ensure fixed elements inside layer-2 work correctly when active */
.layer-2.active {
    transform: none;
}

/* Hide fixed elements when Layer 2 is hidden */
.layer-2.hidden .map-info-card,
.layer-2.hidden .map-travel-badge,
.layer-2.hidden .map-zoom-controls,
.layer-2.hidden .map-scale-indicator {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden;
}

/* Disable Leaflet interactive elements when Layer 2 is hidden */
.layer-2.hidden .leaflet-interactive,
.layer-2.hidden .leaflet-map-container {
    pointer-events: none !important;
}

/* Disable ALL pointer events inside Layer 2 when hidden */
/* This allows Layer 3's map to receive pointer events */
.layer-2.hidden *,
.layer-2.hidden .hero-overlay,
.layer-2.hidden .scroll-indicator,
.layer-2.hidden .scroll-controls,
.layer-2.hidden .continue-btn,
.layer-2.hidden .layer2-info-container {
    pointer-events: none !important;
}

/* Layer 3: Background/Base layer */
.layer-3 {
    z-index: 10;
    background: linear-gradient(135deg, #F5F7FA 0%, #E8ECF3 100%);
}

.layer-3.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Hide fixed elements when Layer 3 is hidden */
.layer-3.hidden .map-info-card,
.layer-3.hidden .map-travel-badge,
.layer-3.hidden .map-zoom-controls,
.layer-3.hidden .map-close-btn {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden;
}

/* Header Styles */
.home-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 60px;
    background: transparent;
}

.home-header .header-container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-header .logo {
    display: flex;
    align-items: center;
}

.home-header .logo img {
    height: 48px;
}

.home-header .logo-text {
    font-family: 'Onest', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #F9A01B;
}

.home-header .logo-subtext {
    font-size: var(--fluid-small);
    color: #283892;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.home-header .main-nav {
    display: flex;
    gap: 48px;
}

.home-header .nav-link {
    font-size: var(--fluid-small); /* 14px → 16px fluid */
    font-weight: 500;
    color: #041A31;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.home-header .nav-link.active {
    color: #F9A01B;
}

.home-header .nav-link:hover {
    color: #F9A01B;
}

.home-header .btn-contact {
    padding: var(--fluid-space-sm) var(--fluid-space-md); /* 8-16px / 16-32px fluid */
    border: 1.5px solid #041A31;
    border-radius: 50px;
    font-size: var(--fluid-xs); /* 12px → 14px fluid */
    font-weight: 600;
    text-transform: uppercase;
    color: #041A31;
    text-decoration: none;
    transition: all 0.3s ease;
}

.home-header .btn-contact:hover {
    background: #041A31;
    color: white;
}

/* Layer 1 Content: Hero with glassmorphic card */
.hero-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 80px 0 0;
    position: relative;
    pointer-events: none;
}

.hero-overlay .hero-content-wrapper {
    pointer-events: auto;
}

.hero-content-wrapper {
    display: flex;
    align-items: center;
    position: absolute;
    left: 8.33%;  /* 160px / 1920px */
    top: 50%;
    transform: translateY(-50%);
    width: 37.5%;  /* 720px / 1920px */
    min-width: 480px;  /* Minimum for readability */
    height: auto;
    z-index: 10;
}

/* Glassmorphic Hero Card */
.hero-card {
    position: relative;
    z-index: 10;
    width: 100%;  /* Fill the wrapper */
    max-width: 720px;  /* Cap at original design size */
    height: 75vh;
    padding: 4rem 3.5rem;  /* 64px 56px at 16px base */
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Transition for shrink animation - slower for dramatic effect */
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.8s ease;
    transform-origin: left center;
}

/* Hero card shrinks and fades when Layer 1 is hidden */
.layer-1.hidden .hero-card {
    transform: scale(0.7);
    opacity: 0;
}

/* Ensure hero card is visible when Layer 1 is active */
.layer-1.active .hero-card {
    transform: scale(1);
    opacity: 1;
}

/* Map Illustration Container */
.hero-map-container {
    position: absolute;
    top: 50%;
    right: -60px;
    transform: translateY(-50%);
    width: 58%;
    max-width: 850px;
    height: auto;
    z-index: 5;
}

.map-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-title {
    font-family: 'Onest', sans-serif;
    font-size: var(--fluid-h1); /* 28px → 64px fluid */
    font-weight: 400;
    line-height: var(--line-height-tight); /* 1.15 */
    color: #041A31;
    margin-bottom: var(--fluid-space-md); /* 16px → 32px fluid */
}

.hero-description {
    font-family: 'Onest', sans-serif;
    font-size: var(--fluid-body-lg); /* 18px → 22px fluid */
    font-style: normal;
    font-weight: 400;
    line-height: var(--line-height-relaxed); /* 1.6 */
    color: #041A31;
    width: calc(5 * 84px + 4 * 16px); /* Match width of 5 partner logos (84px each + 16px gaps) = 484px */
    max-width: 100%;
    margin-bottom: var(--fluid-space-lg); /* 24px → 64px fluid */
}

.hero-instruction {
    font-size: 14px;
    color: #888;
    margin-bottom: 80px;
    display: none; /* Hidden in this layer */
}

/* Logo Grid - Partner/Accreditation Logos */
.logo-grid {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.partner-logo {
    width: 84px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.partner-logo-text {
    font-weight: bold;
    font-size: var(--fluid-small);
}

.partner-logo-text.primary {
    color: #F9A01B;
    font-size: var(--fluid-small);
}

.partner-logo-text.secondary {
    color: #283892;
}

/* Scroll Indicator - Chevron Style */
.layer-2 .scroll-indicator {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    animation: bounce 2s infinite;
    cursor: pointer;
    pointer-events: auto;
}

.layer-2 .scroll-indicator svg {
    width: 44px;
    height: 44px;
    transform: rotate(180deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(10px);
    }
    60% {
        transform: translateX(-50%) translateY(5px);
    }
}

/* Hide scroll indicator when hero is dismissed */
.layer-2:has(.hero-overlay.dismissing) .scroll-indicator {
    animation: mobileHeroFadeOut 0.3s ease forwards;
}

.layer-2:has(.hero-overlay.hidden) .scroll-indicator {
    opacity: 0;
    pointer-events: none;
}

/* Legacy scroll-controls styles (kept for compatibility) */
.scroll-controls {
    position: absolute;
    right: 80px;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 20;
}

.scroll-label {
    font-family: 'Onest', sans-serif;
    font-weight: 500;
    font-size: var(--fluid-body); /* 16px → 18px fluid */
    color: #041A31;
    text-align: center;
    white-space: nowrap;
}

@keyframes scrollWheel {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(6px);
        opacity: 0.5;
    }
}

/* Layer 2: Full Screen Interactive Map */
.map-full-screen {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Draggable Map Content - maintains 1920px width on smaller screens */
.map-draggable-content {
    position: relative;
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* Enable dragging on screens smaller than 1920px or 1080px height */
@media (max-width: 1919px) {
    .map-draggable-content {
        width: 1920px;
        height: 1080px;
        cursor: grab;
        touch-action: none;
        user-select: none;
    }
}

/* Zoom out on mobile for better overview - 65% scale */
@media (max-width: 768px) {
    .map-draggable-content {
        width: 1248px;  /* 1920 * 0.65 */
        height: 702px;  /* 1080 * 0.65 */
    }

    .map-background img {
        width: 1248px;
        height: 702px;
    }

    /* Scale bus size for zoomed out view */
    .animated-bus {
        width: 33px;  /* 50 * 0.65 */
        height: 21px; /* 32 * 0.65 */
        /* Adjust path coordinates for 65% scale */
        offset-path: path('M 650,390 Q 605,410 618,475 Q 637,514 657,553');
    }

    .map-draggable-content:active,
    .map-draggable-content.dragging {
        cursor: grabbing;
    }

    /* Drag hint indicator */
    .map-full-screen::after {
        content: 'Drag to explore';
        position: absolute;
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 14px;
        font-family: var(--font-primary);
        z-index: 100;
        pointer-events: none;
        opacity: 1;
        transition: opacity 0.5s ease;
    }

    .map-full-screen.dragged::after {
        opacity: 0;
    }

}

/* Map Background */
.map-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.map-background img {
    width: 100%;
    height: 100%;
    /*object-fit: cover;*/
    object-position: center;
}

/* On smaller screens, maintain 1920x1080 dimensions for the map image */
@media (max-width: 1919px) {
    .map-background img {
        width: 1920px;
        height: 1080px;
        object-fit: cover;
    }
}

/* Information Card - Fixed Position */
.map-info-card {
    position: fixed;
    top: 100px;
    left: 49px;
    width: 586px;
    max-width: calc(100% - 98px);
    height: auto;
    padding: 32px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    z-index: 50;
    display: flex;
    align-items: center;
    /* Animation - fade and slide in */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
    pointer-events: none;
}

/* Animate in when Layer 2 is active */
.layer-2.active .map-info-card {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.map-info-text {
    font-family: var(--font-family-base);
    font-size: var(--fluid-small); /* 14px → 16px fluid */
    font-weight: 400;
    line-height: var(--line-height-relaxed); /* 1.6 */
    color: #666666;
    margin: 0;
}

/* Interactive Map Markers */
.map-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* Individual Marker */
.map-marker {
    position: absolute;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -100%);
    transition: transform 0.2s ease;
    z-index: 10;
}

.map-marker:hover,
.map-marker:focus {
    transform: translate(-50%, -100%) scale(1.15);
    z-index: 20;
}

.map-marker:focus {
    outline: none;
}

.map-marker:focus-visible {
    outline: 2px solid #041A31;
    outline-offset: 4px;
    border-radius: 50%;
}

/* Marker Icon */
.marker-icon {
    width: 100%;
    height: 100%;
    color: #F9A01B;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: color 0.2s ease;
}

.map-marker:hover .marker-icon,
.map-marker:focus .marker-icon,
.map-marker.active .marker-icon {
    color: #283892;
}

/* Legacy Landmark Labels (keeping for backwards compatibility) */
.map-landmarks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
}

.landmark {
    position: absolute;
    font-family: 'Onest', sans-serif;
    font-size: var(--fluid-small);
    font-weight: 400;
    font-style: italic;
    color: #1E3A5F;
    white-space: nowrap;
    transform: translateX(-50%);
}

/* Legacy map styles (keeping for backwards compatibility) */
.map-full {
    width: 100%;
    height: 100%;
    padding: 80px 0 0;
    display: flex;
    flex-direction: column;
}

.map-header {
    padding: 24px 60px;
}

.map-header .map-description {
    max-width: 400px;
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}

.map-header .hero-instruction {
    margin-top: 16px;
}

.map-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
}

.map-interactive {
    width: 1440px;
    max-width: 100%;
    height: calc(100vh - 200px);
    max-height: 810px;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
}

.map-interactive img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cookie Banner (for Layer 2) - temporarily hidden */
.cookie-banner {
    display: none; /* TODO: Remove to show cookie banner */
    position: absolute;
    right: 49px;
    bottom: 49px;
    width: 340px;
    background: #F5F7FA;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.cookie-text {
    font-size: var(--fluid-xs); /* 12px → 14px fluid */
    line-height: var(--line-height-relaxed); /* 1.6 */
    color: #666;
    margin-bottom: var(--fluid-space-sm);
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.cookie-btn {
    flex: 1;
    padding: var(--fluid-space-sm) var(--fluid-space-sm);
    border-radius: 50px;
    font-size: var(--fluid-xs); /* 12px → 14px fluid */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background: #283892;
    color: white;
    border: none;
}

.cookie-btn.reject {
    background: transparent;
    border: 1px solid #666;
    color: #666;
}

.cookie-btn:focus {
    outline: 2px solid #F9A01B;
    outline-offset: 2px;
}

.cookie-manage {
    font-size: var(--fluid-small);
    color: #666;
    text-align: center;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    padding: 4px;
}

.cookie-manage:hover,
.cookie-manage:focus {
    text-decoration: underline;
    outline: none;
}

/* Layer 3: Interactive Map */
.interactive-map-screen {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.interactive-map-screen .map-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.interactive-map-screen .map-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Scroll controls for Layer 3 */
.layer-3-controls {
    position: absolute;
    right: 80px;
    bottom: 60px;
    z-index: 20;
}

/* Legacy Layer 3 styles (keeping for backwards compatibility) */
.layer-3-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
}

.layer-3-message {
    text-align: center;
}

.layer-3-message h2 {
    font-family: 'Onest', sans-serif;
    font-size: var(--fluid-h2); /* 24px → 48px fluid */
    color: #041A31;
    margin-bottom: var(--fluid-space-sm); /* 8px → 16px fluid */
}

.layer-3-message p {
    font-size: var(--fluid-body); /* 16px → 18px fluid */
    color: #666;
}

/* Layer Indicator */
.layer-indicator {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.indicator-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(4, 26, 49, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.indicator-btn.active {
    background: #F9A01B;
    transform: scale(1.2);
}

.indicator-btn:hover {
    background: rgba(249, 160, 27, 0.6);
}

.indicator-btn:focus {
    outline: 2px solid #041A31;
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #041A31;
    color: white;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
    font-weight: 500;
}

.skip-link:focus {
    top: 0;
}

/* =============================================
   Responsive Styles
   ============================================= */

/* Tablet and smaller desktop */
@media (max-width: 1280px) {
    .hero-content-wrapper {
        left: 4.69%;  /* 60px / 1280px */
        width: 37.5%;  /* Maintain proportion */
        min-width: 400px;
    }

    .hero-card {
        max-width: 480px;
        padding: 2.5rem 3rem;  /* 40px 48px */
    }

    /* .hero-title - now uses mobile-first min-width queries per typography.md */

    .hero-map-container {
        width: 55%;
    }

    .scroll-controls {
        right: 40px;
    }

    /* Map info card */
    .map-info-card {
        width: 300px;
        padding: 24px;
        left: 40px;
        top: 100px;
    }

    /* Map info text now uses fluid clamp() - no size override needed */
    /* .landmark font-size handled by fluid --fluid-small */
}

/* Tablet */
@media (max-width: 1024px) {
    .hero-content-wrapper {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        min-width: auto;
        padding: 0 2.5rem;  /* 40px */
    }

    .hero-card {
        width: 100%;
        max-width: 600px;
        min-width: auto;
        margin-bottom: 2.5rem;  /* 40px */
    }

    /* .hero-title - now uses mobile-first min-width queries per typography.md */

    .hero-map-container {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 100%;
        max-width: 700px;
    }

    .dotted-pattern {
        background-size: 40px 40px;
        background-position: 20px 20px;
    }

    .scroll-controls {
        right: 24px;
        bottom: 40px;
    }

    .layer-indicator {
        right: 20px;
    }

    /* Map info card tablet */
    .map-info-card {
        width: 280px;
        padding: 20px;
        left: 24px;
    }

    /* Map info text now uses fluid clamp() - no size override needed */

    .cookie-banner {
        right: 24px;
        bottom: 24px;
        width: 300px;
        padding: 16px;
    }

    /* .landmark font-size handled by fluid --fluid-small */

    /* Travel badge tablet */
    .map-travel-badge {
        left: 24px;
        bottom: 100px;
    }

    /* Zoom controls tablet */
    .map-zoom-controls {
        right: 24px;
        bottom: 100px;
    }

    /* Scale indicator tablet */
    .map-scale-indicator {
        right: 24px;
        bottom: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-content-wrapper {
        padding: 0 1.5rem;  /* 24px */
    }

    .hero-card {
        padding: 2rem 1.75rem;  /* 32px 28px */
        border-radius: 20px;
    }

    /* Hero typography now uses fluid clamp() - no media query overrides needed */

    .logo-grid {
        gap: 12px;
    }

    .partner-logo {
        width: 60px;
    }

    .scroll-controls {
        right: 16px;
        bottom: 24px;
    }

    .scroll-indicator {
        width: 90px;
        height: 38px;
    }

    .scroll-mouse {
        width: 20px;
        height: 30px;
        border-radius: 10px;
    }

    .scroll-wheel {
        width: 3px;
        height: 6px;
        margin-top: 5px;
    }

    /* Scroll label now uses fluid clamp() */

    .layer-3-controls {
        right: 16px;
        bottom: 24px;
    }

    .layer-indicator {
        display: none;
    }

    /* Map info card mobile */
    .map-info-card {
        width: calc(100% - 32px);
        max-width: 350px;
        left: 16px;
        top: 90px;
        padding: 16px;
    }

    /* Map info text now uses fluid clamp() */

    .cookie-banner {
        right: 16px;
        bottom: 16px;
        width: calc(100% - 32px);
        max-width: 300px;
    }

    .map-landmarks {
        display: none;
    }

    /* Mobile markers */
    .map-marker {
        width: 36px;
        height: 36px;
    }

    .tooltip-text {
        font-size: var(--fluid-small);
        padding: 8px 14px;
    }

    /* Travel badge mobile */
    .map-travel-badge {
        bottom: auto;
        top: 320px;
        left: 16px;
        padding: 12px 16px;
        border-radius: 12px;
    }

    /* Travel time/label now use fluid clamp() */

    /* Zoom controls mobile */
    .map-zoom-controls {
        bottom: 100px;
        right: 16px;
    }

    .map-zoom-btn {
        width: 40px;
        height: 40px;
    }

    /* Scale indicator mobile */
    .map-scale-indicator {
        bottom: 24px;
        right: 16px;
    }

    .scale-bar {
        width: 50px;
    }

    /* Scale label now uses fluid clamp() */
}

/* Small mobile */
@media (max-width: 375px) {
    .hero-content-wrapper {
        padding: 0 1rem;  /* 16px */
    }

    .hero-card {
        padding: 1.5rem 1.25rem;  /* 24px 20px */
    }

    /* .hero-title - now uses mobile-first min-width queries per typography.md */

    .partner-logo {
        width: 50px;
    }
}

/* =============================================
   Layer 2: Travel Time Badge
   ============================================= */

.map-travel-badge {
    position: fixed;
    bottom: 120px;
    left: 49px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.layer-2.active .map-travel-badge {
    opacity: 1;
    transform: translateY(0);
}

.travel-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.travel-icon {
    width: 28px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.travel-icon.walk-icon {
    width: 20px;
    height: 20px;
    color: #666666;
}

.travel-time {
    font-family: var(--font-family-base);
    font-size: var(--fluid-body); /* 16px → 18px fluid */
    font-weight: 600;
    color: #041A31;
}

.travel-label {
    font-family: var(--font-family-base);
    font-size: var(--fluid-xs); /* 12px → 14px fluid */
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: var(--spacing-1);
    padding-top: var(--spacing-2);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* =============================================
   Layer 2: Map Zoom Controls
   ============================================= */

.map-zoom-controls {
    position: fixed;
    bottom: 40px;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    flex-direction: row;
    gap: 0;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

.layer-2.active .map-zoom-controls,
.layer-3.active .map-zoom-controls {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Desktop: position above continue button, center-aligned */
@media (min-width: 768px) {
    .map-zoom-controls {
        bottom: 180px;
        left: auto;
        right: 100px;
        transform: translateY(20px);
    }

    .layer-2.active .map-zoom-controls,
    .layer-3.active .map-zoom-controls {
        transform: translateY(0);
    }
}

.map-zoom-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #F9A01B;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.25);
}

.map-zoom-btn:first-child {
    border-radius: 12px 0 0 12px;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.map-zoom-btn:last-child {
    border-radius: 0 12px 12px 0;
}

.map-zoom-btn svg {
    width: 20px;
    height: 20px;
}

/* Only apply hover on devices that support it (not touch) */
@media (hover: hover) {
    .map-zoom-btn:hover {
        background: #F9A01B;
        color: white;
    }
}

.map-zoom-btn:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    color: #F9A01B;
}

.map-zoom-btn:focus-visible {
    outline: 2px solid #041A31;
    outline-offset: 2px;
}

.map-zoom-btn:active {
    transform: scale(0.95);
    background: #F9A01B;
    color: white;
}

/* Zoom level indicator */
.map-zoom-controls::after {
    content: attr(data-zoom);
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-family-base);
    font-size: var(--fluid-small);
    font-weight: 600;
    color: #666666;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.map-zoom-controls.show-level::after {
    opacity: 1;
}

/* =============================================
   Layer 2: Scale Indicator
   ============================================= */

.map-scale-indicator {
    position: fixed;
    bottom: 49px;
    right: 49px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 50;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease 0.5s, transform 0.5s ease 0.5s;
}

.layer-2.active .map-scale-indicator {
    opacity: 1;
    transform: translateY(0);
}

.scale-bar {
    width: 60px;
    height: 4px;
    background: #041A31;
    border-radius: 2px;
    position: relative;
}

.scale-bar::before,
.scale-bar::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 10px;
    background: #041A31;
    top: -3px;
}

.scale-bar::before {
    left: 0;
}

.scale-bar::after {
    right: 0;
}

.scale-label {
    font-family: var(--font-family-base);
    font-size: var(--fluid-xs); /* 12px → 14px fluid */
    font-weight: 500;
    color: #041A31;
}

/* =============================================
   Layer 2: Animated Bus
   ============================================= */

.animated-bus {
    position: absolute;
    width: 77px;
    height: 50px;
    z-index: 15;
    pointer-events: none;
    opacity: 0;

    /* Follow the orange dashed shuttle route: SEQU → Kelana Jaya LRT Station
       Coordinates aligned with the orange dashed line in layer2.svg */
    /* S-curve: top-right (SEQU) → curves left → curves back right (LRT Station) */
    offset-path: path('M 1000,600 Q 930,630 950,730 Q 980,790 1010,850');
    offset-rotate: 0deg;
    offset-anchor: center;
    offset-distance: 0%;
    animation: busShuttleRoute 45s linear infinite paused;
    transition: opacity 0.5s ease;
}

/* Only animate bus when Layer 2 is active */
.layer-2.active .animated-bus {
    opacity: 1;
    animation-play-state: running;
}

.bus-icon {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Bus shuttle route animation: travels to LRT station and back */
@keyframes busShuttleRoute {
    0% {
        offset-distance: 0%;
    }
    5% {
        offset-distance: 0%;
        /* Gentle start pause at SEQU */
    }
    45% {
        offset-distance: 100%;
    }
    55% {
        offset-distance: 100%;
        /* Pause at LRT station */
    }
    95% {
        offset-distance: 0%;
    }
    100% {
        offset-distance: 0%;
        /* Pause at SEQU before next trip */
    }
}

/* =============================================
   Layer 3: Facility Markers
   ============================================= */

.facility-map {
    /* Use the isometric facility view */
}

.facility-map img {
    object-fit: contain;
    object-position: center;
    background: linear-gradient(135deg, #F5F7FA 0%, #E8ECF3 100%);
}

.facility-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
}

/* Facility Marker Button */
.facility-marker {
    position: absolute;
    width: 56px;
    height: 56px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -85%);
    transition: transform 0.2s ease;
    z-index: 20;
}

/* TEMPORARILY DISABLED - hover effects
.facility-marker:hover,
.facility-marker:focus {
    transform: translate(-50%, -85%) scale(1.05);
    z-index: 30;
}
*/

.facility-marker:focus {
    outline: none;
}

.facility-marker:focus-visible .facility-pin {
    outline: 3px solid #041A31;
    outline-offset: 4px;
}

.facility-marker.active {
    z-index: 35;
}

/* Facility Pin */
.facility-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    pointer-events: none;
}

.facility-pin svg {
    width: 28px;
    height: 28px;
    transform: rotate(45deg);
    color: #F9A01B;
    pointer-events: none;
}

/* TEMPORARILY DISABLED - hover effects
.facility-marker:hover .facility-pin,
.facility-marker:focus .facility-pin,
.facility-marker.active .facility-pin {
    background: #F9A01B;
    transform: rotate(-45deg) scale(1.1);
}

.facility-marker:hover .facility-pin svg,
.facility-marker:focus .facility-pin svg,
.facility-marker.active .facility-pin svg {
    color: #FFFFFF;
}
*/

/* Pulse animation for markers */
@keyframes markerPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateX(-50%) scale(2);
        opacity: 0;
    }
}

.facility-marker::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #F9A01B;
    border-radius: 50%;
    animation: markerPulse 2s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

/* =============================================
   Facility Detail Panel
   ============================================= */

.facility-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 600px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 20px;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.25);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.facility-panel.open {
    transform: translateX(0);
}

.facility-panel[aria-hidden="false"] {
    transform: translateX(0);
}

.panel-content {
    padding: 0;
    min-height: 100vh;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Panel Back Button */
.map-close-btn {
    position: absolute;
    top: calc(27 / 1920 * 100vw);
    left: calc(27 / 1920 * 100vw);
    width: calc(40 / 1920 * 100vw);
    height: calc(40 / 1920 * 100vw);
    min-width: 32px;
    min-height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.map-close-btn svg {
    width: calc(20 / 1920 * 100vw);
    height: calc(20 / 1920 * 100vw);
    min-width: 16px;
    min-height: 16px;
}

.map-close-btn:hover svg line,
.map-close-btn:focus svg line {
    stroke: #F5953A;
}

.map-close-btn:hover {
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.map-close-btn:focus {
    outline: 2px solid #F9A01B;
    outline-offset: 2px;
}

/* Panel Gallery */
.panel-gallery {
    padding: 108px 75px 0 75px;
    margin-bottom: 0;
}

.gallery-main {
    width: 450px;
    height: 337px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 25px;
    background: #E8E8E8;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: object-fit 0.4s ease;
}

/* Staff image transition - shrink width to portrait ratio */
.gallery-main.staff-active {
    width: 252px; /* Portrait ratio: 337px height × 0.75 aspect = 252px width */
    margin-left: auto;
    margin-right: auto;
}

.gallery-main.staff-active .gallery-main-img {
    object-fit: cover;
    object-position: top center; /* Focus on face/upper body for portraits */
}

/* Loading state - hide image while loading to prevent old image flash */
.gallery-main.loading .gallery-main-img {
    opacity: 0;
}

.gallery-main .gallery-main-img {
    transition: opacity 0.15s ease-out;
}

.gallery-thumbnails {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    position: relative;
}

.gallery-nav {
    width: 15px;
    height: 27px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: all 0.2s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.gallery-nav.gallery-prev {
    left: -35px;
}

.gallery-nav.gallery-next {
    right: -35px;
}

.gallery-nav svg {
    width: 15px;
    height: 27px;
}

.gallery-nav:hover svg path,
.gallery-nav:focus svg path {
    fill: #E8890B;
}

.gallery-nav:focus {
    outline: 2px solid #F9A01B;
    outline-offset: 4px;
    border-radius: 2px;
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-thumbs-container {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    padding: 4px 0;
    /* GPU acceleration for smooth scrolling */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: scroll-position;
    touch-action: pan-x;
    width: 100%;
}

.gallery-thumbs-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.gallery-thumbs-container:active,
.gallery-thumbs-container.dragging {
    cursor: grabbing;
}

.gallery-thumb {
    width: 100px;
    height: 75px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    padding: 0;
    background: transparent;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover,
.gallery-thumb:focus {
    border-color: #F5953A;
}

.gallery-thumb.active {
    border-color: #F5953A;
}

/* Panel Text Content */
.panel-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 30px 75px 40px 75px;
}

.panel-title {
    font-family: 'Onest', sans-serif;
    font-size: var(--fluid-h2); /* 24px → 48px fluid */
    font-style: normal;
    font-weight: 400;
    line-height: var(--line-height-tight); /* 1.15 */
    color: #041A31;
    margin: 0 0 var(--fluid-space-sm) 0; /* 8px → 16px fluid */
}

/* Panel Description */
.panel-description {
    font-family: 'Onest', sans-serif;
    font-size: var(--fluid-body-lg); /* 18px → 22px fluid */
    font-style: normal;
    font-weight: 400;
    line-height: var(--line-height-normal); /* 1.5 */
    color: #041A31;
    margin: 0;
    padding-top: var(--fluid-space-sm); /* 8px → 16px fluid */
    white-space: pre-line !important; /* Preserve line breaks from \n */
}

/* Panel Link */
.panel-link {
    font-family: 'Onest', sans-serif;
    font-size: var(--fluid-body-lg); /* 18px → 22px fluid */
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    color: #283892;
    text-decoration: underline;
    text-decoration-style: solid;
    text-underline-offset: auto;
    transition: color 0.2s ease;
    margin-top: var(--fluid-space-xl); /* 32px → 80px fluid */
}

.panel-link:hover,
.panel-link:focus {
    color: #F5953A;
}

.panel-link:focus {
    outline: 2px solid #F9A01B;
    outline-offset: 4px;
    border-radius: 2px;
}

/* Staff thumbnail indicator in gallery */
.gallery-thumb.staff-thumb {
    position: relative;
}

.gallery-thumb.staff-thumb::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: #F9A01B url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") center/14px no-repeat;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Staff info styling in panel */
.panel-staff-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.panel-staff-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #FEF3E2;
    color: #B45309;
    font-family: var(--font-family-base);
    font-size: var(--fluid-small);
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
}

.panel-staff-joined {
    font-family: var(--font-family-base);
    font-size: var(--fluid-small);
    color: #666;
}

/* Panel Overlay (for closing on outside click) */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.panel-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* =============================================
   Responsive: Animated Bus & Panel
   ============================================= */

@media (max-width: 1024px) {
    .animated-bus {
        width: 58px;
        height: 38px;
    }

    .facility-panel {
        width: 500px;
        height: 100vh;
    }

    .panel-gallery {
        padding: 80px 50px 0 50px;
    }

    .gallery-main {
        width: 100%;
        height: auto;
        aspect-ratio: 450 / 337;
    }

    .gallery-main.staff-active {
        width: 56%; /* Portrait ratio on tablet */
        aspect-ratio: 3 / 4;
    }

    .panel-text {
        padding: 25px 50px 30px 50px;
    }

    /* Panel typography now uses fluid clamp() - no size overrides needed */

    .gallery-thumb {
        width: 100px;
        height: 75px;
    }
}

@media (max-width: 768px) {
    /* Bus remains visible - map maintains 1920px width with drag */
    .animated-bus {
        width: 50px;
        height: 32px;
    }

    .facility-marker {
        width: 40px;
        height: 40px;
    }

    .facility-pin {
        width: 40px;
        height: 40px;
    }

    .facility-panel {
        width: 100%;
        border-radius: 20px 20px 0 0;
        height: auto;
        max-height: 85vh;
        top: auto;
        bottom: 0;
        transform: translateY(100%);
    }

    .facility-panel.open,
    .facility-panel[aria-hidden="false"] {
        transform: translateY(0);
    }

    /* Panel Drag Handle - larger touch target for easier dragging */
    .panel-drag-handle {
        display: flex;
        justify-content: center;
        padding: 24px 0 16px;
        cursor: grab;
    }

    .panel-drag-handle:active {
        cursor: grabbing;
    }

    .drag-handle-bar {
        width: 64px;
        height: 6px;
        background: #9CA3AF;
        border-radius: 3px;
    }

    .map-close-btn {
        top: 12px;
        left: 12px;
    }

    .panel-gallery {
        padding: 60px 15% 0 15%;
        margin-bottom: 0;
    }

    .gallery-main {
        width: 100%;
        height: auto;
        aspect-ratio: 450 / 337;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .gallery-main.staff-active {
        width: 60%; /* Portrait ratio on mobile */
        aspect-ratio: 3 / 4;
    }

    .gallery-thumbnails {
        gap: 10px;
        width: 100%;
        position: relative;
    }

    .gallery-nav {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .gallery-nav.gallery-prev {
        left: -25px;
        margin: 0;
    }

    .gallery-nav.gallery-next {
        right: -25px;
        margin: 0;
    }

    .gallery-thumbs-container {
        width: 100%;
        max-width: 100%;
    }

    .gallery-thumb {
        width: 70px;
        height: 52px;
        border-radius: 4px;
    }

    .panel-text {
        padding: 20px 20px 32px 20px;
        align-items: center;
        text-align: center;
    }

    .panel-content {
        min-height: auto;
    }

    /* Panel typography now uses fluid clamp() - no size overrides needed */
}

@media (max-width: 375px) {
    .facility-pin {
        width: 32px;
        height: 32px;
    }

    .facility-marker::before {
        width: 12px;
        height: 12px;
    }
}

/* ========================================
   MOBILE BORDER RADIUS OVERRIDE
   All 20px border-radius becomes 10px at 768px and below
   ======================================== */
@media (max-width: 768px) {
    .hero-card {
        border-radius: 10px;
    }

    .scroll-instruction {
        border-radius: 10px;
    }

    .map-interactive {
        border-radius: 10px;
    }

    .facility-panel {
        border-radius: 10px 10px 0 0;
    }

    .panel-gallery-card {
        border-radius: 10px;
    }

    .gallery-main {
        border-radius: 10px;
    }

    .category-tag {
        border-radius: 10px;
    }
}
