/* optimized.css - CSS PARA OTIMIZAÇÃO DE PERFORMANCE */

/* Critical Above-the-Fold Styles */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding-top: 65px;
    background: #000000;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(195, 211, 92, 0.487);
}

.logo {
    height: 45px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 100%;
    max-width: 160px;
    width: auto;
    transition: transform 0.3s ease;
}

.hero {
    height: calc(100vh - 65px);
    position: relative;
    overflow: hidden;
}

/* Lazy Loading Styles */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

.bg-loaded {
    animation: fadeIn 0.5s ease;
}

/* Performance Optimizations */
.package-card,
.stat-item,
.btn,
.carousel-slide {
    will-change: transform;
    transform: translateZ(0);
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loaded {
    opacity: 1;
}

/* Progressive Enhancement for Low-end Devices */
@media (max-width: 768px) {
    .hero {
        height: 70vh;
    }
    
    .carousel-slide {
        animation: none !important;
    }
}

/* Print Styles */
@media print {
    .hero,
    .carousel,
    .menu-toggle,
    .navbar {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        color: #000;
        background: #fff;
    }
}

/* High DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Memory Management for Animations */
.carousel-slide {
    backface-visibility: hidden;
    perspective: 1000;
}

/* Focus Management for Performance */
*:focus {
    outline: 2px solid #c3d35c;
    outline-offset: 2px;
}

/* Optimize Image Rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Performance Monitoring Badge (opcional) */
.performance-badge {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: #2c7b44;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10000;
    display: none;
}

/* Critical Layout Fixes for Above-the-Fold */
.menu-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 4px;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 0 20px;
}

/* Ensure Critical Content is Visible Immediately */
.carousel-slide.active {
    opacity: 1 !important;
}

.navbar.active {
    right: 0 !important;
}

/* Fallback for JavaScript-disabled browsers */
.no-js .navbar {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    padding: 0;
}

.no-js .menu-toggle {
    display: none;
}