/* 
 * File: carousel.css
 * Purpose: Styles for the hero carousel and fullscreen modal on the index page.
 * Notes: Applied to the Swiper carousel and its fullscreen view.
 */

/* Container for the hero carousel */
.hero-carousel-container {
    position: relative;
    width: 100%;
    height: 70vh;         /* Takes 70% of viewport height */
    min-height: 350px;    /* Minimum height for smaller screens */
    max-height: 800px;    /* Maximum height to prevent overgrowth */
    overflow: hidden;     /* Hides overflow content */
}

/* Swiper container styling */
.swiper-container {
    width: 100%;
    height: 100%;
}

/* Container for each carousel image */
.hero-img-container {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer; /* Indicates clickable for fullscreen */
}

/* Styling for carousel images */
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* Ensures image covers container */
    object-position: center;   /* Centers the image */
    transition: transform 8s ease-out; /* Smooth zoom animation */
}

/* Overlay gradient for better text visibility */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 30%, rgba(0, 0, 0, 0) 50%);
}

/* Zoom effect for active slide */
.swiper-slide-active .hero-img {
    transform: scale(1.05); /* Slight zoom for active slide */
}

/* Navigation buttons styling for main carousel */
.swiper-container .swiper-button-next,
.swiper-container .swiper-button-prev {
    color: white;
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5); /* Slightly darker background for better contrast */
    border-radius: 50%;
    /* Removed backdrop-filter: blur(5px) for cleaner look */
    transition: all 0.3s ease;      /* Smooth hover transition */
}

/* Arrow size inside navigation buttons */
.swiper-container .swiper-button-next:after,
.swiper-container .swiper-button-prev:after {
    font-size: 24px;
    font-weight: bold;
}

/* Hover effect for navigation buttons */
.swiper-container .swiper-button-next:hover,
.swiper-container .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.7); /* Darker on hover */
    transform: scale(1.1);          /* Slight scale up */
}

/* Pagination bullets positioning */
.swiper-pagination {
    bottom: 10px !important; /* Override Swiper default */
}

/* Styling for pagination bullets */
.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5); /* Semi-transparent white */
    opacity: 1;
    transition: all 0.3s ease; /* Smooth transition */
}

/* Active bullet styling */
.swiper-pagination-bullet-active {
    background: white;
    transform: scale(1.2); /* Slightly larger when active */
}

/* Fullscreen modal styling */
.fullscreen-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Dark overlay */
    z-index: 9999; /* On top of everything */
    overflow: hidden;
}

/* Fullscreen Swiper container */
.fullscreen-swiper {
    width: 100%;
    height: 100%;
}

/* Center images in fullscreen slides */
.fullscreen-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fullscreen image styling */
.fullscreen-img {
    max-width: 100%;
    max-height: 100vh; /* Fits within viewport height */
    object-fit: contain; /* Maintains aspect ratio */
}

/* Close button for fullscreen modal */
.close-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    z-index: 10000; /* Above Swiper */
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Hover effect for close button */
.close-fullscreen:hover {
    background: rgba(255, 255, 255, 0.2); /* Lighter on hover */
    transform: scale(1.1); /* Slight scale up */
}

/* Fullscreen navigation buttons (keep blur here as it looks good in fullscreen) */
.fullscreen-swiper .swiper-button-next,
.fullscreen-swiper .swiper-button-prev {
    color: white;
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    backdrop-filter: blur(5px); /* Keep blur in fullscreen mode */
    transition: all 0.3s ease;
}

/* Arrow size in fullscreen buttons */
.fullscreen-swiper .swiper-button-next:after,
.fullscreen-swiper .swiper-button-prev:after {
    font-size: 24px;
    font-weight: bold;
}

/* Hover effect for fullscreen navigation buttons */
.fullscreen-swiper .swiper-button-next:hover,
.fullscreen-swiper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Slide counter in fullscreen modal */
.fullscreen-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    z-index: 10000;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 991.98px) {
    .hero-carousel-container {
        height: 20vh;      /* Reduced height for mobile */
        min-height: 120px; /* Minimum height */
    }

    .swiper-container .swiper-button-next,
    .swiper-container .swiper-button-prev {
        width: 25px;
        height: 25px;
        background: rgba(0, 0, 0, 0.5); /* Consistent background */
    }

    .swiper-container .swiper-button-next:after,
    .swiper-container .swiper-button-prev:after {
        font-size: 12px; /* Smaller arrows */
    }

    .swiper-pagination {
        bottom: 2px !important; /* Closer to bottom */
    }
}