/*
 * custom.css — WotaSpace Virtual Tour
 * =====================================================
 * Design system untuk Virtual Tour Desa Wota Wati,
 * Gunung Kidul, Yogyakarta.
 *
 * Palette:
 *   Forest  : #2d5a27  (hijau tua)
 *   Leaf    : #4a8c3f  (hijau daun)
 *   Jade    : #3d7a5e  (hijau jade)
 *   Stone   : #8b7355  (coklat batu)
 *   Amber   : #d4a843  (kuning keemasan)
 *   Cream   : #f5f0e8  (putih alami)
 * =====================================================
 */

/* ===== 1. THREE.JS CANVAS CONTAINER ===== */
#container {
    width: 100vw;
    height: 100vh;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    transition: opacity 0.5s ease-in-out;
}

/* ===== 2. BOOTSTRAP MODAL Z-INDEX OVERRIDE ===== */
.modal               { z-index: 10055 !important; }
.modal-backdrop      { z-index: 10050 !important; }
.modal-content       { pointer-events: auto !important; }

/* ===== 3. KEYFRAME ANIMATIONS ===== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

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

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes dot-pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1.0); opacity: 1;   }
}

@keyframes ringPulse {
    0%   { transform: translate(-50%, -50%) scale(0.8); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* ===== 4. GLOBAL LOADER ===== */
#global-loader {
    transition: opacity 0.6s ease;
}

/* Outer pulsing ring */
.loader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    border: 2px solid rgba(74, 140, 63, 0.25);
    border-radius: 50%;
    animation: ringPulse 2.5s ease-out infinite;
}
.loader-ring-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 130px;
    height: 130px;
    border: 2px solid rgba(212, 168, 67, 0.2);
    border-radius: 50%;
    animation: ringPulse 2.5s ease-out infinite 0.8s;
}

/* Centered content */
.loader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: fadeInUp 0.8s ease both;
}

.loader-logo-icon {
    font-size: 2.5rem;
    color: #4a8c3f;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 12px rgba(74, 140, 63, 0.5));
}

.loader-spinner-wrap {
    position: relative;
    width: 52px;
    height: 52px;
    margin: 4px 0;
}

.loader-spinner {
    width: 52px;
    height: 52px;
    border: 3px solid rgba(74, 140, 63, 0.15);
    border-top-color: #4a8c3f;
    border-right-color: #d4a843;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.loader-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #f5f0e8;
    letter-spacing: 0.05em;
    margin: 0;
    text-shadow: 0 0 20px rgba(74, 140, 63, 0.4);
}

.loader-subtitle {
    font-size: 0.75rem;
    color: rgba(245, 240, 232, 0.55);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
}

.loader-dots {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}
.loader-dots span {
    width: 6px;
    height: 6px;
    background: #4a8c3f;
    border-radius: 50%;
    animation: dot-pulse 1.4s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; background: #d4a843; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Transition overlay spinner */
.pano-loader-ring {
    width: 80px;
    height: 80px;
    border: 2px dashed rgba(74, 140, 63, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: spin 8s linear infinite;
}
.pano-loader-ring i {
    animation: spinReverse 8s linear infinite;
}
.pano-loader-ring::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid transparent;
    border-top-color: #d4a843;
    border-bottom-color: #4a8c3f;
    border-radius: 50%;
    animation: spin 2s ease-in-out infinite;
}

/* ===== 5. NEW UI OVERLAY (Explore Menu & Control Dock) ===== */
.explore-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 6px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: #f5f0e8;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.explore-btn:hover {
    background: rgba(74, 140, 63, 0.4);
    border-color: rgba(74, 140, 63, 0.6);
    transform: translateY(-2px);
}

.explore-btn .icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #d4a843;
    transition: all 0.3s;
}

.explore-btn:hover .icon-wrap {
    background: #d4a843;
    color: #1a2e1a;
}

.explore-btn .label {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Dock buttons */
.dock-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: rgba(245, 240, 232, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dock-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #d4a843;
    transform: scale(1.1);
}

.dock-btn-highlight {
    color: #4a8c3f;
    background: rgba(74, 140, 63, 0.15);
}
.dock-btn-highlight:hover {
    background: rgba(74, 140, 63, 0.3);
    color: #65b857;
}

/* ===== 8. NAVIGATION TIPS ===== */
.nav-tips {
    animation: fadeInUp 1s ease 2s both;
}

/* ===== 9. MAP OVERLAY ===== */
.map-overlay-wrap {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 1px solid rgba(74, 140, 63, 0.4);
    /* Transisi fade + slide up */
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.map-overlay-wrap.map-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.map-overlay-header {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #2d5a27, #3d7a5e);
    color: #f5f0e8;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 12px;
    gap: 4px;
}

.map-close-btn {
    background: none;
    border: none;
    color: rgba(245,240,232,0.7);
    cursor: pointer;
    padding: 0 4px;
    font-size: 0.9rem;
    transition: color 0.2s;
    margin-left: auto;
}
.map-close-btn:hover { color: #f5f0e8; }

/* ===== 10. MODALS ===== */
.wota-modal {
    border: 1px solid rgba(74, 140, 63, 0.2);
    border-radius: 18px !important;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.wota-modal-header {
    background: linear-gradient(135deg, #1a3320 0%, #2d5a27 50%, #3d7a5e 100%);
    color: #f5f0e8;
    border-bottom: 1px solid rgba(74, 140, 63, 0.3);
    padding: 14px 20px;
}

.modal-icon {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Wota Tabs */
.wota-tabs {
    border-bottom: 2px solid #e8f0e6;
    gap: 4px;
}

.wota-tab {
    background: none;
    border: none;
    padding: 8px 18px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    border-radius: 6px 6px 0 0;
}

.wota-tab.active,
.wota-tab:focus {
    color: #2d5a27;
    border-bottom-color: #4a8c3f;
    background: rgba(74, 140, 63, 0.06);
    outline: none;
}

.wota-tab:hover:not(.active) {
    color: #4a8c3f;
    background: rgba(74, 140, 63, 0.04);
}

/* Back button in news detail */
.wota-btn-back {
    background: linear-gradient(135deg, #2d5a27, #4a8c3f);
    color: #f5f0e8;
    border: none;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.wota-btn-back:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* ===== 11. SCROLLBAR ===== */
::-webkit-scrollbar       { width: 0.25em; height: 0.25em; }
::-webkit-scrollbar-track { background: #1a3320; }
::-webkit-scrollbar-thumb { background: #4a8c3f; transition: background 0.3s; }
::-webkit-scrollbar-thumb:hover { background: #d4a843; }

/* ===== 12. TINYMCE RENDERED HTML CONTENT ===== */
.news-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.news-content-body p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

/* ===== 13. SWIPER THEME OVERRIDE ===== */
.swiper-button-next,
.swiper-button-prev {
    color: #4a8c3f !important;
}

.swiper-pagination-bullet-active {
    background: #4a8c3f !important;
}

/* ===== 14. HTML HOTSPOT LAYER ===== */
#hotspot-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 500;
    overflow: hidden;
}

/* Base hotspot wrapper — positioned absolutely by JS */
.hs {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

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

/* ---- NAVIGATE hotspot (panah pindah panorama) ---- */
.hs-navigate .hs-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(13, 31, 13, 0.55);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(74, 140, 63, 0.6);
    box-shadow: 0 0 20px rgba(74, 140, 63, 0.35), inset 0 0 12px rgba(74, 140, 63, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a8c3f;
    font-size: 1.2rem;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: hs-float 2.8s ease-in-out infinite;
}

.hs-navigate:hover .hs-icon {
    background: rgba(74, 140, 63, 0.75);
    border-color: #4a8c3f;
    color: #f5f0e8;
    transform: scale(1.15);
    box-shadow: 0 0 32px rgba(74, 140, 63, 0.7);
}

/* Pulse ring behind navigate hotspot */
.hs-navigate .hs-icon::before {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 1.5px solid rgba(74, 140, 63, 0.4);
    animation: hs-pulse 2.5s ease-out infinite;
}

/* ---- INFO hotspot (gambar/audio) ---- */
.hs-info .hs-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(13, 25, 13, 0.6);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(212, 168, 67, 0.55);
    box-shadow: 0 0 18px rgba(212, 168, 67, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4a843;
    font-size: 1rem;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: hs-float 3s ease-in-out infinite 0.4s;
}

.hs-info:hover .hs-icon {
    background: rgba(212, 168, 67, 0.75);
    border-color: #d4a843;
    color: #1a2e1a;
    transform: scale(1.15);
    box-shadow: 0 0 28px rgba(212, 168, 67, 0.7);
}

/* ---- VIDEO hotspot ---- */
.hs-video .hs-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(13, 13, 30, 0.6);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(100, 160, 220, 0.55);
    box-shadow: 0 0 18px rgba(100, 160, 220, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7ec8e3;
    font-size: 1rem;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: hs-float 3.2s ease-in-out infinite 0.8s;
}

.hs-video:hover .hs-icon {
    background: rgba(100, 160, 220, 0.7);
    border-color: #7ec8e3;
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 28px rgba(100, 160, 220, 0.6);
}

/* ---- Label chip (di bawah semua tipe hotspot) ---- */
.hs-label {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    color: #f5f0e8;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hs:hover .hs-label {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Keyframe animations ---- */
@keyframes hs-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

@keyframes hs-pulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    100% { transform: scale(1.7); opacity: 0; }
}
