/* ============================================
   PREMIUM INTRO LOADER & TRANSITIONS
   ============================================ */

:root {
    --loader-bg: #ffffff;
    --loader-accent: #d4af37;
}

/* Page Transition Wrapper */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--loader-bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-out, visibility 0.3s;
}

[data-theme="dark"] .page-transition-overlay {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.page-transition-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Loader Content */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.loader-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    animation: pulseLogo 2s infinite ease-in-out;
}

.loader-bar-container {
    width: 200px;
    height: 2px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loader-bar-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--loader-accent);
    transition: width 0.4s ease;
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Page Reveal Animation */
.reveal-content {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.reveal-content.active {
    opacity: 1;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b89830;
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay for children in grids */
.grid>.scroll-reveal:nth-child(2),
.tour-grid>.scroll-reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.grid>.scroll-reveal:nth-child(3),
.tour-grid>.scroll-reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.grid>.scroll-reveal:nth-child(4),
.tour-grid>.scroll-reveal:nth-child(4) {
    transition-delay: 0.3s;
}

/* Global Loading Indicator Modal */
#loadingIndicator {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 30000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: white;
    padding: 30px;
}

#loadingIndicator[style*="display: block"],
#loadingIndicator[style*="display: flex"],
#loadingIndicator.active {
    display: flex !important;
}

#loadingIndicator .spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--color-gold, #d4af37);
    border-radius: 50%;
    animation: hgSpin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes hgSpin {
    to {
        transform: rotate(360deg);
    }
}