/* Critical Hero CSS - Optimized for LCP */
.hero {
    background-color: rgba(0, 0, 0, 0.8);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    padding: 0 1rem;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    /* Disable complex layer blending which slows render */
    contain: paint layout;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #000; /* Dark fallback */
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
                      url('../images/optimized/medium/mediterranean-villa-cape-coral.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform; /* Hardware acceleration */
}

/* Fallback for browsers that don't support WebP */
@supports not (background-image: url('../images/optimized/medium/mediterranean-villa-cape-coral.webp')) {
    .hero-bg {
        background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
                        url('../images/optimized/medium/mediterranean-villa-cape-coral.jpg');
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    z-index: 2; /* Ensure above background */
    animation: fadeIn 0.5s ease;
}

.hero h1 {
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    color: #ffffff;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

@media screen and (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}