/* Hero Section */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    margin-top: 70px; /* Account for fixed header */
}

#hero video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--light);
    background: rgba(0, 0, 0, 0.7);
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    backdrop-filter: blur(5px);
}

.overlay h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    margin-bottom: 1rem;
}

.overlay p {
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
}

/* Carousel Styles */
.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding: 1rem 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.carousel img {
    scroll-snap-align: center;
    min-width: 80%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.carousel img:hover {
    transform: scale(1.02);
}

/* Responsive Design */
@media (max-width: 768px) {
    #hero {
        height: 70vh;
        min-height: 400px;
    }

    .overlay {
        padding: 1.5rem;
        width: 95%;
    }

    .carousel img {
        min-width: 90%;
    }
}

/* Lazy loading for images */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazyloaded {
    opacity: 1;
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}