/* Home Banner Universal Styles - Apply to all media types */
.home-hero-container {
    position: relative !important;
    width: 100% !important;
    height: 480px !important;
    overflow: hidden !important;
    background: #f8f9fa; /* Light background instead of black */
    min-height: unset !important;
}

/* Special class for carousel mode on mobile */
@media (max-width: 768px) {
    .home-hero-container.has-carousel {
        height: 400px !important;
        min-height: 300px !important;
    }
}

/* Home Banner Carousel Styles */
.home-banner-carousel {
    position: relative;
    width: 100%;
    height: 100%;

}

.home-banner-swiper {
    width: 100%;
    height: 100%;
}

.home-banner-swiper .swiper-slide {
    position: relative;
    overflow: hidden;
}

/* Slide link - make entire slide clickable */
.home-banner-swiper .slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

/* Slide image wrapper */
.slide-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Slide content overlay */
.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    color: #ffffff;
    width: 90%;
    max-width: 1200px;
    padding: 2rem;
}

.slide-content h1 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.slide-content p {
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

.slide-content .btn {
    animation: fadeInUp 1.2s ease-out;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

.slide-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Dark overlay for better text readability */
.slide-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.2) 0%, 
        rgba(0,0,0,0.4) 50%, 
        rgba(0,0,0,0.2) 100%);
    z-index: 2;
}

/* Swiper navigation buttons */
.home-banner-swiper .swiper-button-next,
.home-banner-swiper .swiper-button-prev {
    color: #ffffff;
    background: rgba(0,0,0,0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.home-banner-swiper .swiper-button-next:hover,
.home-banner-swiper .swiper-button-prev:hover {
    background: rgba(0,0,0,0.5);
    transform: scale(1.1);
}

.home-banner-swiper .swiper-button-next::after,
.home-banner-swiper .swiper-button-prev::after {
    font-size: 20px;
}

/* Swiper pagination */
.home-banner-swiper .swiper-pagination {
    bottom: 30px;
    z-index: 11;
}

.home-banner-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.6);
    opacity: 1;
    margin: 0 6px;
    transition: all 0.3s ease;
}

.home-banner-swiper .swiper-pagination-bullet-active {
    background: #ffffff;
    width: 30px;
    border-radius: 6px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for Carousel */
@media (max-width: 768px) {
    /* Carousel specific mobile styles */
    .home-banner-carousel {
        height: 100%;
        min-height: unset;
    }
    
    /* Adjust slide image for mobile to show full content */
    .home-banner-carousel .slide-image {
        object-fit: cover !important; /* Use cover to fill the space */
        /* Remove background color */
    }
    
    /* Ensure wrapper fills the container */
    .home-banner-carousel .slide-image-wrapper {
        /* Remove background color */
    }
    
    .slide-content h1 {
        font-size: 1.5rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
    }
    
    .home-banner-swiper .swiper-button-next,
    .home-banner-swiper .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .home-banner-swiper .swiper-button-next::after,
    .home-banner-swiper .swiper-button-prev::after {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .home-banner-carousel {
        height: 100%;
        min-height: unset;
    }
    
    /* Even smaller screens - keep cover for consistency */
    .home-banner-carousel .slide-image {
        object-fit: cover !important;
    }
    
    .slide-content {
        padding: 1rem;
        /* background: rgba(0,0,0,0.7);  */
        border-radius: 10px;
    }
    
    .slide-content h1 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .slide-content p {
        font-size: 0.85rem;
        margin-bottom: 1.2rem;
    }
    
    .slide-content .btn {
        font-size: 0.85rem;
        padding: 0.4rem 1.2rem;
    }
    
    /* Hide navigation arrows on very small screens */
    .home-banner-swiper .swiper-button-next,
    .home-banner-swiper .swiper-button-prev {
        display: none;
    }
    
    /* Adjust pagination position */
    .home-banner-swiper .swiper-pagination {
        bottom: 15px;
    }
}

/* Universal media content styles - Apply to video, single image, and carousel */
.home-hero-container .video_content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    color: #ffffff;
    width: 90%;
    max-width: 1200px;
    padding: 2rem;
}

/* Video specific styles */
#bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

/* Single image specific styles */
#bg-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#bg-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.2) 0%, 
        rgba(0,0,0,0.4) 50%, 
        rgba(0,0,0,0.2) 100%);
    z-index: 2;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    /* Default height for desktop media on mobile */
    .home-hero-container {
        height: 300px !important;
    }
    
    /* Override for mobile-specific media */
    .home-hero-container[data-mobile-enabled="true"] {
        height: 260px !important;
        min-height: 260px !important;
        max-height: 260px !important;
    }
    
    .home-hero-container .video_content h1,
    .slide-content h1 {
        font-size: 1.8rem;
    }
    
    .home-hero-container .video_content p,
    .slide-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Default height for desktop media on mobile */
    .home-hero-container {
        height: 300px !important;
    }
    
    /* Override for mobile-specific media */
    .home-hero-container[data-mobile-enabled="true"] {
        height: 260px !important;
        min-height: 260px !important;
        max-height: 260px !important;
    }
    
    .home-hero-container .video_content,
    .slide-content {
        padding: 1rem;
    }
    
    .home-hero-container .video_content h1,
    .slide-content h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .home-hero-container .video_content p,
    .slide-content p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .home-hero-container .video_content .btn,
    .slide-content .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1.5rem;
    }
}

/* Ensure text readability on all backgrounds */
.home-hero-container .video_content h1,
.home-hero-container .video_content p {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.home-hero-container .video_content .btn {
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.home-hero-container .video_content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

/* Mobile-specific Media Controls */
/* By default, hide mobile media on desktop */
.mobile-media {
    display: none;
}

/* Desktop media is visible by default */
.desktop-media {
    display: block;
    width: 100%;
    height: 100%;
}

/* DESKTOP VIEW - Always show desktop media when not on mobile */
@media (min-width: 769px) {
    .home-hero-container .desktop-media {
        display: block !important;
    }
    
    .home-hero-container .mobile-media {
        display: none !important;
    }
}

/* MOBILE VIEW - Show mobile media if enabled, otherwise show desktop */
@media (max-width: 768px) {
    /* Default: show desktop media on mobile */
    .home-hero-container .desktop-media {
        display: block;
    }
    
    .home-hero-container .mobile-media {
        display: none;
    }
    
    /* When mobile media is enabled */
    .home-hero-container[data-mobile-enabled="true"] .desktop-media {
        display: none !important;
    }
    
    .home-hero-container[data-mobile-enabled="true"] .mobile-media {
        display: block !important;
        width: 100%;
        height: 100%;
        position: relative;
    }
    
    /* Ensure container has proper height and full width for mobile media */
    .home-hero-container[data-mobile-enabled="true"] {
        height: 260px !important; /* Fixed height 260px */
        min-height: 260px !important;
        max-height: 260px !important;
        width: 100vw !important; /* Full viewport width */
        margin-left: calc(-50vw + 50%) !important; /* Center and extend to full width */
        margin-right: calc(-50vw + 50%) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow: hidden !important;
        position: relative !important;
    }
    
    /* Mobile-specific video styles */
    #mobile-bg-video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        z-index: 1;
    }
    
    /* Mobile-specific image styles */
    #mobile-bg-image-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        overflow: hidden;
    }
    
    /* Ensure full width for mobile hero container wrapper */
    .home-hero-container[data-mobile-enabled="true"] #mobile-bg-image-wrapper {
        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
    }
    
    #mobile-bg-image-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, 
            rgba(0,0,0,0.1) 0%, 
            rgba(0,0,0,0.3) 50%, 
            rgba(0,0,0,0.1) 100%);
        z-index: 2;
    }
    
    #mobile-bg-image-wrapper .hero-image {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Use cover to fill the container */
        object-position: center;
        /* Remove black background */
    }
    
    /* Mobile carousel specific styles */
    .mobile-carousel {
        width: 100%;
        height: 100%;
        position: relative;
    }
    
    /* Ensure full width for mobile carousel */
    .home-hero-container[data-mobile-enabled="true"] .mobile-carousel {
        width: 100vw;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .mobile-carousel .swiper {
        width: 100%;
        height: 100%;
    }
    
    .mobile-carousel .slide-image-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    .mobile-carousel .slide-image {
        width: 100%;
        height: 100%;
        object-fit: cover !important; /* Fill the container */
        object-position: center;
        /* Remove black background */
    }
    
    /* Hide desktop navigation arrows on mobile carousel */
    .mobile-carousel .swiper-button-next,
    .mobile-carousel .swiper-button-prev {
        display: none;
    }
    
    /* Adjust mobile content positioning */
    .mobile-media .video_content {
        padding: 1rem;
    }
    
    .mobile-media .video_content h1 {
        font-size: 1.5rem !important;
    }
    
    .mobile-media .video_content p {
        font-size: 0.9rem !important;
    }
    
    .mobile-media .video_content .btn {
        font-size: 0.85rem !important;
        padding: 0.4rem 1.2rem !important;
    }
}

/* Even smaller mobile screens */
@media (max-width: 480px) {
    .mobile-media .video_content {
        background: rgba(0,0,0,0.7);
        border-radius: 10px;
        padding: 0.8rem;
    }
    
    .mobile-media .video_content h1 {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .mobile-media .video_content p {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
    }
    
    .mobile-media .video_content .btn {
        font-size: 0.8rem !important;
        padding: 0.35rem 1rem !important;
    }
    
    /* Keep 260px height even on small screens for consistency */
    .home-hero-container[data-mobile-enabled="true"] {
        height: 260px !important;
        min-height: 260px !important;
        max-height: 260px !important;
    }
    
    /* Adjust image fit for very small screens if needed */
    #mobile-bg-image-wrapper .hero-image,
    .mobile-carousel .slide-image {
        object-fit: cover !important; /* Maintain cover to avoid black bars */
    }
}

/* Special handling for portrait-oriented images on mobile */
@media (max-width: 768px) and (orientation: portrait) {
    .home-hero-container[data-mobile-enabled="true"] {
        height: 260px !important; /* Keep consistent 260px height */
        min-height: 260px !important;
        max-height: 260px !important;
    }
}

/* Ensure mobile carousel is properly initialized */
.mobile-carousel .swiper-slide {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.mobile-carousel .slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}
