/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind overlay and content */
    background: var(--gray-900); /* Fallback background color */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation-duration: 16s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-fill-mode: forwards;
    transform-origin: center;
}

.hero-slideshow img:nth-child(1) {
    animation-name: slideAnimation1;
}

.hero-slideshow img:nth-child(2) {
    animation-name: slideAnimation2;
}

/* Combined Animation 1 (Image 1) - Visible 0s to 8s (50%) */
@keyframes slideAnimation1 {
    /* Opacity & Transform cycle (0s to 8s) */
    0% { opacity: 1; transform: scale(1.05) translate(0, 0); } 
    37.5% { opacity: 1; } /* 6s mark: Fully visible */
    50% { opacity: 0; transform: scale(1.2) translate(-5%, -5%); } /* 8s mark: Fade out + KB End state */
    100% { opacity: 0; }
}

/* Combined Animation 2 (Image 2) - Visible 8s (50%) to 16s (100%) */
@keyframes slideAnimation2 {
    /* Opacity & Transform cycle (8s to 16s) */
    0% { opacity: 0; transform: scale(1.2) translate(5%, 5%); } /* Start state (Hidden) */
    50% { opacity: 0; transform: scale(1.2) translate(5%, 5%); } /* 8s mark: Fade in starts, KB Start state */
    62.5% { opacity: 1; } /* 10s mark: Fully visible */
    100% { opacity: 0; transform: scale(1.05) translate(0, 0); } /* 16s mark: Fade out + KB End state */
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    display: none; /* Hidden, replaced by slideshow */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Darker overlay for better contrast with white text */
    background: linear-gradient(135deg, rgba(26, 77, 46, 0.7) 0%, rgba(45, 122, 62, 0.6) 100%);
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: particleFloat 15s infinite ease-in-out;
    opacity: 0.4;
}

.particle:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 40%;
    animation-delay: 3s;
}

.particle:nth-child(3) {
    left: 60%;
    animation-delay: 6s;
}

.particle:nth-child(4) {
    left: 80%;
    animation-delay: 9s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 12s;
}

@keyframes particleFloat {
    0% {
        top: 100%;
        transform: translateX(0) scale(0);
    }
    50% {
        transform: translateX(100px) scale(1);
    }
    100% {
        top: -10%;
        transform: translateX(-100px) scale(0);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.3;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    animation: fadeInUp 0.8s ease, titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.1); }
    50% { text-shadow: 0 0 20px rgba(0,0,0,0.6), 0 0 40px rgba(255,255,255,0.2); }
}

.hero-subtitle {
    font-size: 24px;
    color: var(--gray-100);
    margin-bottom: 32px;
    text-shadow: 0 0 8px rgba(0,0,0,0.4);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-description {
    font-size: 18px;
    color: var(--gray-100);
    margin-bottom: 32px;
    text-shadow: 0 0 8px rgba(0,0,0,0.4);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.hero-buttons .btn {
    animation: buttonFloat 3s ease-in-out infinite;
}

.hero-buttons .btn:nth-child(1) {
    animation-delay: 0s;
}

.hero-buttons .btn:nth-child(2) {
    animation-delay: 0.3s;
}

@keyframes buttonFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        height: 550px;
    }
    .hero-title {
        font-size: 48px;
    }
    .hero-subtitle {
        font-size: 22px;
    }
    .hero-description {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 500px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }
    .hero-description {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }
}