/* Force full width for the main container on homepage */
body.home-page main#home {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* Slider Container */
.slider-custom {
    height: calc(100vh + 100px);
    margin-top: -100px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.slider-custom .list .item {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0 0 0 0;
}

.slider-custom .list .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
}

.slider-custom .list .item .content {
    position: absolute;
    top: 25%;
    width: 1140px;
    max-width: 80%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    /* Scaled down layout */
    padding-right: 35%;
    box-sizing: border-box;
    color: #fff;
    z-index: 110;
    /* Fixed: Increased z-index to stay above expanding image */
    transform-origin: left center;
    /* Ensure scaling doesn't shift position unexpectedly */
}

.slider-custom .list .item .author {
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-size: 0.75rem;
    /* Reduced from 0.9rem */
    color: rgba(255, 255, 255, 0.8);
}

.slider-custom .list .item .title {
    font-size: 2.4rem;
    /* Reduced from 3rem */
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

.slider-custom .list .item .topic {
    font-size: 2.4rem;
    /* Reduced from 3rem */
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    color: #00CFE8;
    text-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

/* Text Box Container */
.slider-custom .list .item .text-box {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 650px;
    /* Reduced from 800px */
}

/* Updated Text Styles */
.slider-custom .list .item .des {
    font-size: 0.9rem;
    /* Reduced from 1rem */
    line-height: 1.6;
    margin-top: 15px;
    /* Reduced margin */
    margin-bottom: 25px;
    /* Reduced margin */
    color: #fff;
    /* Pure white for better contrast */
    max-width: 450px;
    /* Reduced width */
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.slider-custom .list .item .buttons {
    display: flex;
    gap: 12px;
    /* Reduced gap */
}

.slider-custom .list .item .buttons button,
.slider-custom .list .item .buttons a {
    border: none;
    letter-spacing: 2px;
    font-family: inherit;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 28px;
    /* Reduced padding */
    border-radius: 50px;
    background-color: #fff;
    /* Solid white for maximum contrast */
    color: #000;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-size: 0.85rem;
    /* Explicitly reduced font size */
}

.slider-custom .list .item .buttons button:hover,
.slider-custom .list .item .buttons a:hover {
    background-color: #00CFE8;
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    /* Slightly toned down hover */
    /* Enhanced hover effect */
    box-shadow: 0 10px 25px rgba(0, 207, 232, 0.5);
    /* Glowing shadow */
}

.slider-custom .list .item .buttons button:nth-child(2) {
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    backdrop-filter: blur(5px);
}

.slider-custom .list .item .buttons button:nth-child(2):hover {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

/* Thumbnails on the right bottom */
.thumbnail-custom {
    position: absolute;
    bottom: 40px;
    /* Adjusted position */
    left: 45%;
    width: max-content;
    z-index: 100;
    display: flex;
    gap: 15px;
    /* Reduced gap */
    transform: scale(0.8);
    /* Scaled down */
    transform-origin: left bottom;
}

.thumbnail-custom .item {
    width: 150px;
    /* Reduced from 180px */
    height: 210px;
    /* Reduced from 250px */
    flex-shrink: 0;
    position: relative;
    transition: 0.5s;
}

.thumbnail-custom .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    /* Adjusted radius */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.thumbnail-custom .item .content {
    color: #fff;
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 10;
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* Let clicks pass through to item */
}

.thumbnail-custom .item.active .content {
    opacity: 1;
    /* Show on active */
}

.thumbnail-custom .item:hover {
    cursor: pointer;
}

.thumbnail-custom .item .content .title {
    font-weight: 700;
    font-size: 0.75rem;
    /* Reduced font */
    text-transform: uppercase;
}

.thumbnail-custom .item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    border-radius: 12px;
    z-index: 5;
}

/* Arrows */
.arrows-custom {
    position: absolute;
    bottom: 40px;
    /* Adjusted position */
    left: 10%;
    z-index: 100;
    display: flex;
    gap: 12px;
    /* Reduced gap */
    align-items: center;
    transform: scale(0.8);
    /* Scaled down */
    transform-origin: left bottom;
}

.arrows-custom button {
    width: 40px;
    /* Reduced from 50px */
    height: 40px;
    /* Reduced from 50px */
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    /* Reduced font */
}

.arrows-custom button:hover {
    background-color: #00CFE8;
    border-color: #00CFE8;
    transform: scale(1.1);
}

/* Animation Sequence */
.slider-custom .list .item {
    z-index: 1;
    opacity: 0;
}

.slider-custom .list .item:nth-child(1) {
    z-index: 2;
    opacity: 1;
}

/* Content Fade In */
.slider-custom .list .item:nth-child(1) .content .author,
.slider-custom .list .item:nth-child(1) .content .title,
.slider-custom .list .item:nth-child(1) .content .topic,
.slider-custom .list .item:nth-child(1) .content .des,
.slider-custom .list .item:nth-child(1) .content .buttons {
    transform: translateY(30px);
    filter: blur(10px);
    opacity: 0;
    animation: showContent 0.8s 0.2s linear 1 forwards;
}

@keyframes showContent {
    to {
        transform: translateY(0);
        filter: blur(0);
        opacity: 1;
    }
}

.slider-custom .list .item:nth-child(1) .content .title {
    animation-delay: 0.4s !important;
}

.slider-custom .list .item:nth-child(1) .content .topic {
    animation-delay: 0.6s !important;
}

.slider-custom .list .item:nth-child(1) .content .des {
    animation-delay: 0.8s !important;
}

.slider-custom .list .item:nth-child(1) .content .buttons {
    animation-delay: 1s !important;
}

/* Transition: Expand Image from Thumbnail */
.slider-custom.next .list .item:nth-child(1) img {
    width: 150px;
    /* Reduced from 180px */
    height: 210px;
    /* Reduced from 250px */
    position: absolute;
    bottom: 40px;
    /* Adjusted position */
    left: 45%;
    border-radius: 12px;
    animation: expandImage 1s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
    z-index: 100;
}

@keyframes expandImage {
    to {
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

.slider-custom.next .thumbnail-custom .item:nth-last-child(1) {
    width: 0;
    overflow: hidden;
    animation: showThumbnail 0.5s linear 1 forwards;
}

@keyframes showThumbnail {
    to {
        width: 150px;
        /* Reduced from 180px */
    }
}

.slider-custom .time-running {
    position: absolute;
    z-index: 1000;
    width: 0%;
    height: 4px;
    background-color: #00CFE8;
    left: 0;
    top: 0;
}

.slider-custom.next .time-running,
.slider-custom.prev .time-running {
    animation: runningTime 1s linear 1 forwards;
}

@keyframes runningTime {
    from {
        width: 100%
    }

    to {
        width: 0
    }
}

/* Responsive Scaling */
@media screen and (max-width: 991px) {
    .slider-custom .list .item .content {
        padding-right: 0;
        top: 20%;
    }

    .slider-custom .list .item .title,
    .slider-custom .list .item .topic {
        font-size: 2rem;
        /* Reduced from 3rem */
    }

    .thumbnail-custom {
        left: 5%;
        bottom: 100px;
        /* Adjusted */
    }

    .arrows-custom {
        left: 5%;
    }
}

@media screen and (max-width: 767px) {

    .slider-custom .list .item .title,
    .slider-custom .list .item .topic {
        font-size: 1.5rem;
        /* Reduced from 2.2rem */
    }

    .slider-custom .list .item .des {
        font-size: 0.85rem;
        /* Reduced */
    }

    .thumbnail-custom .item {
        width: 100px;
        /* Reduced from 120px */
        height: 150px;
        /* Reduced from 180px */
    }
}

/* RTL Support */
body.arabic .slider-custom .list .item .content {
    left: auto;
    right: 50%;
    transform: translateX(50%);
    padding-right: 0;
    padding-left: 35%;
    text-align: right;
}

body.arabic .thumbnail-custom {
    left: auto;
    right: 45%;
    flex-direction: row-reverse;
}

body.arabic .arrows-custom {
    left: auto;
    right: 10%;
}