/* Variables */
:root {
    --navy-primary: #061525;
    --navy-secondary: #0B243B;
    --brand-blue: #006EDB;
    --accent-blue: #1597FF;
    --white: #FFFFFF;
    --off-white: #F5F7F9;
    --tech-grey: #647180;
    --border-grey: #DCE3E9;
    --font-head: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
}

.jasch-global-section {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    color: var(--navy-primary);
    padding: 120px 0;
    font-family: var(--font-body);
}

.jasch-global-container {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
}

.jasch-global-header {
    max-width: 700px;
    margin-bottom: 70px;
}

.jasch-global-header .eyebrow {
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 11px;
    color: var(--brand-blue);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.jasch-global-header .eyebrow::before {
    content: "";
    width: 32px;
    height: 2px;
    background: var(--brand-blue);
}

.jasch-global-title {
    margin: 0;
    font-size: clamp(44px, 5vw, 68px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    font-family: var(--font-head);
}

.jasch-global-title .theme-txt {
    color: var(--brand-blue);
}

.jasch-global-description {
    max-width: 620px;
    margin: 24px 0 0;
    color: var(--tech-grey);
    font-size: 15px;
    line-height: 1.75;
}

.jasch-global-map-layout {
    display: grid;
    /* Desktop: tabs = 3 cols (narrow left), map = 9 cols (wide right) */
    grid-template-columns: minmax(280px, 3fr) minmax(0, 9fr);
    gap: 60px;
    align-items: center;
}

/* Map Stage */
.jasch-map-stage {
    position: relative;
    min-height: 500px;
    /* Keep a sane aspect ratio so the SVG always has a real rendered
       size on mobile (prevents the highlighted country from being
       zoomed off-screen when the container collapses). */
    aspect-ratio: 16 / 9;
    background: #f5f8fa;
    overflow: hidden;
    border: 1px solid #e3e9ed;
}

.jasch-map-grid {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(6, 21, 37, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 21, 37, 0.045) 1px, transparent 1px);
    background-size: 50px 50px;
}

.jasch-svg-map {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.jasch-svg-map svg {
    width: 100%;
    height: 100%;
}

.jasch-svg-map .land {
    fill: #dfe8ed;
    stroke: #ffffff;
    stroke-width: 0.5;
    transition: fill 0.3s ease;
}

/* Hide any leftover <text> labels inside the SVG (defensive — the SVG
   file itself has already been cleaned, but this protects against
   future SVG swaps). */
.jasch-svg-map text {
    display: none !important;
}

.jasch-svg-map .land.jasch-clickable {
    cursor: pointer;
    fill: #c8d8e6;
}

.jasch-svg-map .land.jasch-clickable:hover {
    fill: #BFD7F5;
}

.jasch-svg-map .land.jasch-selected {
    fill: var(--brand-blue);
    stroke: #ffffff;
    stroke-width: 1.2;
}

.jasch-svg-map .land.jasch-selected:hover {
    fill: var(--accent-blue);
}

.jasch-map-caption {
    position: absolute;
    left: 30px;
    bottom: 26px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7a8995;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    z-index: 5;
}

.jasch-caption-line {
    width: 28px;
    height: 1px;
    background: var(--brand-blue);
}

.jasch-map-status {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--navy-primary);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    z-index: 5;
}

.jasch-status-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-blue);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--brand-blue);
}

/* Navigation */
.jasch-navigation-heading {
    color: var(--tech-grey);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-grey);
}

.jasch-location-tabs {
    display: flex;
    flex-direction: column;
}

.jasch-location-tab {
    width: 100%;
    display: grid;
    grid-template-columns: 38px 48px 1fr 35px;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border: 0;
    border-bottom: 1px solid #dfe6ea;
    background: transparent;
    color: var(--navy-primary);
    text-align: left;
    cursor: pointer;
    transition: background 250ms ease, padding 250ms ease;
    font-family: var(--font-body);
}

.jasch-location-tab:hover,
.jasch-location-tab.active {
    background: #f5f8fa;
    padding-left: 15px;
    padding-right: 15px;
}

.jasch-tab-number {
    color: #9aa7b0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.jasch-location-tab.active .jasch-tab-number {
    color: var(--brand-blue);
}

.jasch-tab-flag {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e0e6ea;
    font-size: 21px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(6, 21, 37, 0.06);
}

.jasch-tab-content strong {
    color: var(--navy-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: block;
}

.jasch-tab-arrow {
    color: #8c9aa4;
    font-size: 18px;
    transition: color 200ms ease, transform 200ms ease;
}

.jasch-location-tab:hover .jasch-tab-arrow,
.jasch-location-tab.active .jasch-tab-arrow {
    color: var(--brand-blue);
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 991px) {
    .jasch-global-section { padding: 90px 0; }
    /* Tablet & mobile: single column, tabs on top (horizontal scroll),
       map below full width. */
    .jasch-global-map-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .jasch-map-stage { min-height: 380px; aspect-ratio: 4 / 3; }

    /* Horizontal scrollable tab strip on top */
    .jasch-global-navigation {
        width: 100%;
        overflow: hidden;   /* contain horizontal overflow so page doesn't scroll */
    }
    .jasch-navigation-heading { margin-bottom: 14px; }
    .jasch-location-tabs {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;            /* critical — chips must not wrap */
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;  /* stop pull-to-refresh hijack */
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        gap: 10px;
        padding: 4px 2px 12px;
        scrollbar-width: thin;
        scrollbar-color: var(--brand-blue) transparent;
        border-bottom: 1px solid var(--border-grey);
    }
    /* Webkit scrollbar styling */
    .jasch-location-tabs::-webkit-scrollbar { height: 6px; }
    .jasch-location-tabs::-webkit-scrollbar-track { background: transparent; }
    .jasch-location-tabs::-webkit-scrollbar-thumb {
        background: var(--brand-blue);
        border-radius: 3px;
    }
    /* Each tab becomes a fixed-width "chip" */
    .jasch-location-tab {
        flex: 0 0 auto;              /* don't grow, don't shrink, fixed basis */
        width: auto;
        min-width: 170px;
        scroll-snap-align: start;
        /* Reset desktop-only styles that break the chip layout */
        border: 1px solid #dfe6ea;
        border-radius: 8px;
        background: #ffffff;
        white-space: nowrap;
        grid-template-columns: 28px 36px 1fr 20px;
        gap: 8px;
        padding: 12px 14px;
    }
    .jasch-location-tab:hover,
    .jasch-location-tab.active {
        padding-left: 14px;
        padding-right: 14px;
        background: #f5f8fa;
        border-color: var(--brand-blue);
    }
    .jasch-tab-flag { width: 32px; height: 32px; font-size: 18px; }
    .jasch-tab-content strong { font-size: 13px; }
}

@media (max-width: 767px) {
    .jasch-global-section { padding: 70px 0; }
    .jasch-global-container { width: calc(100% - 32px); }
    .jasch-global-header { margin-bottom: 30px; }
    .jasch-global-title { font-size: 36px; }
    .jasch-map-stage { min-height: 300px; aspect-ratio: 4 / 3; }
    .jasch-location-tab {
        min-width: 150px;
        padding: 10px 12px;
        grid-template-columns: 24px 32px 1fr 18px;
        gap: 6px;
    }
    .jasch-tab-flag { width: 28px; height: 28px; font-size: 16px; }
    .jasch-tab-content strong { font-size: 12px; }
    .jasch-tab-number { font-size: 9px; }
    .jasch-tab-arrow { font-size: 14px; }
}
