/* 
 * 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: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff !important;
    color: #333;
    overflow-x: hidden;
}

/* ==================== PREMIUM LOADING OVERLAY SYSTEM ==================== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(250, 250, 250, 0.95) 50%, 
        rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
    visibility: visible;
    will-change: transform, opacity;
}

/* Loading Overlay States */
#loading-overlay.loading-complete {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.05);
}

#loading-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: scale(1);
}

#loading-overlay.visible {
    display: flex;
}

/* ===== FLOATING PARTICLES BACKGROUND ===== */
#loading-overlay::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 87, 34, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 150, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 87, 34, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 60% 10%, rgba(0, 150, 136, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 90% 60%, rgba(255, 87, 34, 0.05) 0%, transparent 30%);
    background-size: 400px 400px, 350px 350px, 200px 200px, 180px 180px, 220px 220px;
    animation: floatingParticles 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@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 ===== */
.spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
    transform: translateZ(0);
    backface-visibility: hidden;
}

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

/* Inner Spinning Ring */
.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 #FF5722;
    border-right: 3px solid #009688;
    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(255, 87, 34, 0.3);
    transform: translateZ(0);
}

/* Premium Spin Animation */
@keyframes premium-spin {
    0% { 
        transform: rotate(0deg) scale(1);
        box-shadow: 0 0 15px rgba(255, 87, 34, 0.3);
    }
    50% { 
        transform: rotate(180deg) scale(1.1);
        box-shadow: 0 0 25px rgba(0, 150, 136, 0.4);
    }
    100% { 
        transform: rotate(360deg) scale(1);
        box-shadow: 0 0 15px rgba(255, 87, 34, 0.3);
    }
}

/* ===== LOADING TEXT ENHANCEMENT ===== */
.loading-text {
    color: #333;
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-align: center;
    letter-spacing: 0.5px;
    background: linear-gradient(45deg, #FF5722, #009688);
    -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 ===== */
.progress {
    width: 280px;
    height: 6px;
    background: rgba(255, 87, 34, 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 */
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        #FF5722 0%, 
        #FF7043 25%, 
        #009688 75%, 
        #26A69A 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(255, 87, 34, 0.3);
    transform: translateZ(0);
}

/* Progress bar shimmer effect */
.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(255, 87, 34, 0.2);
    position: relative;
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.loading-stage.active {
    background: linear-gradient(45deg, #FF5722, #009688);
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(255, 87, 34, 0.4);
}

.loading-stage.active::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid rgba(255, 87, 34, 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: #666;
    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(255, 87, 34, 0.1);
}

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

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

/* ==================== ERROR MESSAGE STYLES ==================== */
#error-message {
    background-color: #dc3545;
    color: white;
    padding: 15px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: 'Inter', sans-serif;
}

#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: #FFFFFF;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    isolation: isolate;
    contain: layout style;
}

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

/* ==================== MAIN CONTENT SECTIONS ==================== */
#main-content .section {
    padding: 80px 0;
    position: relative;
    background: #FFFFFF;
    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: #f8f9fa;
    overflow: hidden;
    contain-intrinsic-size: 600px;
}

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

#main-content #destinations-container {
    background: #FAFAFA;
    position: relative;
    z-index: 1;
    min-height: 600px;
}

#main-content #testimonials-container {
    background: #FFFFFF;
    position: relative;
    z-index: 1;
    min-height: 500px;
}

#main-content #about-srilanka-container {
    background: #F5F5F5;
    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: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #333;
}

/* ==================== ACCESSIBILITY ENHANCEMENTS ==================== */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 10px;
    background: #FF5722;
    color: #FFFFFF;
    padding: 10px 15px;
    border-radius: 5px;
    z-index: 10001;
    transition: top 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    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: #E64A19;
    text-decoration: none;
    color: #FFFFFF;
}

/* 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: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.template-loading::after {
    content: 'Loading template...';
    color: #6c757d;
    font-style: italic;
    font-family: 'Inter', sans-serif;
    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: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    margin: 20px;
    font-family: 'Inter', sans-serif;
}

.template-fallback h2 {
    color: #FF5722;
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 600;
}

.template-fallback p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.template-fallback button {
    background: #FF5722;
    color: 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: #E64A19;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

/* ==================== FOCUS MANAGEMENT ==================== */
#main-content:focus {
    outline: 2px solid #FF5722;
    outline-offset: 4px;
}

#main-content .section:focus-within {
    outline: 1px solid rgba(255, 87, 34, 0.3);
    outline-offset: 2px;
}

/* ==================== ABSOLUTE HEADER/FOOTER ISOLATION ==================== */
#header-container,
#footer-container {
    all: revert;
}

/* ==================== 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,
.spinner,
.fade-in,
.slide-in-left,
.slide-in-right,
.scale-in {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ==================== RESPONSIVE DESIGN - LOADING OVERLAY ==================== */
@media (max-width: 768px) {
    .spinner {
        width: 60px;
        height: 60px;
        margin-bottom: 25px;
    }
    
    .loading-text {
        font-size: 18px;
        margin-bottom: 20px;
        padding: 0 20px;
    }
    
    .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) {
    .spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }
    
    .loading-text {
        font-size: 16px;
        margin-bottom: 15px;
        padding: 0 15px;
    }
    
    .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;
    }
    
    .spinner {
        width: 100px;
        height: 100px;
    }
    
    .loading-text {
        font-size: 24px;
    }
    
    .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,
    .spinner,
    .loading-text,
    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .scale-in,
    .rotate-in,
    .loading-stages,
    .loading-tip {
        animation: none !important;
        transition: none !important;
    }
    
    .spinner::after {
        animation: none;
        border: 3px solid #FF5722;
    }
    
    #main-content .section {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .skip-to-content {
        transition: none;
    }
    
    .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;
    }
    
    .spinner::after {
        border-top-color: #000000;
        border-right-color: #000000;
        box-shadow: none;
    }
    
    .loading-text {
        background: none;
        -webkit-text-fill-color: initial;
        color: #000000;
        font-weight: 700;
    }
    
    .progress {
        border: 2px solid #000000;
        background: #FFFFFF;
    }
    
    .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;
        background: #dc3545;
    }
    
    .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(255, 87, 34, 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;
    }
    
    .spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .loading-text {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .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 .spinner::after {
    border-top: 3px solid #D4AF37;
    border-right: 3px solid #B8860B;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.loading-overlay-luxury .loading-text {
    background: linear-gradient(45deg, #D4AF37, #B8860B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-overlay-luxury .progress-bar {
    background: linear-gradient(90deg, #D4AF37 0%, #B8860B 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 .spinner::after {
    border-top: 3px solid #059669;
    border-right: 3px solid #10B981;
    box-shadow: 0 0 20px rgba(5, 150, 105, 0.4);
}

.loading-overlay-eco .loading-text {
    background: linear-gradient(45deg, #059669, #10B981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-overlay-eco .progress-bar {
    background: linear-gradient(90deg, #059669 0%, #10B981 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 .spinner::after {
    border-top: 3px solid #92400E;
    border-right: 3px solid #D97706;
    box-shadow: 0 0 20px rgba(146, 64, 14, 0.4);
}

.loading-overlay-heritage .loading-text {
    background: linear-gradient(45deg, #92400E, #D97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-overlay-heritage .progress-bar {
    background: linear-gradient(90deg, #92400E 0%, #D97706 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 .spinner::after {
    border-top: 3px solid #F59E0B;
    border-right: 3px solid #EAB308;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.loading-overlay-adventure .loading-text {
    background: linear-gradient(45deg, #F59E0B, #EAB308);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-overlay-adventure .progress-bar {
    background: linear-gradient(90deg, #F59E0B 0%, #EAB308 100%);
}

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

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

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

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

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

.loading-overlay-large .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(255, 87, 34, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.2);
}

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

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

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

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

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

/*
 * ENHANCED INDEX.CSS - VERSION 9.0 SUMMARY:
 * ✅ Premium loading overlay with white theme compatibility
 * ✅ Orange & Teal brand color integration
 * ✅ Glassmorphism effects with backdrop blur
 * ✅ Animated progress tracking with stages
 * ✅ Dynamic loading messages and tips
 * ✅ Full responsive design support
 * ✅ Accessibility features (reduced motion, high contrast)
 * ✅ Theme variations (luxury, eco, heritage, adventure)
 * ✅ Hardware acceleration for smooth performance
 * ✅ Complete isolation from header/footer styles
 * ✅ Print-friendly styles
 * ✅ Dark mode and landscape orientation support
 * ✅ Interactive elements with hover effects
 * ✅ Utility classes for customization
 * 
 * This premium loading overlay provides an exceptional user experience
 * that perfectly matches your white theme with orange and teal brand colors.
 */