/* --- Custom Homepage Slider & Feature Bar Styles --- */

/* 1. Main Container Layout */
.custom-slider-container {
    max-width: 100%;
}

.custom-slider-wrapper {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 16px !important; /* Premium rounded corner size */
    overflow: hidden;
    position: relative;
    /* Force clip on webkit browsers */
    -webkit-backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
}

/* 2. Slick Slider Overrides */
#custom-homepage-slider {
    position: relative;
    overflow: hidden;
    border-radius: 16px !important;
}

/* Prevent FOUC (Flash of Unstyled Content) and CLS */
#custom-homepage-slider:not(.slick-initialized) {
    display: block;
    height: 380px; /* Pre-reserve desktop height */
    overflow: hidden;
}

#custom-homepage-slider:not(.slick-initialized) .slide-item:not(:first-child) {
    display: none;
}

#custom-homepage-slider .slide-item img {
    object-fit: cover;
    height: 380px; /* Standard slider height on desktop */
    border-radius: 16px !important;
}

/* Custom Navigation Arrows (Long vertical rectangles) */
#custom-homepage-slider .slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 90px; /* Tall vertical rectangle */
    background-color: rgba(0, 0, 0, 0.25);
    border: none;
    z-index: 12;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease-in-out;
    outline: none;
    color: #ffffff;
    padding: 0;
}

#custom-homepage-slider .slick-arrow:hover {
    background-color: rgba(0, 0, 0, 0.65);
}

/* Hide default slick arrow characters */
#custom-homepage-slider .slick-arrow::before {
    display: none !important;
    content: "" !important;
}

#custom-homepage-slider .slick-prev {
    left: 0;
    border-radius: 0 8px 8px 0;
}

#custom-homepage-slider .slick-next {
    right: 0;
    border-radius: 8px 0 0 8px;
}

#custom-homepage-slider .slick-arrow i {
    font-size: 16px;
    color: #ffffff;
    transition: transform 0.2s ease;
}

#custom-homepage-slider .slick-prev:hover i {
    transform: translateX(-2px);
}

#custom-homepage-slider .slick-next:hover i {
    transform: translateX(2px);
}

/* 3. Right Fixed Banners Column (Floating Overlay on Desktop) */
.custom-fixed-banners-col {
    position: absolute;
    right: 25px;
    top: 25px;
    bottom: 25px;
    width: 310px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease-in-out;
}

.fixed-banners-list {
    height: 100%;
}

.fixed-banner-item {
    transition: all 0.2s ease-in-out;
}

.fixed-banner-item:hover {
    transform: translateX(4px);
}

.fixed-banner-link:hover .fixed-banner-title {
    color: #542580 !important;
}

.fixed-banner-icon-container {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
}

.fixed-banner-item:hover .fixed-banner-icon-container {
    background-color: #542580;
    border-color: #542580;
}

.fixed-banner-icon-container i {
    font-size: 18px;
    color: #542580;
    transition: all 0.2s ease-in-out;
}

.fixed-banner-item:hover .fixed-banner-icon-container i {
    color: #ffffff;
}

.fixed-banner-img-icon {
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    transition: all 0.2s ease-in-out;
}

.fixed-banner-item:hover .fixed-banner-img-icon {
    filter: brightness(0) invert(1);
}

.fixed-banner-title {
    font-size: 14px;
    letter-spacing: -0.2px;
    line-height: 1.2;
    transition: color 0.2s ease;
}

.fixed-banner-description {
    line-height: 1.3;
}

/* 4. Bottom Features Bar (6-column row) */
.features-bar {
    border: 1px solid #e9ecef;
    border-radius: 12px !important;
}

.feature-item-col {
    border-right: 1px solid #f1f5f9;
}

.feature-item-col:last-child {
    border-right: none;
}

.feature-item-box {
    transition: all 0.2s ease-in-out;
}

.feature-item-box:hover {
    transform: translateY(-2px);
}

.feature-item-link:hover .feature-item-title {
    color: #542580 !important;
}

.feature-item-icon-container {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
}

.feature-item-box:hover .feature-item-icon-container {
    background-color: #542580;
    border-color: #542580;
}

.feature-item-icon-container i {
    font-size: 15px;
    color: #542580;
    transition: all 0.2s ease-in-out;
}

.feature-item-box:hover .feature-item-icon-container i {
    color: #ffffff;
}

.feature-item-img-icon {
    max-width: 20px;
    max-height: 20px;
    object-fit: contain;
    transition: all 0.2s ease-in-out;
}

.feature-item-box:hover .feature-item-img-icon {
    filter: brightness(0) invert(1);
}

.feature-item-title {
    font-size: 13px;
    line-height: 1.2;
    transition: color 0.2s ease;
}

.feature-item-description {
    font-size: 11px;
    line-height: 1.2;
}

/* 5. Responsive Styling (Mobile & Tablet) */
@media (max-width: 991px) {
    #custom-homepage-slider .slide-item img {
        height: auto; /* Let the height be auto so responsive picture loads perfectly */
        aspect-ratio: 16/9; /* Standard widescreen aspect ratio for mobile banners */
    }

    #custom-homepage-slider:not(.slick-initialized) {
        height: auto;
        aspect-ratio: 16/9;
    }

    .custom-slider-wrapper {
        border-radius: 8px !important;
    }

    /* Stack card column below the slider on mobile */
    .custom-fixed-banners-col {
        position: relative;
        right: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid #f1f5f9;
        background-color: #ffffff;
        padding: 10px 0 !important;
    }

    .fixed-banners-list {
        min-height: auto;
        flex-direction: row !important;
        flex-wrap: wrap;
        padding: 10px !important;
    }

    .fixed-banner-item {
        width: 50%;
        padding: 10px !important;
    }

    .fixed-banner-item:hover {
        transform: none;
    }

    /* Small screen arrows */
    #custom-homepage-slider .slick-arrow {
        height: 60px;
        width: 28px;
    }

    .feature-item-col {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
    }

    /* Remove bottom border for last row items on mobile */
    .feature-item-col:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

@media (max-width: 575px) {
    .fixed-banner-item {
        width: 100%;
    }
    
    .feature-item-col {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        border-bottom: 1px solid #f1f5f9;
    }

    .feature-item-col:last-child {
        border-bottom: none;
    }
}
