/* Virtual tour in the Almajd identity: the site's font, navy and gold palette, and
   Font Awesome icons at the site's sizes. Loaded after the tour's own styles. */
@font-face {
    font-family: 'Almajd Plex Sans Arabic';
    src: url('/assets/almajd/arabic-regular.woff2') format('woff2'), url('/assets/almajd/arabic-regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Almajd Plex Sans Arabic';
    src: url('/assets/almajd/arabic-bold.woff2') format('woff2'), url('/assets/almajd/arabic-bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg-deep: #071f44;
    --bg-soft: rgba(7, 31, 68, 0.8);
    --scene-accent: #c99a2e;
    --accent-cool: #5aa9e6;
    --tour-navy: #0b2d5c;
    --tour-gold: #c99a2e;
    --tour-gold-light: #f2cf7a;
}

* {
    font-family: 'Almajd Plex Sans Arabic', 'IBM Plex Sans Arabic', Tahoma, sans-serif !important;
}

body {
    background:
        radial-gradient(circle at top left, rgba(90, 169, 230, 0.2), transparent 28%),
        radial-gradient(circle at 85% 16%, rgba(201, 154, 46, 0.2), transparent 24%),
        linear-gradient(135deg, #071f44, #0b2d5c 45%, #071a38);
}

/* ---- Text sizes matched to the site (16px body, 14px minimum for small labels) ---- */
.kicker,
.stop-counter,
.scene-zone,
.related-title,
.info-zone,
.info-badge,
.stop-number,
.drawer-subtitle,
.info-subtitle {
    font-size: 14px !important;
}

.primary-btn,
.ghost-btn,
.mini-btn {
    font-size: 15px;
    font-weight: 700;
}

.kicker,
.info-zone,
.stop-number {
    color: var(--tour-gold-light);
}

.primary-btn {
    background: linear-gradient(135deg, var(--tour-gold-light), var(--tour-gold));
    color: #1b1406;
}

.hotspot-label strong {
    font-size: 0.9rem;
}

.hotspot-label em {
    font-size: 0.8rem;
}

.hotspot-door-label strong {
    font-size: 0.75rem;
}

/* ---- Control buttons: navy circles with gold icons ---- */
.control-btn {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: rgba(11, 45, 92, 0.92);
    border: 1px solid rgba(242, 207, 122, 0.45);
    color: var(--tour-gold-light);
    font-size: 1.15rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.control-btn:hover,
.control-btn:focus-visible {
    background: var(--tour-navy);
    transform: translateY(-2px);
}

.control-btn:focus-visible {
    outline: 3px solid var(--tour-gold-light);
    outline-offset: 3px;
}

.control-btn.active {
    background: linear-gradient(135deg, var(--tour-gold-light), var(--tour-gold));
    color: var(--tour-navy);
    border-color: transparent;
}

/* Replace the drawn and text glyphs with Font Awesome icons. */
.controls .control-btn span {
    width: auto;
    height: auto;
    border: 0 !important;
    font-size: 0;
}

.controls .control-btn span::before,
.controls .control-btn span::after {
    content: none;
}

.controls .control-btn span::before {
    content: '';
    position: static !important;
    display: inline-block;
    width: auto !important;
    height: auto !important;
    border: 0 !important;
    background: none !important;
    transform: none !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900;
    font-size: 1.15rem;
    line-height: 1;
}

#related-control-btn span::before { content: '\f074'; }
#map-btn span::before { content: '\f03a'; }
#info-control-btn span::before { content: '\f129'; }
#zoom-in-btn span::before { content: '\2b'; }
#zoom-out-btn span::before { content: '\f068'; }
#rotate-btn span::before { content: '\f2f1'; }
#orientation-btn span::before { content: '\f3cf'; }
#fullscreen-btn span::before { content: '\f065'; }

/* ---- Scene hotspots: larger navy markers with gold icons ---- */
.hotspot-core {
    width: 2.6rem;
    height: 2.6rem;
    border: 2px solid var(--tour-gold-light);
    background: var(--tour-navy) !important;
    color: var(--tour-gold-light);
    font-size: 0;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(242, 207, 122, 0.18);
}

.hotspot-core::before {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900;
    font-size: 1.05rem;
    content: '\f129';
}

.tour-hotspot.hotspot-video .hotspot-core::before { content: '\f04b'; }
.tour-hotspot.hotspot-jump .hotspot-core::before { content: '\f3c5'; }
.tour-hotspot.hotspot-back .hotspot-core::before { content: '\f0e2'; }

.hotspot-pulse {
    left: 1.3rem;
    width: 2rem;
    height: 2rem;
    background: rgba(242, 207, 122, 0.3);
}

/* Door (move to another scene) markers */
.hotspot-door-core {
    width: 2.75rem;
    height: 2.75rem;
    background: var(--tour-navy);
    border: 2px solid var(--tour-gold-light);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(242, 207, 122, 0.18);
}

.hotspot-door-leaf {
    inset: 0.6rem 0.95rem 0.6rem 0.75rem;
    background: var(--tour-gold-light);
}

.hotspot-door-leaf::before {
    background: var(--tour-navy);
}

.hotspot-door-arrow {
    width: 1rem;
    height: 1rem;
    color: var(--tour-gold-light);
    font-size: 1rem;
}

.hotspot-shell.hotspot-shell-door .hotspot-pulse {
    top: 1.35rem;
    width: 1.6rem;
    height: 1.6rem;
    background: rgba(242, 207, 122, 0.3);
}

@media (max-width: 700px) {
    .control-btn {
        width: 2.85rem;
        height: 2.85rem;
    }

    .controls .control-btn span::before {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .control-btn {
        transition: none;
    }
}

/* The tour template pins its own font on body and headings; follow the site font there too. */
body,
body *,
.intro-panel h1,
.current-panel h2,
.info-sheet h2 {
    font-family: 'Almajd Plex Sans Arabic', 'IBM Plex Sans Arabic', Tahoma, sans-serif !important;
}

/* Panels in the site navy instead of near-black slate */
.brand-chip,
.info-badge,
.loading-badge {
    background: rgba(7, 31, 68, 0.82);
}

.intro-panel {
    background: linear-gradient(135deg, rgba(7, 31, 68, 0.88), rgba(11, 45, 92, 0.78));
}

.current-panel {
    background: linear-gradient(180deg, rgba(7, 31, 68, 0.86), rgba(11, 45, 92, 0.8));
}

.info-sheet {
    background: linear-gradient(180deg, rgba(7, 31, 68, 0.96), rgba(11, 45, 92, 0.97));
}

/* Icon fonts must keep their own family. */
.controls .control-btn span::before,
.hotspot-core::before,
[class*="fa-"],
[class*="fa-"]::before {
    font-family: 'Font Awesome 6 Free' !important;
}

@media (max-width: 700px) {
    /* The tour lays the buttons out on a stretching grid on phones, so use rounded tiles, not circles. */
    .control-btn {
        border-radius: 16px;
    }
}

/* ---- Controls: smaller icons with a short visible label under each ---- */
.controls .control-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: auto;
    min-width: 3.9rem;
    height: 3.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 14px;
}

.controls .control-btn span::before {
    font-size: 0.9rem;
}

.controls .control-btn::after {
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.controls .control-btn.active::after {
    color: var(--tour-navy);
}

#related-control-btn::after { content: 'مرتبطة'; }
#map-btn::after { content: 'المشاهد'; }
#info-control-btn::after { content: 'معلومات'; }
#zoom-in-btn::after { content: 'تكبير'; }
#zoom-out-btn::after { content: 'تصغير'; }
#rotate-btn::after { content: 'دوران'; }
#orientation-btn::after { content: 'حركة الجوال'; }
#fullscreen-btn::after { content: 'شاشة كاملة'; }

html[lang^="en"] #related-control-btn::after { content: 'Related'; }
html[lang^="en"] #map-btn::after { content: 'Scenes'; }
html[lang^="en"] #info-control-btn::after { content: 'Info'; }
html[lang^="en"] #zoom-in-btn::after { content: 'Zoom in'; }
html[lang^="en"] #zoom-out-btn::after { content: 'Zoom out'; }
html[lang^="en"] #rotate-btn::after { content: 'Rotate'; }
html[lang^="en"] #orientation-btn::after { content: 'Motion'; }
html[lang^="en"] #fullscreen-btn::after { content: 'Full screen'; }

/* The viewer's own title box repeated the scene name from the panel and slipped under the controls. */
.pnlm-panorama-info {
    display: none !important;
}

@media (max-width: 700px) {
    .controls .control-btn {
        min-width: 0;
        width: 100%;
        height: 3rem;
        padding: 0.3rem 0.2rem;
    }

    .controls .control-btn span::before {
        font-size: 0.82rem;
    }

    .controls .control-btn::after {
        font-size: 0.6rem;
    }
}

/* ---- Door hotspots: a clean door icon with the destination always shown underneath ---- */
.tour-hotspot .hotspot-shell-door {
    position: relative;
}

.tour-hotspot .hotspot-door-core {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
}

.tour-hotspot .hotspot-door-leaf,
.tour-hotspot .hotspot-door-arrow {
    display: none;
}

.tour-hotspot .hotspot-door-core::before {
    content: '\f52b';
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900;
    font-size: 1rem;
    line-height: 1;
    color: var(--tour-gold-light);
}

.tour-hotspot:hover .hotspot-door-core,
.tour-hotspot:focus-within .hotspot-door-core {
    background: linear-gradient(135deg, var(--tour-gold-light), var(--tour-gold));
}

.tour-hotspot:hover .hotspot-door-core::before,
.tour-hotspot:focus-within .hotspot-door-core::before {
    color: var(--tour-navy);
}

.tour-hotspot .hotspot-door-label,
.tour-hotspot:hover .hotspot-door-label,
.tour-hotspot:focus-within .hotspot-door-label {
    display: block;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 9rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid rgba(242, 207, 122, 0.45);
    border-radius: 10px;
    background: rgba(7, 31, 68, 0.84);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    text-align: center;
    pointer-events: none;
}

.tour-hotspot .hotspot-door-label strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.45;
    white-space: normal;
}

.tour-hotspot .hotspot-door-label em {
    display: none;
}

/* ---- Info hotspots: the school logo instead of a symbol ---- */
.tour-hotspot.hotspot-info .hotspot-core {
    width: 2.9rem;
    height: 2.9rem;
    border: 2px solid var(--tour-gold-light);
    background: #fff url('/assets/almajd/logo.webp') center / 80% auto no-repeat !important;
    font-size: 0;
}

.tour-hotspot.hotspot-info .hotspot-core::before {
    content: none;
}

@media (max-width: 700px) {
    .tour-hotspot .hotspot-door-core {
        width: 2.3rem;
        height: 2.3rem;
    }

    .tour-hotspot .hotspot-door-core::before {
        font-size: 0.9rem;
    }

    .tour-hotspot .hotspot-door-label {
        max-width: 7.5rem;
    }

    .tour-hotspot .hotspot-door-label strong {
        font-size: 0.66rem;
    }
}
