/* 
 * index.css - PREMIUM LOADING OVERLAY VERSION 9.0
 * Homepage-specific styles with Premium Loading Experience
 * White Theme with Orange & Teal Brand Colors
 * Version: 9.0 - PREMIUM LOADING ENHANCEMENT
 */

/* ==================== CRITICAL ABOVE-THE-FOLD STYLES ==================== */
body {
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}


@keyframes floatingParticles {
    0%, 100% { 
        background-position: 0% 0%, 100% 100%, 20% 20%, 80% 10%, 90% 60%; 
    }
    25% { 
        background-position: 10% 20%, 90% 80%, 30% 40%, 70% 30%, 80% 40%; 
    }
    50% { 
        background-position: 20% 40%, 80% 60%, 40% 60%, 60% 50%, 70% 20%; 
    }
    75% { 
        background-position: 10% 60%, 90% 40%, 30% 80%, 70% 70%, 80% 80%; 
    }
}

/* ===== PREMIUM SPINNER DESIGN ===== */
.overlay-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Outer Ring */
.overlay-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(251, 191, 36, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.1);
}

/* Inner Spinning Ring */
.overlay-spinner::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-orange);
    border-right: 3px solid var(--primary-teal);
    border-radius: 50%;
    animation: premium-spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
    transform: translateZ(0);
}

/* Premium Spin Animation */
@keyframes premium-spin {
    0% { 
        transform: rotate(0deg) scale(1);
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
    }
    50% { 
        transform: rotate(180deg) scale(1.1);
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
    }
    100% { 
        transform: rotate(360deg) scale(1);
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
    }
}

/* ===== LOADING TEXT - SCOPED TO OVERLAY ONLY ===== */
.overlay-loading-text {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
    font-family: var(--font-primary);
    text-align: center;
    letter-spacing: 0.5px;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    opacity: 0;
    animation: fadeInText 0.8s ease forwards 0.3s;
    transition: opacity 0.3s ease;
}

/* Text fade in animation */
@keyframes fadeInText {
    0% { 
        opacity: 0; 
        transform: translateY(20px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* ===== PREMIUM PROGRESS BAR - SCOPED TO OVERLAY ONLY ===== */
.overlay-progress {
    width: 280px;
    height: 6px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    opacity: 0;
    animation: fadeInProgress 0.8s ease forwards 0.6s;
}

/* Progress bar fill */
.overlay-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--primary-orange) 0%, 
        var(--secondary-orange) 25%, 
        var(--primary-teal) 75%, 
        var(--secondary-teal) 100%);
    border-radius: 10px;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    transform: translateZ(0);
}

/* Progress bar shimmer effect */
.overlay-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes fadeInProgress {
    0% { 
        opacity: 0; 
        transform: scaleX(0);
    }
    100% { 
        opacity: 1; 
        transform: scaleX(1);
    }
}

/* ===== LOADING STAGES INDICATOR ===== */
.loading-stages {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    opacity: 0;
    animation: fadeInStages 0.8s ease forwards 0.9s;
}

.loading-stage {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.2);
    position: relative;
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.loading-stage.active {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-teal));
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.loading-stage.active::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.3);
    animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes fadeInStages {
    0% { 
        opacity: 0; 
        transform: translateY(20px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* ===== LOADING TIPS ===== */
.loading-tip {
    margin-top: 25px;
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
    text-align: center;
    max-width: 300px;
    opacity: 0;
    animation: fadeInTip 0.8s ease forwards 1.2s;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(251, 191, 36, 0.1);
}

.loading-tip:hover {
    background: rgba(251, 191, 36, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

@keyframes fadeInTip {
    0% { 
        opacity: 0; 
        transform: translateY(15px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* ==================== ERROR MESSAGE STYLES ==================== */
#error-message {
    display: none;
    z-index: 10000;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: var(--font-primary);
}

#error-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

#error-message.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#error-message button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 14px;
}

#error-message button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ==================== MAIN CONTENT AREA ==================== */
#main-content {
    opacity: 0;
    transition: opacity 0.3s ease;
    background: var(--bg-primary);
    min-height: 100vh;
    /* position:relative + z-index:1 removed — created stacking context that 
       could overlap fixed/sticky header. contain:style does not need z-index. */
    /* contain: layout removed — it breaks IntersectionObserver, sticky positioning,
       and grid child layout inside dynamically-loaded templates like wbu-section */
    contain: style;
}

#main-content.ready {
    opacity: 1;
}

/* ==================== MAIN CONTENT SECTIONS ==================== */
#main-content .section {
    padding: 80px 0;
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    content-visibility: auto;
    contain-intrinsic-size: 500px;
}

#main-content .section:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#main-content .section.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
#main-content .section:nth-child(1) { transition-delay: 0.1s; }
#main-content .section:nth-child(2) { transition-delay: 0.2s; }
#main-content .section:nth-child(3) { transition-delay: 0.3s; }
#main-content .section:nth-child(4) { transition-delay: 0.4s; }
#main-content .section:nth-child(5) { transition-delay: 0.5s; }

/* ==================== HOMEPAGE SPECIFIC CONTAINERS ==================== */
#main-content #hero-slider-container {
    position: relative;
    z-index: 1;
    min-height: 600px;
    background: var(--bg-secondary);
    overflow: hidden;
    contain-intrinsic-size: 600px;
}

#main-content #featured-packages-container {
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
    min-height: 700px;
    contain-intrinsic-size: 700px;
}

#main-content #destinations-container {
    background: var(--bg-tertiary);
    position: relative;
    z-index: 1;
    min-height: 600px;
}

#main-content #testimonials-container {
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
    min-height: 500px;
}

#main-content #about-srilanka-container {
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
    min-height: 400px;
}

/* CRITICAL: Inner container for main content only */
#main-content .inner-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== UTILITY CLASSES ==================== */
.critical-body-styles {
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* ==================== ACCESSIBILITY ENHANCEMENTS ==================== */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 10px;
    background: var(--primary-orange);
    color: var(--text-white);
    padding: 10px 15px;
    border-radius: 5px;
    z-index: 10001;
    transition: top 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 14px;
}

.skip-to-content:focus {
    top: 10px;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.5);
    outline: none;
}

.skip-to-content:hover {
    background: var(--color-gold-dark);
    text-decoration: none;
    color: var(--text-white);
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== SMOOTH SCROLLING ==================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

/* ==================== LOADING PLACEHOLDERS ==================== */
.content-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 2s infinite;
    border-radius: 8px;
    height: 20px;
    margin-bottom: 12px;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.content-loading.title {
    height: 32px;
    width: 60%;
    margin-bottom: 16px;
}

.content-loading.text {
    height: 16px;
    width: 80%;
    margin-bottom: 8px;
}

.content-loading.text:last-child {
    width: 40%;
}

/* ==================== INTERSECTION OBSERVER CLASSES ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.rotate-in {
    opacity: 0;
    transform: rotate(10deg) scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.rotate-in.visible {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ==================== TEMPLATE LOADING INDICATORS ==================== */
.template-loading {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border-secondary);
}

.template-loading::after {
    content: 'Loading template...';
    color: var(--text-muted);
    font-style: italic;
    font-family: var(--font-primary);
    font-size: 14px;
}

.template-loading.hero::after {
    content: 'Loading hero section...';
}

.template-loading.packages::after {
    content: 'Loading featured packages...';
}

.template-loading.destinations::after {
    content: 'Loading destinations...';
}

.template-loading.testimonials::after {
    content: 'Loading testimonials...';
}

/* ==================== EMERGENCY FALLBACK STYLES ==================== */
.template-fallback {
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-primary);
    border-radius: 12px;
    margin: 20px;
    font-family: var(--font-primary);
}

.template-fallback h2 {
    color: var(--primary-orange);
    margin-bottom: 16px;
    font-family: var(--font-primary);
    font-size: 24px;
    font-weight: 600;
}

.template-fallback p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.template-fallback button {
    background: var(--primary-orange);
    color: var(--text-white);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
}

.template-fallback button:hover {
    background: var(--color-gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* ==================== FOCUS MANAGEMENT ==================== */
#main-content:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 4px;
}

#main-content .section:focus-within {
    outline: 1px solid rgba(251, 191, 36, 0.3);
    outline-offset: 2px;
}

/* ==================== STACKING CONTEXT FIX ==================== */
/* header-container: no position:relative override — prevents breaking sticky/fixed header */
/* z-index managed by template-header.css */

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.will-change-scroll {
    will-change: scroll-position;
}

/* Force hardware acceleration for main content animations only */
#main-content .section,
#main-content,
.overlay-spinner,
.fade-in,
.slide-in-left,
.slide-in-right,
.scale-in {
    /* translateZ(0) removed from section children — it created new stacking contexts
       that interfered with IntersectionObserver and wbu-section grid layout.
       backface-visibility kept for performance on the overlay spinner only. */
}

.overlay-spinner {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ==================== RESPONSIVE DESIGN - LOADING OVERLAY ==================== */
@media (max-width: 768px) {
    .overlay-spinner {
        width: 60px;
        height: 60px;
        margin-bottom: 25px;
    }
    
    .overlay-loading-text {
        font-size: 18px;
        margin-bottom: 20px;
        padding: 0 20px;
    }
    
    .overlay-progress {
        width: 220px;
        height: 5px;
        margin-top: 15px;
    }
    
    .loading-stages {
        margin-top: 20px;
        gap: 12px;
    }
    
    .loading-stage {
        width: 10px;
        height: 10px;
    }
    
    .loading-tip {
        font-size: 13px;
        margin-top: 20px;
        max-width: 250px;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .overlay-spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }
    
    .overlay-loading-text {
        font-size: 16px;
        margin-bottom: 15px;
        padding: 0 15px;
    }
    
    .overlay-progress {
        width: 180px;
        height: 4px;
        margin-top: 12px;
    }
    
    .loading-stages {
        margin-top: 15px;
        gap: 10px;
    }
    
    .loading-stage {
        width: 8px;
        height: 8px;
    }
    
    .loading-tip {
        font-size: 12px;
        margin-top: 15px;
        max-width: 200px;
        padding: 6px 12px;
    }
}

/* ==================== RESPONSIVE DESIGN - MAIN CONTENT ==================== */
@media (max-width: 1199.98px) {
    #main-content .inner-container {
        max-width: 960px;
        padding: 0 15px;
    }
    
    #main-content .section {
        padding: 70px 0;
    }
}

@media (max-width: 991.98px) {
    #main-content .inner-container {
        max-width: 720px;
    }
    
    #main-content .section {
        padding: 60px 0;
    }
    
    #main-content #hero-slider-container {
        min-height: 500px;
    }
    
    #main-content #featured-packages-container {
        min-height: 600px;
    }
}

@media (max-width: 767.98px) {
    #main-content .inner-container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    #main-content .section {
        padding: 50px 0;
    }
    
    html {
        scroll-padding-top: 100px;
    }
    
    #main-content #hero-slider-container {
        min-height: 400px;
    }
    
    #main-content #featured-packages-container {
        min-height: 500px;
    }
    
    #main-content #destinations-container {
        min-height: 450px;
    }
    
    .template-fallback {
        padding: 30px 15px;
        margin: 15px;
    }
    
    .template-fallback h2 {
        font-size: 20px;
    }
    
    .template-fallback p {
        font-size: 14px;
    }
}

@media (max-width: 575.98px) {
    #main-content .inner-container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    #main-content .section {
        padding: 40px 0;
    }
    
    html {
        scroll-padding-top: 80px;
    }
    
    #main-content #hero-slider-container {
        min-height: 350px;
    }
    
    #main-content #featured-packages-container {
        min-height: 400px;
    }
    
    #main-content #destinations-container {
        min-height: 350px;
    }
    
    #main-content #testimonials-container {
        min-height: 300px;
    }
    
    .template-fallback {
        padding: 20px 10px;
        margin: 10px;
    }
    
    .template-fallback h2 {
        font-size: 18px;
    }
    
    .template-fallback button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* ==================== LARGE SCREENS ==================== */
@media (min-width: 1400px) {
    #main-content .inner-container {
        max-width: 1320px;
    }
    
    #main-content .section {
        padding: 100px 0;
    }
    
    #main-content #hero-slider-container {
        min-height: 700px;
    }
    
    #main-content #featured-packages-container {
        min-height: 800px;
    }
    
    .overlay-spinner {
        width: 100px;
        height: 100px;
    }
    
    .overlay-loading-text {
        font-size: 24px;
    }
    
    .overlay-progress {
        width: 320px;
        height: 8px;
    }
}

@media (min-width: 1920px) {
    #main-content .inner-container {
        max-width: 1600px;
    }
    
    #main-content .section {
        padding: 120px 0;
    }
}

/* ==================== REDUCED MOTION SUPPORT ==================== */
@media (prefers-reduced-motion: reduce) {
    #main-content .section,
    #main-content,
    .overlay-spinner,
    .overlay-loading-text,
    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .scale-in,
    .rotate-in,
    .loading-stages,
    .loading-tip {
        animation: none !important;
        transition: none !important;
    }
    
    .overlay-spinner::after {
        animation: none;
        border: 3px solid var(--primary-orange);
    }
    
    #main-content .section {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .skip-to-content {
        transition: none;
    }
    
    .overlay-progress-bar::before {
        animation: none;
    }
    
    #loading-overlay::before {
        animation: none;
    }
    
    .loading-stage.active::after {
        animation: none;
    }
}

/* ==================== HIGH CONTRAST MODE ==================== */
@media (prefers-contrast: high) {
    #loading-overlay {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: none;
        border: 2px solid #000000;
    }
    
    .overlay-spinner::after {
        border-top-color: #000000;
        border-right-color: #000000;
        box-shadow: none;
    }
    
    .overlay-loading-text {
        background: none;
        -webkit-text-fill-color: initial;
        color: #000000;
        font-weight: 700;
    }
    
    .overlay-progress {
        border: 2px solid #000000;
        background: #FFFFFF;
    }
    
    .overlay-progress-bar {
        background: #000000;
        box-shadow: none;
    }
    
    .loading-stage.active {
        background: #000000;
        box-shadow: none;
    }
    
    .loading-tip {
        color: #000000;
        font-weight: 700;
        border: 2px solid #000000;
        background: #FFFFFF;
    }
    
    #error-message {
        border: 2px solid #000000;
    }
    
    .template-fallback {
        border-color: #000000;
        border-width: 2px;
    }
    
    .skip-to-content {
        border: 2px solid #000000;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */
@media (prefers-color-scheme: dark) {
    #loading-overlay {
        background: linear-gradient(135deg, 
            rgba(33, 33, 33, 0.98) 0%, 
            rgba(25, 25, 25, 0.95) 50%, 
            rgba(33, 33, 33, 0.98) 100%);
    }
    
    .loading-tip {
        color: #aaa;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .loading-tip:hover {
        background: rgba(251, 191, 36, 0.2);
    }
}

/* ==================== LANDSCAPE ORIENTATION ==================== */
@media (orientation: landscape) and (max-height: 600px) {
    #main-content .section {
        padding: 40px 0;
    }
    
    #main-content #hero-slider-container {
        min-height: 300px;
    }
    
    .overlay-spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .overlay-loading-text {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .overlay-progress {
        width: 200px;
        height: 4px;
        margin-top: 10px;
    }
    
    .loading-stages {
        margin-top: 15px;
        gap: 8px;
    }
    
    .loading-tip {
        font-size: 12px;
        margin-top: 15px;
        max-width: 250px;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    #loading-overlay,
    #error-message,
    .template-loading {
        display: none !important;
    }
    
    #main-content .section {
        padding: 20px 0;
        page-break-inside: avoid;
        border-bottom: none;
    }
    
    #main-content {
        opacity: 1 !important;
    }
    
    #main-content .inner-container {
        max-width: 100%;
        padding: 0;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* ==================== THEME VARIATIONS FOR LOADING OVERLAY ==================== */

/* Luxury Gold Theme */
.loading-overlay-luxury {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(252, 248, 227, 0.95) 50%, 
        rgba(255, 255, 255, 0.98) 100%);
}

.loading-overlay-luxury .overlay-spinner::after {
    border-top: 3px solid var(--color-gold);
    border-right: 3px solid var(--color-gold-dark);
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.4);
}

.loading-overlay-luxury .overlay-loading-text {
    background: linear-gradient(45deg, var(--color-gold), var(--color-gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-overlay-luxury .overlay-progress-bar {
    background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
}

/* Eco Tourism Theme */
.loading-overlay-eco {
    background: linear-gradient(135deg, 
        rgba(236, 253, 245, 0.98) 0%, 
        rgba(240, 253, 244, 0.95) 50%, 
        rgba(236, 253, 245, 0.98) 100%);
}

.loading-overlay-eco .overlay-spinner::after {
    border-top: 3px solid var(--color-green);
    border-right: 3px solid var(--color-navy);
    box-shadow: 0 0 20px rgba(74, 140, 63, 0.4);
}

.loading-overlay-eco .overlay-loading-text {
    background: linear-gradient(45deg, var(--color-green), var(--color-navy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-overlay-eco .overlay-progress-bar {
    background: linear-gradient(90deg, var(--color-green) 0%, var(--color-navy) 100%);
}

/* Heritage Theme */
.loading-overlay-heritage {
    background: linear-gradient(135deg, 
        rgba(254, 252, 232, 0.98) 0%, 
        rgba(253, 246, 178, 0.1) 50%, 
        rgba(254, 252, 232, 0.98) 100%);
}

.loading-overlay-heritage .overlay-spinner::after {
    border-top: 3px solid var(--color-gold-dark);
    border-right: 3px solid var(--color-gold);
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.4);
}

.loading-overlay-heritage .overlay-loading-text {
    background: linear-gradient(45deg, var(--color-gold-dark), var(--color-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-overlay-heritage .overlay-progress-bar {
    background: linear-gradient(90deg, var(--color-gold-dark) 0%, var(--color-gold) 100%);
}

/* Adventure Theme */
.loading-overlay-adventure {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(254, 243, 199, 0.1) 25%,
        rgba(253, 224, 71, 0.05) 50%,
        rgba(254, 243, 199, 0.1) 75%,
        rgba(255, 255, 255, 0.98) 100%);
}

.loading-overlay-adventure .overlay-spinner::after {
    border-top: 3px solid var(--color-gold);
    border-right: 3px solid var(--color-gold-light);
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.4);
}

.loading-overlay-adventure .overlay-loading-text {
    background: linear-gradient(45deg, var(--color-gold), var(--color-gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-overlay-adventure .overlay-progress-bar {
    background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
}

/* Size Variants */
.loading-overlay-compact .overlay-spinner {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
}

.loading-overlay-compact .overlay-loading-text {
    font-size: 16px;
    margin-bottom: 15px;
}

.loading-overlay-compact .overlay-progress {
    width: 200px;
    height: 4px;
    margin-top: 15px;
}

.loading-overlay-large .overlay-spinner {
    width: 120px;
    height: 120px;
    margin-bottom: 40px;
}

.loading-overlay-large .overlay-loading-text {
    font-size: 28px;
    margin-bottom: 35px;
}

.loading-overlay-large .overlay-progress {
    width: 400px;
    height: 8px;
    margin-top: 25px;
}

/* Interactive Elements */
.loading-tip-interactive {
    cursor: pointer;
    transition: all 0.3s ease;
}

.loading-tip-interactive:hover {
    background: rgba(251, 191, 36, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

/* ==================== UTILITY CLASSES ==================== */
.hide-loading-tip .loading-tip { 
    display: none; 
}

.hide-loading-stages .loading-stages { 
    display: none; 
}

.hide-progress-bar .overlay-progress { 
    display: none; 
}

.overlay-spinner-only .overlay-loading-text,
.overlay-spinner-only .overlay-progress,
.overlay-spinner-only .loading-stages,
.overlay-spinner-only .loading-tip {
    display: none;
}



/* ==================== END OF ENHANCED INDEX.CSS ==================== */

/* ==================== WBU SECTION COMPATIBILITY FIX ==================== */
/* Ensure scroll-triggered elements inside #main-content are visible
   even if IntersectionObserver fires before layout is fully computed */
#why-book-with-us-container [data-wbu-animate="slide-right"],
#why-book-with-us-container [data-wbu-animate="slide-left"] {
    /* Allow the JS to handle visibility — no containment interference */
    contain: none;
}