/* ================================================================================
   LEAFLINE NEXUS - HERO CAROUSEL STYLES
   Completely Fixed Version
   ================================================================================ */

/* Hero Section - Reduced height and proper positioning */
.hero {
    position: relative;
    min-height: 500px; /* Reduced from 650px */
    display: flex;
    align-items: center;
    padding: 100px 0 220px; /* More bottom padding for controls spacing */
    overflow: hidden;
}

/* Hero section WITH carousel (homepage only) */
.hero.has-carousel {
    min-height: 600px;
    background: linear-gradient(135deg, #2D5F3F 0%, #4CAF50 100%);
}

/* Hero section WITHOUT carousel (other pages) - keep normal height */
.hero:not(.has-carousel) {
    min-height: 350px; /* Much shorter for non-carousel pages */
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #2D5F3F 0%, #4CAF50 100%);
}

/* Carousel Container */
.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Individual Carousel Slides */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
}

/* Active Slide */
.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Background Images Layer - ABSOLUTE positioning scoped to carousel */
.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Green Gradient Overlay - ABSOLUTE positioning scoped to carousel */
.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 95, 63, 0.85) 0%, rgba(76, 175, 80, 0.75) 100%);
    z-index: 2;
}

/* Background Images for Each Slide */

/* Slide 1 - Warehouse/Logistics Background */
.carousel-slide:nth-child(1)::before {
    background-image: url('../images/photo-1586528116311-ad8dd3c8310d.webp');
}

/* Slide 2 - Team Collaboration Background */
.carousel-slide:nth-child(2)::before {
    background-image: url('../images/photo-1600880292203-757bb62b4baf.webp');
}

/* Slide 3 - Manufacturing/Industrial Background */
.carousel-slide:nth-child(3)::before {
    background-image: url('../images/photo-1581094794329-c8112a89af12.webp');
}

/* Slide 4 - Business Success Background */
.carousel-slide:nth-child(4)::before {
    background-image: url('../images/photo-1454165804606-c3d57bc86b40.webp');
}

/* For local images, uncomment and update paths:
.carousel-slide:nth-child(1)::before {
    background-image: url('../images/carousel/slide1.jpg');
}
.carousel-slide:nth-child(2)::before {
    background-image: url('../images/carousel/slide2.jpg');
}
.carousel-slide:nth-child(3)::before {
    background-image: url('../images/carousel/slide3.jpg');
}
.carousel-slide:nth-child(4)::before {
    background-image: url('../images/carousel/slide4.jpg');
}
*/

/* Carousel Content (Text & Buttons) */
.carousel-content {
    max-width: 700px;
    color: white;
    animation: fadeInUp 0.8s ease;
    position: relative;
    z-index: 3;
}

.carousel-content h1 {
    color: white;
    margin-bottom: 20px;
    font-size: 2.5rem; /* Slightly reduced */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-content p {
    color: rgba(255, 255, 255, 0.98);
    margin-bottom: 30px;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Make Primary Button Stand Out in Carousel */
.carousel-content .btn-primary {
    background: white;
    color: #2D5F3F;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border: 2px solid white;
}

.carousel-content .btn-primary:hover {
    background: #2D5F3F;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================================================
   CAROUSEL NAVIGATION CONTROLS
   Layout: Left Arrow | Dot Indicators | Right Arrow
   ================================================================================ */

.carousel-navigation {
    position: absolute;
    bottom: 80px; /* More spacing from bottom to avoid overlap */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

/* Arrow Control Buttons */
.carousel-control,
.carousel-prev,
.carousel-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    outline: none;
}

.carousel-control:hover,
.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    border-color: white;
}

.carousel-control:active,
.carousel-prev:active,
.carousel-next:active {
    transform: scale(0.95);
}

.carousel-control i,
.carousel-prev i,
.carousel-next i {
    font-size: 1.2rem;
}

/* Dot Indicators Container */
.carousel-indicators {
    display: flex;
    gap: 12px;
    align-items: center;
}

@media (max-width: 768px) {
    .carousel-indicators {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .carousel-indicators {
        gap: 6px;
    }
}

/* Individual Dot Indicators */
.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.15);
}

/* Active Indicator */
.indicator.active {
    background: white;
    width: 14px;
    height: 14px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ================================================================================
   RESPONSIVE STYLES
   ================================================================================ */

/* Tablet & Mobile Adjustments */
@media (max-width: 768px) {
    .hero.has-carousel {
        min-height: 450px;
        padding: 90px 0 180px;
    }

    .hero:not(.has-carousel) {
        min-height: 300px;
        padding: 70px 0 50px;
    }

    .hero-carousel {
        min-height: 350px;
    }

    .carousel-content h1 {
        font-size: 1.8rem;
    }

    .carousel-content p {
        font-size: 1rem;
    }

    /* Mobile Navigation Controls */
    .carousel-navigation {
        bottom: 100px;
        gap: 10px;
    }

    .carousel-control,
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
    }

    .carousel-control i,
    .carousel-prev i,
    .carousel-next i {
        font-size: 1rem;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .indicator.active {
        width: 12px;
        height: 12px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .hero.has-carousel {
        min-height: 420px;
        padding: 80px 0 170px;
    }

    .hero:not(.has-carousel) {
        min-height: 280px;
        padding: 60px 0 40px;
    }

    .carousel-content h1 {
        font-size: 1.6rem;
    }

    .carousel-content p {
        font-size: 0.95rem;
    }

    .carousel-navigation {
        bottom: 20px;
        gap: 8px;
    }

    .carousel-control,
    .carousel-prev,
    .carousel-next {
        width: 35px;
        height: 35px;
    }

    .carousel-control i,
    .carousel-prev i,
    .carousel-next i {
        font-size: 0.9rem;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }

    .indicator.active {
        width: 10px;
        height: 10px;
    }
}

/* ================================================================================
   ACCESSIBILITY & INTERACTION STATES
   ================================================================================ */

/* Focus Styles for Keyboard Navigation */
.carousel-control:focus,
.carousel-prev:focus,
.carousel-next:focus,
.indicator:focus {
    outline: 2px solid white;
    outline-offset: 3px;
}

/* Reduce Motion for Users with Accessibility Preferences */
@media (prefers-reduced-motion: reduce) {
    .carousel-slide,
    .carousel-control,
    .carousel-prev,
    .carousel-next,
    .indicator {
        transition: none;
    }

    .carousel-content {
        animation: none;
    }
}

/* ================================================================================
   END OF CAROUSEL STYLES
   ================================================================================ */