/* ============================================
   HERO SECTION - Simple Background Slideshow with Typewriter
   ============================================ */

:root {
    --hero-overlay-start: rgba(0, 51, 102, 0.45);
    --hero-overlay-end: rgba(10, 74, 125, 0.35);
    --hero-primary: #003366;
    --hero-accent: #FFD700;
    --hero-text: #FFFFFF;
}

/* ============================================
   CONTAINER & BASE STYLES
   ============================================ */
.hero-with-stats {
    position: relative;
    width: 100%;
    margin-bottom: 48px;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background-color: #001a33;
}

/* ============================================
   BACKGROUND SLIDESHOW (3 images cycling)
   ============================================ */
.hero-slider::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/kingstelEscape.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: backgroundSlideshow 24s infinite, zoomInOut 8s ease-in-out infinite;
    z-index: 1;
}

@keyframes backgroundSlideshow {
    0%, 33.33% {
        background-image: url('../images/project4.jpg');
    }
    33.34%, 66.66% {
        background-image: url('../images/Road Roller.jpg');
    }
     33.35%, 66.66% {
        background-image: url('../images/project5.jpg');
    }
     33.36%, 66.66% {
        background-image: url('../images/project9.jpg');
    }
    66.67%, 100% {
        background-image: url('../images/Concrete Mixer.jpg');
    }
    
}

@keyframes zoomInOut {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Overlay for text readability */
.hero-slider::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--hero-overlay-start) 0%,
        var(--hero-overlay-end) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* ============================================
   CONTENT
   ============================================ */
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    color: var(--hero-text);
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: heroFadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

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

/* Typography */
.hero-slider h1,
.hero-headline {
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    color: var(--hero-text);
    line-height: 1.2;
    min-height: 80px;
}

.hero-slider p,
.hero-sub {
    font-size: clamp(1rem, 2vw, 1.3rem);
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    line-height: 1.6;
}

/* Typewriter effect */
.hero-writer {
    display: inline-block;
    min-width: 20px;
    border-right: 3px solid var(--hero-accent);
    padding-right: 8px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Call-to-action button */
.hero-slider .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--hero-accent) 0%, #e6b33a 100%);
    border: none;
    border-radius: 50px;
    color: var(--hero-primary);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.hero-slider .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-slider .btn:hover,
.hero-slider .btn:focus {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #ffe44d 0%, var(--hero-accent) 100%);
    outline: 3px solid rgba(255, 215, 0, 0.3);
    outline-offset: 2px;
}

.hero-slider .btn:hover::before {
    opacity: 1;
}

.hero-slider .btn:active {
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .hero-slider {
        height: 70vh;
        min-height: 500px;
    }

    .hero-content {
        height: 70vh;
        min-height: 500px;
    }

    .hero-slider h1,
    .hero-headline {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        min-height: 60px;
    }

    .hero-slider p,
    .hero-sub {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
    }

    .hero-slider .btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .hero-content {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        min-height: 450px;
    }

    .hero-content {
        min-height: 450px;
        padding: 0 1rem;
    }

    .hero-slider .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .hero-slider::before {
        animation: none !important;
        transform: scale(1) !important;
    }

    .hero-content {
        animation: none !important;
    }

    .hero-writer {
        animation: none !important;
        border-right: none;
    }
}

/* Focus visible for keyboard navigation */
.hero-slider *:focus-visible {
    outline: 3px solid var(--hero-accent);
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}