/* ============================================================
   VR 360 PANORAMA — MILITARY EMERGENCY TACTICAL UI
   Theme: Dark Olive / Charcoal / Red Alert
   Fonts: Rajdhani (headings), Barlow Condensed (UI), Share Tech Mono (status)
   ============================================================ */

:root {
    --bg-dark:        #0b1329;
    --bg-panel:       rgba(15, 23, 42, 0.94);
    --bg-panel-hover: rgba(30, 41, 59, 0.96);
    --navy-dark:      #0f172a;
    --navy-mid:       #1e293b;
    --blue-accent:    #0284c7;
    --blue-bright:    #38bdf8;
    --blue-dim:       rgba(2, 132, 199, 0.35);
    --blue-glow:      rgba(56, 189, 248, 0.25);
    --status-online:  #38bdf8;
    --text-primary:   #f8fafc;
    --text-muted:     #94a3b8;
    --text-bright:    #ffffff;
    --border-blue:    rgba(56, 189, 248, 0.35);
    --grid-line:      rgba(56, 189, 248, 0.08);
    --font-heading:   'Rajdhani', 'Barlow Condensed', Arial, sans-serif;
    --font-ui:        'Barlow Condensed', 'Rajdhani', Arial, sans-serif;
    --font-mono:      'Share Tech Mono', 'Courier New', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-ui);
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
}

/* LOADING SCREEN */
#loader-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 28px,
            var(--grid-line) 28px,
            var(--grid-line) 29px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 28px,
            var(--grid-line) 28px,
            var(--grid-line) 29px
        ),
        radial-gradient(ellipse at center, #1e293b 0%, #0b1329 70%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 52px;
    height: 52px;
    border: 3px solid rgba(2, 132, 199, 0.2);
    border-top: 3px solid var(--blue-bright);
    border-right: 3px solid var(--blue-bright);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 24px;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.4), inset 0 0 12px rgba(56, 189, 248, 0.1);
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-primary);
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
    animation: tac-blink 1.8s ease-in-out infinite;
}

@keyframes tac-blink {
    0%, 80%, 100% { opacity: 1; }
    90% { opacity: 0.4; }
}

/* TOP SCENE HEADER BADGE */
#scene-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: var(--bg-panel);
    border: 1px solid var(--border-blue);
    border-left: 4px solid var(--blue-accent);
    border-radius: 6px;
    padding: 10px 24px 10px 20px;
    color: var(--text-primary);
    text-align: left;
    pointer-events: none;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.6),
        inset 0 0 30px rgba(2, 132, 199, 0.08);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    min-width: 280px;
}

#scene-header::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 12px; height: 12px;
    border-top: 2px solid var(--blue-bright);
    border-left: 2px solid var(--blue-bright);
}

#scene-header::after {
    content: '';
    position: absolute;
    bottom: -1px; right: -1px;
    width: 12px; height: 12px;
    border-bottom: 2px solid var(--blue-bright);
    border-right: 2px solid var(--blue-bright);
}

#scene-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-bright);
    margin-bottom: 3px;
}

#scene-desc {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* FLOATING SCENE MENU */
#ui-container {
    position: absolute;
    bottom: 25px;
    left: 25px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.menu-toggle-btn {
    background: var(--navy-mid);
    border: 1px solid var(--border-blue);
    border-left: 3px solid var(--blue-accent);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 11px 18px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    transition: all 0.15s ease;
    position: relative;
    text-decoration: none;
}

.menu-toggle-btn::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 8px; height: 8px;
    border-top: 2px solid var(--blue-bright);
    border-left: 2px solid var(--blue-bright);
}

.menu-toggle-btn:hover {
    background: #334155;
    border-left-color: var(--blue-bright);
    color: var(--text-bright);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        0 0 12px var(--blue-glow);
    transform: translateX(2px);
}

#scene-menu-drawer {
    margin-top: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-blue);
    border-left: 3px solid var(--blue-accent);
    border-radius: 6px;
    padding: 10px;
    width: 272px;
    max-height: 320px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 20px var(--blue-glow);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#scene-menu-drawer::-webkit-scrollbar { width: 4px; }
#scene-menu-drawer::-webkit-scrollbar-track { background: var(--navy-dark); }
#scene-menu-drawer::-webkit-scrollbar-thumb { background: var(--blue-accent); border-radius: 2px; }

#scene-menu-drawer.collapsed {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    display: none;
}

.scene-btn {
    background: transparent;
    border: none;
    border-left: 3px solid rgba(56, 189, 248, 0.2);
    color: var(--text-primary);
    padding: 9px 12px;
    border-radius: 4px;
    text-align: left;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.scene-btn:hover {
    background: rgba(56, 189, 248, 0.12);
    border-left-color: var(--blue-accent);
    color: var(--text-bright);
    padding-left: 16px;
}

.scene-btn.active {
    background: rgba(2, 132, 199, 0.25);
    border-left: 3px solid var(--blue-bright);
    color: var(--blue-bright);
    font-weight: 700;
}

/* OFFLINE STATUS BADGE */
#offline-badge {
    position: absolute;
    bottom: 25px;
    right: 25px;
    z-index: 100;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    color: var(--blue-bright);
    padding: 6px 14px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(6px);
    text-transform: uppercase;
}

.dot-online {
    width: 7px;
    height: 7px;
    background-color: var(--blue-bright);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--blue-bright), 0 0 16px rgba(56, 189, 248, 0.4);
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 8px var(--green-status); opacity: 1; }
    50% { box-shadow: 0 0 16px var(--green-status), 0 0 30px rgba(0, 255, 65, 0.5); opacity: 0.8; }
}

/* HIDE DEFAULT A-FRAME VR BUTTON */
.a-enter-vr, .a-enter-vr-button, .a-enter-ar, .a-enter-ar-button {
    display: none !important;
}

/* ============================================================
   LANDSLIDE EFFECT OVERLAYS
   ============================================================ */

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.8s ease;
}

body.ls-level-1::after {
    background: radial-gradient(ellipse at center, transparent 42%, rgba(180, 60, 0, 0.32) 100%);
    opacity: 1;
    animation: ls-vignette-pulse-1 3.5s ease-in-out infinite;
}

body.ls-level-2::after {
    background: radial-gradient(ellipse at center, transparent 33%, rgba(200, 0, 0, 0.42) 100%);
    opacity: 1;
    animation: ls-vignette-pulse-2 2s ease-in-out infinite;
}

body.ls-level-3::after {
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(180, 0, 0, 0.04) 3px,
            rgba(180, 0, 0, 0.04) 4px
        ),
        radial-gradient(ellipse at center, transparent 22%, rgba(180, 0, 0, 0.58) 100%);
    opacity: 1;
    animation: ls-vignette-pulse-3 0.9s ease-in-out infinite;
}

@keyframes ls-vignette-pulse-1 {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
@keyframes ls-vignette-pulse-2 {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}
@keyframes ls-vignette-pulse-3 {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

body.ls-level-1 #scene-title { color: #ffaa00; }
body.ls-level-2 #scene-title { color: #ff4400; }
body.ls-level-3 #scene-title { color: var(--red-bright); text-shadow: 0 0 10px rgba(255,34,34,0.6); }

#ls-alert-badge {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    background: rgba(120, 0, 0, 0.92);
    border: 1px solid var(--red-accent);
    border-left: 4px solid var(--red-bright);
    border-radius: 2px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 16px;
    pointer-events: none;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 20px rgba(204, 0, 0, 0.4);
}

body.ls-level-1 #ls-alert-badge {
    display: flex;
    background: rgba(120, 50, 0, 0.9);
    border-color: #ff8800;
    border-left-color: #ffaa00;
    animation: ls-badge-blink 3s ease-in-out infinite;
}
body.ls-level-2 #ls-alert-badge {
    display: flex;
    background: rgba(140, 0, 0, 0.9);
    border-color: var(--red-accent);
    border-left-color: var(--red-bright);
    animation: ls-badge-blink 1.6s ease-in-out infinite;
}
body.ls-level-3 #ls-alert-badge {
    display: flex;
    background: rgba(120, 0, 0, 0.97);
    border-color: var(--red-bright);
    border-left-color: #ff0000;
    animation: ls-badge-blink 0.6s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
}

@keyframes ls-badge-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

@keyframes ls-flash-red {
    0%, 84%, 100% { background: transparent; }
    87% { background: rgba(200, 0, 0, 0.14); }
}

body.ls-level-3 #ls-flash-overlay {
    display: block;
    animation: ls-flash-red 2s ease-in-out infinite;
}

#ls-flash-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 199;
}

/* ============================================================
   FULLSCREEN TOP-LAYER OVERLAY SUPPORT
   Ensures disaster vignette, red flash, alert badges, and UI 
   remain 100% visible when browser enters Fullscreen mode.
   ============================================================ */
:fullscreen body::after,
:-webkit-full-screen body::after,
html:fullscreen body::after,
body:fullscreen::after {
    z-index: 99999 !important;
}

:fullscreen #ls-flash-overlay,
:-webkit-full-screen #ls-flash-overlay,
html:fullscreen #ls-flash-overlay {
    z-index: 99998 !important;
}

:fullscreen #ls-alert-badge,
:-webkit-full-screen #ls-alert-badge,
html:fullscreen #ls-alert-badge {
    z-index: 99999 !important;
}

:fullscreen #scene-header,
:-webkit-full-screen #scene-header,
html:fullscreen #scene-header,
:fullscreen #ui-container,
:-webkit-full-screen #ui-container,
html:fullscreen #ui-container,
:fullscreen #offline-badge,
:-webkit-full-screen #offline-badge,
html:fullscreen #offline-badge {
    z-index: 99999 !important;
}

/* ============================================================
   HOME SCREEN LANDING OVERLAY
   ============================================================ */
#home-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9500;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 28px,
            var(--grid-line) 28px,
            var(--grid-line) 29px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 28px,
            var(--grid-line) 28px,
            var(--grid-line) 29px
        ),
        radial-gradient(ellipse at center, #0f172a 0%, #070d19 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 20px;
    overflow-y: auto;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#home-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.home-header {
    text-align: center;
    max-width: 800px;
    margin-bottom: 28px;
}

.home-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-bright);
    text-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
    margin-bottom: 8px;
}

.home-subtitle {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--blue-bright);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.destination-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-blue);
    border-top: 3px solid var(--blue-accent);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.destination-card:hover {
    transform: translateY(-6px);
    border-color: var(--blue-bright);
    border-top-color: var(--blue-bright);
    box-shadow: 0 12px 35px rgba(2, 132, 199, 0.35), 0 0 20px var(--blue-glow);
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #020617;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.destination-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--border-blue);
    color: var(--blue-bright);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

.card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-bright);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.card-desc {
    font-family: var(--font-ui);
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 16px;
    flex-grow: 1;
}

.card-btn {
    width: 100%;
    background: var(--navy-mid);
    border: 1px solid var(--border-blue);
    color: var(--blue-bright);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 2px;
    padding: 10px 0;
    border-radius: 5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.destination-card:hover .card-btn {
    background: var(--blue-accent);
    color: #ffffff;
    border-color: var(--blue-bright);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

/* Wediombo Stopsite reading panel; the introductory board is rendered in A-Frame. */
[hidden] { display: none !important; }

.geology-panel {
    position: fixed;
    z-index: 500;
    top: 80px;
    right: 14px;
    width: min(520px, calc(100vw - 28px));
    height: min(780px, calc(100dvh - 96px));
    max-height: calc(100dvh - 96px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-primary);
    background: var(--bg-panel);
    border: 1px solid var(--border-blue);
    border-left: 4px solid var(--blue-accent);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .58), 0 0 20px var(--blue-glow);
    backdrop-filter: blur(12px);
}
.geology-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-blue);
    flex-shrink: 0 !important;
}
.geology-panel-kicker {
    display: block;
    color: var(--blue-bright);
    font: 700 11px var(--font-mono);
    letter-spacing: .11em;
    margin-bottom: 7px;
}
.geology-panel h2 {
    font: 700 20px/1.25 var(--font-heading);
    letter-spacing: .02em;
    color: #fff;
}
.geology-icon-button {
    flex: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    color: #fff;
    background: var(--blue-accent);
    font: 26px/1 var(--font-ui);
    cursor: pointer;
}
.geology-article {
    overflow-y: visible;
    padding: 17px 20px 24px;
}
.geology-article h3 {
    color: var(--blue-bright);
    font: 700 17px/1.35 var(--font-heading);
    margin: 20px 0 9px;
}
.geology-article p {
    color: #e2eaf4;
    font: 400 14px/1.65 Arial, sans-serif;
    margin-bottom: 12px;
    overflow-wrap: anywhere;
}
.geology-figure {
    margin: 18px 0 24px;
}
.geology-figure-image {
    position: relative;
    margin-bottom: 10px;
}
.geology-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}
.geology-image-label {
    position: absolute;
    transform: translate(-50%, -50%);
    padding: 2px 4px;
    border: 1px solid #555;
    background: #fff;
    color: #111;
    font: 700 10px/1 Arial, sans-serif;
    white-space: nowrap;
    pointer-events: none;
}
.geology-figure figcaption {
    color: #a9bdd2;
    font: 400 12px/1.5 Arial, sans-serif;
    text-align: center;
}
.geology-editor-note {
    background: rgba(2, 132, 199, .16);
    border-left: 3px solid var(--blue-bright);
    border-radius: 4px;
    padding: 10px 12px;
}
.geology-definition {
    position: sticky;
    top: 0;
    z-index: 2;
    color: #fff !important;
    background: #075985;
    border: 1px solid var(--blue-bright);
    border-radius: 6px;
    padding: 10px 12px;
}
.geology-term {
    display: inline;
    padding: 0;
    border: 0;
    border-bottom: 1px dashed var(--blue-bright);
    background: transparent;
    color: #7dd3fc;
    font: inherit;
    cursor: help;
}
.geology-panel button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

@media (max-width: 600px) {
    .geology-panel {
        top: auto;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 85dvh;
        max-height: 85dvh;
        border-radius: 14px 14px 0 0;
    }
    .geology-panel-head { padding: 14px 16px 10px; }
    .geology-tabs { padding: 6px 12px !important; min-height: 48px !important; }
    .geology-tab-btn { padding: 7px 10px !important; font-size: 12px !important; }
    .geology-article { padding: 14px 16px 22px; }
}
:fullscreen .geology-panel { z-index: 100000 !important; }

/* Geology Tabs */
.geology-tabs {
    display: flex !important;
    align-items: center;
    background: #071529 !important;
    border-bottom: 2px solid var(--border-blue) !important;
    padding: 8px 16px !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-height: 52px !important;
    box-sizing: border-box !important;
}
.geology-tab-btn {
    flex-shrink: 0 !important;
    background: rgba(2, 132, 199, 0.15) !important;
    border: 1px solid var(--border-blue) !important;
    border-radius: 6px !important;
    color: #94a3b8 !important;
    font: 700 13px/1.2 var(--font-heading, sans-serif) !important;
    padding: 8px 14px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
}
.geology-tab-btn:hover {
    color: #fff !important;
    background: rgba(2, 132, 199, 0.3) !important;
    border-color: var(--blue-bright) !important;
}
.geology-tab-btn.active {
    color: #fff !important;
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.45) !important;
}
.geology-tab-badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    margin-left: 2px !important;
}
.geology-tab-btn.active .geology-tab-badge {
    background: #fff !important;
    color: #0284c7 !important;
}
.geology-tab-container {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}
.geology-tab-pane {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    display: none;
    flex-direction: column !important;
}
.geology-tab-pane.active {
    display: flex !important;
}

/* Quick Media Bar in Article */
.geology-media-quickbar {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.22) 0%, rgba(14, 165, 233, 0.08) 100%);
    border: 1px solid var(--blue-bright);
    border-left: 4px solid var(--blue-bright);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quickbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.quickbar-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue-bright);
    letter-spacing: 0.08em;
    font-family: var(--font-mono, monospace);
}
.quickbar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.quickbar-btn {
    background: #0284c7;
    border: 1px solid #38bdf8;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.quickbar-btn:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

/* Photo Gallery Grid */
.geology-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 12px;
    padding: 16px 20px 24px;
}
.photo-card {
    background: rgba(12, 30, 61, 0.7);
    border: 1px solid var(--border-blue);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.photo-card:hover {
    transform: translateY(-3px);
    border-color: var(--blue-bright);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}
.photo-thumb-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
    position: relative;
}
.photo-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.photo-card:hover .photo-thumb-wrap img {
    transform: scale(1.06);
}
.photo-card-caption {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(8, 18, 38, 0.85);
}

/* Video Player */
.geology-video-wrap {
    padding: 18px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.video-player-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-blue);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}
.video-player-container video {
    width: 100%;
    display: block;
    max-height: 280px;
}
.video-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--blue-bright);
    margin: 0;
}
.video-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
}

/* PDF Embed */
.geology-pdf-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 480px;
    padding: 14px 20px 24px;
    gap: 12px;
}
.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(12, 30, 61, 0.8);
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    padding: 10px 14px;
}
.pdf-title-info {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdf-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.pdf-action-btn {
    background: #0284c7;
    border: 1px solid #38bdf8;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}
.pdf-action-btn:hover {
    background: #0369a1;
}
.pdf-frame-container {
    flex: 1;
    min-height: 400px;
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    overflow: hidden;
    background: #1e293b;
}
.pdf-frame-container iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
}

/* Lightbox Modal */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000000;
    background: rgba(3, 7, 18, 0.94);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(10, 20, 38, 0.85);
    border-bottom: 1px solid rgba(56, 189, 248, 0.25);
}
.lightbox-counter {
    color: var(--blue-bright);
    font: 700 15px var(--font-mono, monospace);
    letter-spacing: 0.05em;
}
.lightbox-actions {
    display: flex;
    gap: 10px;
}
.lightbox-btn {
    background: rgba(2, 132, 199, 0.25);
    border: 1px solid var(--blue-bright);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.lightbox-btn:hover {
    background: #0284c7;
}
.lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    position: relative;
    overflow: hidden;
}
.lightbox-nav-btn {
    background: rgba(12, 30, 61, 0.7);
    border: 1px solid var(--border-blue);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    user-select: none;
}
.lightbox-nav-btn:hover {
    background: #0284c7;
    border-color: #38bdf8;
    transform: scale(1.1);
}
.lightbox-img-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: calc(100vh - 120px);
    overflow: auto;
}
.lightbox-img-container img {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease;
    cursor: zoom-in;
}
.lightbox-img-container img.zoomed {
    transform: scale(1.6);
    cursor: zoom-out;
}
.lightbox-caption {
    margin-top: 14px;
    color: #e2e8f0;
    font-size: 14px;
    background: rgba(10, 20, 38, 0.8);
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    text-align: center;
}
