/* ================================================================
   FTG PROJECT GLOBE  —  Stylesheet v1.1.0
   Palette (triadic):
     Cyan  #1DADED   Lime  #7EC01A   Hot Pink  #F72585
   Base: Navy #0a0f2e  |  Light UI throughout
   Font: Inter (Google Fonts)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Variables ──────────────────────────────────────────────── */
.ftg-globe-wrapper {
    --cyan:        #1DADED;
    --cyan-light:  rgba(29, 173, 237, 0.18);
    --cyan-glow:   rgba(29, 173, 237, 0.45);
    --lime:        #7EC01A;
    --lime-light:  rgba(126, 192, 26, 0.18);
    --lime-glow:   rgba(126, 192, 26, 0.45);
    --light-aqua:       #7ECDF2;
    --light-aqua-light: rgba(126, 205, 242, 0.18);
    --light-aqua-glow:  rgba(126, 205, 242, 0.45);
    --navy:        #0a0f2e;
    --ink:         #0F172A;
    --body:        #334155;
    --muted:       #64748B;
    --border:      rgba(0, 0, 0, 0.08);
    --border-mid:  rgba(0, 0, 0, 0.12);
    --glass-light: rgba(255, 255, 255, 0.92);
    --glass-white: rgba(255, 255, 255, 0.98);
    --panel-w:     390px;
    --radius:      14px;
    font-family: 'Inter', system-ui, sans-serif;
}

/* ── Section header (above globe) ──────────────────────────── */
.ig-section-header {
    display: none !important;
}

.ig-section-title {
    font-family: 'Space Grotesk', system-ui, sans-serif !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.ig-section-intro {
    display: none; /* moved inside map — no longer rendered outside */
}

/* ── Outer container — kills WordPress p-tag margin/gap ─────── */
.ftg-globe-container {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
    font-size: 0;
    display: block;
}
.ftg-globe-container > * {
    line-height: normal;
    font-size: 16px;
}

/* Kill any paragraph margin WordPress adds around the shortcode */
p:has(.ftg-globe-container),
p:has(.ftg-globe-wrapper) {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.ftg-globe-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: #060d1f;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.08),
        0 4px 24px rgba(0, 0, 0, 0.10);
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* ── Map canvas ─────────────────────────────────────────────── */
#ftgGlobeMap {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Vignette ───────────────────────────────────────────────── */
.ig-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    border-radius: var(--radius);
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.18) 100%);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.12);
}

/* ================================================================
   HUD (top-left)
   ================================================================ */
.ig-hud {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ig-hud-top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ig-hud-count-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ig-hud-intro {
    margin: 6px 0 0;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.5;
    max-width: 280px;
    border-top: 1px solid var(--border-mid);
    padding-top: 6px;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.ig-hud-count {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: var(--glass-light);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-mid);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.ig-hud-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 8px var(--lime);
    flex-shrink: 0;
    animation: igBlink 2.4s ease-in-out infinite;
}

@keyframes igBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}

/* Rotation toggle — base container */
.ig-rotate-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.ig-rotate-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--muted, #64748B);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    outline: none;
    transition: color .2s;
    padding: 0;
}

.ig-rotate-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
    line-height: 1;
    color: var(--muted, #64748B);
}

/* Desktop: entire wrap = one unified green pill button */
.ftg-globe-wrapper .ig-rotate-wrap {
    background: var(--lime, #7EC01A);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    padding: 3px 12px 3px 4px;
    box-shadow: 0 2px 8px rgba(126,192,26,0.28);
    cursor: pointer;
    transition: filter .15s;
}
.ftg-globe-wrapper .ig-rotate-wrap:hover {
    filter: brightness(1.07);
}
.ftg-globe-wrapper .ig-rotate-btn {
    background: transparent !important;
    color: white !important;
}
.ftg-globe-wrapper .ig-rotate-btn svg {
    stroke: white !important;
}
.ftg-globe-wrapper .ig-rotate-label {
    color: white !important;
}

.ig-rotate-btn.ig-spinning svg {
    animation: igSpin 1.6s linear infinite;
}
.ig-rotate-btn.ig-spinning { color: white; }
.ftg-globe-wrapper .ig-rotate-btn.ig-spinning svg { stroke: white !important; }

@keyframes igSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ================================================================
   LEGEND / KEY  (bottom-left)
   ================================================================ */
.ig-legend {
    position: absolute;
    bottom: 38px;
    left: 16px;
    z-index: 10;
    background: var(--glass-light);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-mid);
    border-radius: 10px;
    padding: 10px 14px 11px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    pointer-events: none;
}

.ig-legend-title {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

.ig-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.ig-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

/* ── Brand watermark ────────────────────────────────────────── */
.ig-brand-mark {
    position: absolute;
    bottom: 14px;
    left: 16px;
    z-index: 10;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    pointer-events: none;
}

/* ================================================================
   ANIMATED MARKERS
   ================================================================ */
.ig-marker {
    position: absolute;
    transform: translate(-50%, -100%);
    cursor: pointer;
    will-change: transform;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ig-marker:hover {
    transform: translate(-50%, -100%) scale(1.22) translateY(-4px);
    z-index: 999 !important;
}

.ig-pin {
    position: relative;
    z-index: 2;
    display: block;
    animation: igFloat 3s ease-in-out infinite;
}

/* Pulse rings — one per tier */
.ig-pulse {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transform: translateX(-50%) translateY(30%);
    z-index: 1;
    animation: igPulse 2.4s ease-out infinite;
}

.ig-pulse--basic      { background: var(--light-aqua); }
.ig-pulse--photo      { background: var(--cyan); }
.ig-pulse--case-study { background: var(--lime); }

/* ── Active pin ripple rings ──────────────────────────────── */
/* Container sits at pin tip (bottom-center of marker div). */
.ig-pin-ripple {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}
.ig-pin-ripple-ring {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid currentColor;
    left: -12px;
    top: -12px;
    opacity: 0;
    transform: scale(0.2);
}
.ig-pin-ripple--active .ig-pin-ripple-ring {
    animation: igRipple 2s ease-out infinite;
}
.ig-pin-ripple--active .ig-pin-ripple-ring:nth-child(2) { animation-delay: 0.65s; }
.ig-pin-ripple--active .ig-pin-ripple-ring:nth-child(3) { animation-delay: 1.3s; }

@keyframes igRipple {
    0%   { transform: scale(0.2); opacity: 0.9; }
    100% { transform: scale(5);   opacity: 0;   }
}

/* Drop shadow beneath pin */
.ig-pin-shadow {
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    filter: blur(3px);
    z-index: 0;
}

/* Hover tooltip */
.ig-marker-label {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-white);
    border: 1px solid var(--border-mid);
    backdrop-filter: blur(12px);
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 100px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s;
    letter-spacing: 0.02em;
    z-index: 3;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.ig-marker:hover .ig-marker-label { opacity: 1; }

@keyframes igFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

@keyframes igPulse {
    0%   { transform: translateX(-50%) translateY(30%) scale(1);   opacity: 0.8; }
    70%  { transform: translateX(-50%) translateY(30%) scale(3.4); opacity: 0; }
    100% { transform: translateX(-50%) translateY(30%) scale(3.4); opacity: 0; }
}

/* ================================================================
   PROJECT PANEL  —  Light design, slides in from right
   ================================================================ */
/* ── Force Inter on all globe UI — overrides theme fonts ──── */
.ig-panel, .ig-panel *, .ig-panel *::before, .ig-panel *::after,
.ig-legend, .ig-legend *,
.ig-hud, .ig-hud *,
.ig-marker-label,
.ig-brand-mark {
    font-family: 'Inter', system-ui, sans-serif !important;
}

/* Space Grotesk for headings — matches flint.zipperstudio.com */
.ig-panel-title,
.ig-panel-category,
.ig-legend-title {
    font-family: 'Space Grotesk', system-ui, sans-serif !important;
}

.ig-panel {
    position: absolute;
    top: 0;
    right: calc(-1 * var(--panel-w) - 2px);
    width: var(--panel-w);
    height: 100%;
    background: #ffffff;  /* fully opaque — prevents dark wrapper bg bleeding through border-radius corners */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 48px rgba(0,0,0,0.14);
    z-index: 30;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Extend 6px past the wrapper edge so the white panel bg fully covers the
   border-radius corner on all DPR values — overflow:hidden clips it cleanly. */
.ig-panel.ig-panel--open { right: -6px; }

/* Close button */
.ig-panel-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-mid);
    background: #F1F5F9;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    transition: background .18s, border-color .18s, color .18s;
    outline: none;
}

.ig-panel-close:hover {
    background: var(--cyan-light);
    border-color: var(--cyan);
    color: var(--cyan);
}

/* Scroll wrap — flex container so children (scroll area + fade + hint) stack correctly.
   Desktop: flex:1 fills the full panel height (panel is height:100%).
   Mobile: overridden below to flex:0 1 auto so the nav footer stays pinned. */
.ig-scroll-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Scroll area */
.ig-panel-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}

.ig-panel-scroll::-webkit-scrollbar       { width: 4px; }
.ig-panel-scroll::-webkit-scrollbar-track { background: transparent; }
.ig-panel-scroll::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

/* ── Panel internals ─────────────────────────────────────── */
.ig-panel-image-wrap {
    position: relative;
    /* Extend past scrollbar gutter — overflow-x:hidden on scroll area clips it */
    left: 0;
    right: 0;
    width: 100%;
    height: 210px;
    overflow: hidden;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    line-height: 0;   /* kills inline gap */
    font-size: 0;
}

/* Absolute fill — immune to theme "height:auto !important" resets on img */
.ig-panel-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    transition: transform 0.6s ease;
}

.ig-panel-image-wrap { cursor: zoom-in; }
.ig-panel-image:hover { transform: scale(1.04); }

/* ── Lightbox ─────────────────────────────────────────────── */
.ig-lightbox {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 200;
    background: rgba(10, 15, 46, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.ig-lightbox.ig-lightbox--open {
    display: flex;
}
.ig-lightbox img {
    max-width: 92%;
    max-height: 88%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    animation: igLbIn 0.22s ease;
    cursor: default;
}
@keyframes igLbIn {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
}
.ig-lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    transition: background .18s;
}
.ig-lightbox-close:hover { background: rgba(255,255,255,0.22); }

.ig-panel-no-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #EFF6FF 0%, #F0FDF4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

/* Image fade removed — keep rule but clear it */
.ig-panel-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 0;
    background: none;
    pointer-events: none;
}

/* Body — no top padding so tier bar sits flush against the image */
.ig-panel-body {
    padding: 0 18px 20px;
}

/* Outer column: title+button row stacked above location */
.ig-panel-title-location {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    padding-top: 6px;
}

/* Inner row: title + Read More button, same line */
.ig-panel-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tier accent bar — bleeds full width past body padding */
.ig-panel-tier-bar {
    height: 3px;
    border-radius: 0;
    margin: 0 -18px 10px;
}

/* Products eyebrow — small caps label + pills above title */
.ig-products-eyebrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
}

.ig-eyebrow-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94A3B8;
    flex-shrink: 0;
}

.ig-eyebrow-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Services + Industries — tiny pills above description */
.ig-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

/* Tiny modifier for meta pills */
.ig-tag--tiny {
    font-size: 9px !important;
    padding: 0px 6px !important;
    letter-spacing: 0.03em;
    line-height: 1.6 !important;
}

.ig-panel-category {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ig-panel-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.15;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: -0.02em;
    flex: 1;
    text-align: left;
}

.ig-panel-location {
    display: flex;
    align-items: flex-start;  /* icon stays top-aligned when text wraps */
    flex-wrap: wrap;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;   /* tight so wrapped location doesn't create a big gap */
    color: var(--cyan);
    margin: 0;
}

/* Tags — color-coded pills, no labels */
.ig-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
}

.ig-tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 1px 8px;
    border-radius: 100px;
    border: 1px solid transparent;
    line-height: 1.5;
}

/* Products — light aqua */
.ig-tag--product {
    background: rgba(126, 205, 242, 0.18);
    color: #0e6e9e;
    border-color: rgba(126, 205, 242, 0.5);
    font-size: 9px !important;
    padding: 0px 6px !important;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.6 !important;
}

/* Technical Support — cyan */
.ig-tag--service {
    background: rgba(29, 173, 237, 0.12);
    color: #0a5f8a;
    border-color: rgba(29, 173, 237, 0.35);
}

/* Industries — lime green */
.ig-tag--industry {
    background: rgba(126, 192, 26, 0.12);
    color: #4a7010;
    border-color: rgba(126, 192, 26, 0.35);
}

/* Other Products (non-FTG) — purple/violet */
.ig-tag--other-product {
    background: rgba(139, 92, 246, 0.10);
    color: #5b21b6;
    border-color: rgba(139, 92, 246, 0.30);
    font-size: 9px !important;
    padding: 0px 6px !important;
}

/* Other Products row — label + chips */
.ig-other-products-row {
    margin-top: 6px;
}
.ig-other-products-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7C3AED;
    margin-bottom: 4px;
}

/* Linked tag pill */
.ig-tag-link {
    text-decoration: none !important;
    display: inline-flex;
    border-radius: 100px;
}
.ig-tag-link .ig-tag {
    transition: opacity 0.15s, transform 0.15s;
    cursor: pointer;
}
.ig-tag-link:hover .ig-tag {
    opacity: 0.75;
    transform: translateY(-1px);
}

.ig-divider {
    height: 1px;
    background: #F1F5F9;
    /* bleed full width past body padding */
    margin: 10px -18px;
}

.ig-panel-desc {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--body);
    margin: 0 0 20px;
    font-weight: 400;
}

/* Key Highlights checklist */
.ig-highlights {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ig-highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--body);
}
.ig-highlight-check {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--lime);
}

/* CTA button — compact inline, sits beside title */
.ig-panel-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform .2s, box-shadow .2s, opacity .2s;
}

.ig-panel-cta:hover {
    transform: translateY(-2px);
    opacity: 0.92;
    color: #fff !important;
    text-decoration: none !important;
}

.ig-panel-cta svg {
    transition: transform .2s;
}

.ig-panel-cta:hover svg { transform: translateX(3px); }

/* PDF download link — sits below meta tags */
.ig-panel-pdf {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: #1DADED;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity .2s;
}

.ig-panel-pdf:hover {
    opacity: 0.75;
    text-decoration: none;
    color: #1DADED;
}

.ig-panel-pdf svg {
    flex-shrink: 0;
}

/* ── Mobile bar (drag handle + back-to-map) — hidden on desktop ── */
.ig-panel-mobile-bar {
    display: none;
}

/* ── Map-peek overlay — tap the visible map strip to close panel ── */
.ig-map-peek-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;    /* below all pin tiers (basic=10, photo=20, case-study=30) so pins stay clickable */
    cursor: pointer;
    background: transparent;
}

/* ── Panel scroll-fade gradient ────────────────────────── */
.ig-scroll-fade {
    position: absolute;
    bottom: 0;      /* shifted up by JS above nav footer */
    left: 0;
    right: 0;
    height: 72px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.97));
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.25s;
}

/* ── Pulsing "more below" expand hint (mobile only) ───── */
@keyframes igScrollPulse {
    0%, 100% { transform: translateX(-50%) translateY(0px);  box-shadow: 0 2px 12px rgba(22,45,82,0.18), inset 0 1px 0 rgba(255,255,255,1), inset 0 -1px 0 rgba(0,0,0,0.04); }
    50%       { transform: translateX(-50%) translateY(3px);  box-shadow: 0 5px 18px rgba(22,45,82,0.28), inset 0 1px 0 rgba(255,255,255,1), inset 0 -1px 0 rgba(0,0,0,0.04); }
}
.ig-scroll-hint {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* bottom set by JS */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: linear-gradient(180deg, #ffffff 0%, #f0f2f5 100%);
    color: #162D52 !important;
    border: 1.5px solid rgba(22, 45, 82, 0.45);
    border-radius: 100px;
    padding: 7px 16px 6px;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    white-space: nowrap;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow: 0 2px 12px rgba(22,45,82,0.18),
                inset 0 1px 0 rgba(255,255,255,1),
                inset 0 -1px 0 rgba(0,0,0,0.04);
}
.ig-scroll-hint svg { flex-shrink: 0; stroke: #162D52 !important; }
.ig-scroll-hint-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
}
.ig-scroll-hint--visible {
    opacity: 1;
    pointer-events: auto;
    animation: igScrollPulse 1.9s ease-in-out infinite;
}

/* ── Panel nav footer — pinned, never clipped by scroll area ── */
.ig-panel-nav-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 3;
}

/* ── Panel prev/next nav ───────────────────────────────── */
.ig-panel-nav {
    display: flex;
    border-top: 1px solid #F1F5F9;
    background: #FAFAFA;
    flex-shrink: 0;
}

.ig-panel-nav-btn {
    flex: 1;
    padding: 11px 8px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: color .18s, background .18s;
    outline: none;
    font-family: inherit;
}

.ig-panel-nav-btn:hover {
    color: var(--ink);
    background: #F1F5F9;
}

.ig-panel-nav-btn:first-child { border-right: 1px solid #F1F5F9; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 600px) {
    .ftg-globe-wrapper {
        --panel-w: 100%;
        border-radius: 10px;
    }

    /* ── Globe canvas: shorter on phones ── */
    #ftgGlobeWrapper { height: 420px !important; }

    /* ── Bottom-sheet panel ──
       Absolute-positioned zones: no flex / grid sizing ambiguities at all.
       Bar (50 px) → scroll wrap (middle) → nav footer (49 px).             */
    .ig-panel {
        top: auto;
        right: 0;
        bottom: -100%;
        width: 100%;
        height: 50%;
        display: block;   /* children are individually absolute-positioned */
        border-left: none;
        border-top: 1px solid var(--border);
        border-radius: 16px 16px 0 0;
        transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                    height 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .ig-panel.ig-panel--open     { bottom: 0; }
    .ig-panel.ig-panel--expanded { height: 75%; }  /* auto-applied when case study present */

    /* Scroll wrap: fills the space between the mobile bar and nav footer */
    .ig-scroll-wrap {
        position: absolute;
        top: 50px;    /* mobile bar: 8px pad + 4px handle + 6px gap + 28px btn + 4px pad */
        bottom: 49px; /* nav footer: 48px min-height btn + 1px border-top */
        left: 0;
        right: 0;
        overflow: hidden;
        flex: none;
        min-height: 0;
    }

    /* Scroll area: absolutely fills the scroll wrap.
       Using top/bottom absolute coords is 100 % reliable — no flex/height-% ambiguity. */
    .ig-panel-scroll {
        position: absolute !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: auto !important;   /* reset; absolute coords define the size */
        flex: none !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: none !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Fade: at the bottom of the scroll wrap, just above the nav footer */
    .ig-scroll-fade { bottom: 0 !important; }

    /* Expand hint: floats above the fade */
    .ig-scroll-hint { bottom: 12px !important; }

    /* Nav footer: pinned at the panel bottom with opaque background */
    .ig-panel-nav-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: #FAFAFA;
        z-index: 4;
    }

    /* Mobile bar — drag handle + back button; pinned at the panel top */
    .ig-panel-mobile-bar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2;
        background: #fff;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 16px 4px;
    }

    .ig-panel-drag-handle {
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: #CBD5E1;
        margin-bottom: 6px;
    }

    .ig-panel-back {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        align-self: flex-start;
        height: 28px;
        border-radius: 14px;
        background: #F1F5F9;
        border: 1px solid var(--border-mid);
        padding: 0 12px 0 9px;
        font-size: 12px;
        font-weight: 700;
        color: var(--cyan);
        cursor: pointer;
        letter-spacing: 0.03em;
        font-family: inherit;
        outline: none;
        white-space: nowrap;
        transition: background .18s, border-color .18s;
    }

    .ig-panel-back:active {
        opacity: 0.7;
    }

    /* Map-peek overlay — covers exposed map strip above bottom sheet */
    .ig-map-peek-overlay {
        display: block;
    }

    /* iOS smooth scroll */
    .ig-panel-scroll {
        -webkit-overflow-scrolling: touch;
    }

    /* ── Image ── */
    .ig-panel-image-wrap { height: 160px; }

    /* ── Title row: allow wrap on very narrow screens ── */
    .ig-panel-title-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* ── Touch targets — nav buttons ── */
    .ig-panel-nav-btn {
        min-height: 48px;
        font-size: 12px;
        padding: 14px 8px;
    }

    /* ── Close button: bigger tap area ── */
    .ig-panel-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }

    /* ── Mobile: naked green circle, no unified pill wrap ── */
    /* Higher specificity (.ftg-globe-wrapper prefix) beats the desktop rule */
    .ftg-globe-wrapper .ig-rotate-wrap {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        background: none !important;
        border: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        cursor: default !important;
        filter: none !important;
    }
    .ftg-globe-wrapper .ig-rotate-btn {
        background: var(--lime, #7EC01A) !important; /* green circle on mobile */
        color: white !important;
        width: 36px;
        height: 36px;
        cursor: pointer;
    }
    .ftg-globe-wrapper .ig-rotate-label {
        font-size: 10px;
        text-align: center;
        line-height: 1.3;
        white-space: normal;
        color: rgba(255,255,255,0.92) !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.55);
    }

    /* ── Lightbox close: bigger on touch ── */
    .ig-lightbox-close {
        width: 44px;
        height: 44px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    /* ── HUD ── */
    .ig-hud-count { font-size: 11px; padding: 6px 11px; }

    /* ── Legend: compact on mobile (always show) ── */
    .ig-legend {
        display: block;
        bottom: 12px;
        left: 10px;
        padding: 7px 10px;
        border-radius: 6px;
    }
    .ig-legend-title { font-size: 9px; margin-bottom: 5px; }
    .ig-legend-item  { font-size: 11px; gap: 5px; margin-bottom: 3px; }
    .ig-legend-dot   { width: 9px; height: 9px; }
}

/* ── Embed mode: always fill full viewport height ─────────── */
body.ftg-embed #ftgGlobeWrapper,
body.ftg-embed .ftg-globe-wrapper {
    height: 100dvh !important;
    height: 100vh  !important; /* fallback for older browsers */
}

/* ── Embed mode: taller panel on mobile ─────────────────────────── */
@media (max-width: 600px) {
    body.ftg-embed .ig-panel          { height: 65% !important; }
    body.ftg-embed .ig-panel.ig-panel--expanded { height: 85% !important; }
}

