/* --- FINAL USER FIXES (Recovered & Applied) --- */
.value__accordion-description {
    transition: color 0.3s ease !important;
}

body:not(.dark-theme) .value__accordion-description {
    color: #000000 !important;
    font-weight: 500 !important;
}

body.dark-theme .value__accordion-description {
    color: #ffffff !important;
}


/* 1. Prime Text & Typing Animation Fix */
#prime-coler {
    font-size: 4rem;
    font-weight: 700;
    color: var(--first-color);
    display: inline-block;
}

#home #prime-coler {
    display: block;
    /*width: 100% !important;*/
}

span#prime-coler {
    padding-top: 20px;
}

.home__title {
    display: block;
    line-height: 0.55 !important;
    text-align: left !important;
    /* Force Left for English */
}

body.rtl .home__title,
body[dir="rtl"] .home__title {
    text-align: right !important;
    /* Force Right for Arabic */
}

.typing-text {
    color: var(--title-color);
    display: inline !important;
    /* Ensure it stays inline with the cursor */
}

@media screen and (max-width: 768px) {
    #prime-coler {
        font-size: 2.5rem;
        /* Smoother scaling on mobile */
        margin-bottom: -0.75rem !important;
    }

    .home__title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        line-height: 0.65 !important;
    }

    .typing-text {
        display: inline !important;
        /* margin-top: -0.8rem !important; Removed since it's inline */
        font-size: 2rem;
        line-height: 1.2 !important;
    }
}

/* 2. Numbers Section Grid (2x2 Mobile, 4x1 Desktop) - Unified */
.home__value {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
    /* Increased gap */
    width: 100% !important;
    max-width: 600px;
    /* Constrain width on mobile for 2x2 look */
    
}

/* Desktop: 4 items in a row */
@media screen and (min-width: 1024px) {
    .home__value {
        grid-template-columns: repeat(4, 1fr) !important;
        max-width: 100% !important;
        /*gap: 2.5rem !important;*/
    }
}

.home__value>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: transparent !important;
    border: 1px solid rgba(239, 193, 169, 0.1);
    padding: 1.75rem 1rem;
    /* Increased vertical padding */
    border-radius: 18px;
    /* Smoother corners for larger cards */
    transition: all 0.3s ease;
}

.home__value-number {
    font-size: 2.75rem !important;
    /* Larger numbers */
    margin-bottom: 0.5rem;
    font-weight: 700 !important;
}

.home__value-description {
    text-align: center !important;
    font-size: 1.05rem !important;
    /* Larger description text */
    display: block !important;
    line-height: 1.3 !important;
}

/* Enhanced Dark Mode for Stats Cards */
body.dark-theme .home__value>div {
    background: transparent !important;
    border: 1px solid rgba(239, 193, 169, 0.1) !important;
    box-shadow: none !important;
}

body.dark-theme .home__value-number {
    color: #efc1a9 !important;
    /* Premium gold color for numbers in dark mode */
}


/* 3. Mobile Dark Mode & Controls Fix */
@media screen and (max-width: 1023px) {
    .nav__right {
        position: relative;
        z-index: 10000 !important;
        /* Extremely high z-index */
        pointer-events: auto !important;
        display: flex !important;
    }

    .change-theme {
        cursor: pointer !important;
        pointer-events: auto !important;
        position: relative;
        z-index: 10001 !important;
    }
}

/* 4. Footer Alignment Helpers */
.footer-en .footer__content {
    text-align: left !important;
    direction: ltr !important;
}

.footer-en .footer__description,
.footer-en .footer__links,
.footer-en .footer__social {
    justify-content: flex-start !important;
    text-align: left !important;
}

.footer-ar .footer__content {
    text-align: right !important;
    direction: rtl !important;
}

.footer-ar .footer__description,
.footer-ar .footer__links,
.footer-ar .footer__social {
    justify-content: flex-start !important;
    text-align: right !important;
}

/* 5. Mobile Dropdown Visibility Fix */
@media screen and (max-width: 1023px) {
    .nav__item.dropdown.active-dropdown .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        max-height: 1000px !important;
    }
}

/* 6. Theme Button Styling (Box Fix) */
/* 6. Theme Button Styling (Box Fix) - MOVED TO MOBILE ONLY */
@media screen and (max-width: 1023px) {

    #theme-button,
    .change-theme {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        height: 42px !important;
        border: 1px solid rgba(239, 193, 169, 0.3) !important;
        border-radius: 8px !important;
        padding: 0 !important;
        font-size: 1.25rem !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}



/* 7. Partners Slider Fix - Enhanced for 3 Cards Display */
.About__container {
    overflow: hidden !important;
    width: 100% !important;
    position: relative !important;
    padding-bottom: 4rem !important;
}

.About__container.swiper {
    display: block !important;
    padding-bottom: 4rem !important;
}

/* Swiper wrapper fix */
.About__container .swiper-wrapper {
    display: flex !important;
    align-items: stretch !important;
    transition-timing-function: ease-in-out !important;
}

.About__card {
    width: 100% !important;
    max-width: 350px !important;
    margin: 0 auto !important;
    background-color: transparent !important;
    border-radius: 1.5rem;
    padding: 1rem 1rem 2rem;
    box-shadow: none !important;
    transition: all .4s ease;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid rgba(239, 193, 169, 0.1);
}

.About__card:hover {
    box-shadow: 0 15px 35px rgba(239, 193, 169, 0.2);
    transform: translateY(-8px);
    border-color: rgba(239, 193, 169, 0.3);
}

.swiper-slide {
    height: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: stretch !important;
    padding: 0 0.5rem !important;
}

.About__img {
    width: 100% !important;
    height: 180px !important;
    object-fit: contain !important;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    box-sizing: border-box;
    transition: transform 0.3s ease;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.About__card:hover .About__img {
    transform: scale(1.05);
}

.About__data {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.About__title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--title-color);
    font-weight: 600;
    line-height: 1.3;
}

.About__description {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.5;
    flex: 1;
    opacity: 0.8;
}

.About__price span {
    color: var(--second-color);
    font-size: var(--small-font-size);
}

/* Enhanced Swiper navigation buttons */
.About__container .swiper-button-next,
.About__container .swiper-button-prev {
    top: auto !important;
    bottom: 0 !important;
    width: 50px !important;
    height: 50px !important;
    background: linear-gradient(135deg, #efc1a9, #d4a894) !important;
    border: none !important;
    border-radius: 50% !important;
    color: white !important;
    font-size: 1.5rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(239, 193, 169, 0.3) !important;
    z-index: 100 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.About__container .swiper-button-next:hover,
.About__container .swiper-button-prev:hover {
    background: linear-gradient(135deg, #d4a894, #c19a85) !important;
    transform: scale(1.1) translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(239, 193, 169, 0.4) !important;
}

.About__container .swiper-button-next::after,
.About__container .swiper-button-prev::after {
    font-size: 18px !important;
    font-weight: bold !important;
}

.About__container .swiper-button-prev {
    left: calc(50% - 4rem) !important;
}

.About__container .swiper-button-next {
    right: calc(50% - 4rem) !important;
}

/* RTL support for Arabic */
.rtl .About__container .swiper-button-prev {
    right: calc(50% - 4rem) !important;
    left: auto !important;
}

.rtl .About__container .swiper-button-next {
    left: calc(50% - 4rem) !important;
    right: auto !important;
}

/* Dark theme support */
.dark-theme .About__img {
    background: var(--container-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .About__card {
    background-color: transparent !important;
    border-color: rgba(239, 193, 169, 0.2);
}

.dark-theme .About__card:hover {
    border-color: rgba(239, 193, 169, 0.4);
}

/* Desktop: Ensure exactly 3 cards are visible */
@media screen and (min-width: 992px) {
    .About__container {
        max-width: 1200px;
        margin: 0 auto;
    }

    .About__card {
        max-width: 320px !important;
    }
}

/* Tablet responsive */
@media screen and (max-width: 991px) and (min-width: 768px) {
    .About__card {
        max-width: 300px !important;
    }

    .About__container .swiper-button-next,
    .About__container .swiper-button-prev {
        width: 45px !important;
        height: 45px !important;
    }
}

/* Mobile responsive */
@media screen and (max-width: 767px) {
    .About__card {
        max-width: 280px !important;
        padding: 0.75rem 0.75rem 1.5rem;
    }

    .About__img {
        height: 160px !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        max-width: 100% !important;
    }

    .About__container .swiper-button-next,
    .About__container .swiper-button-prev {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
        bottom: 0.5rem !important;
        z-index: 100 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .About__container .swiper-button-prev {
        left: calc(50% - 3rem) !important;
    }

    .About__container .swiper-button-next {
        right: calc(50% - 3rem) !important;
    }
}

/* 8. Hamburger Menu Visibility Fix */
.nav__toggle {
    position: relative !important;
    z-index: 10100 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    display: flex !important;
}

.nav__menu.show-menu {
    opacity: 1 !important;
    visibility: visible !important;
    top: 0 !important;
    transform: translateX(-50%) !important;
    display: block !important;
}

.nav__center.show-menu {
    opacity: 1 !important;
    visibility: visible !important;
    top: 0 !important;
    display: flex !important;
}

/* 9. Final Hamburger Fix for nav-menu ID (Right Slide Drawer Redesign) - MOBILE ONLY */
@media screen and (max-width: 1023px) {
    .nav__overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(15, 20, 25, 0.7);
        z-index: 10050;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease-in-out;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .nav__overlay.show {
        opacity: 1;
        visibility: visible;
    }

    #nav-menu {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        /* Start off-screen right */
        left: auto !important;
        bottom: 0 !important;
        width: 60vw !important;
        /* Adjusted slightly so links aren't uncomfortably compacted, but still looks extremely premium */
        min-width: 250px !important;
        /* Prevents text overflow on small phones */
        max-width: 400px !important;
        height: 100vh !important;
        max-height: 100vh !important;

        /* Elegant Glassmorphism Effect */
        background: rgba(10, 15, 25, 0.5) !important;
        /* Very transparent dark */
        backdrop-filter: blur(20px) !important;
        /* Higher blur for better readability */
        -webkit-backdrop-filter: blur(20px) !important;
        border-left: 1px solid rgba(255, 255, 255, 0.05) !important;

        z-index: 10100 !important;
        padding: 4rem 2rem 2rem !important;
        /* Space for close button */
        box-shadow: -15px 0 40px rgba(0, 0, 0, 0.3) !important;
        border-radius: 2rem 0 0 2rem !important;
        overflow-y: auto !important;

        /* Animation: Slide in from the right */
        transform: translateX(100%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease-in-out, visibility 0.5s !important;
        display: block !important;
    }

    #nav-menu.show-menu {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }

    .dark-theme #nav-menu {
        background: rgba(10, 15, 25, 0.5) !important;
        border-left: 1px solid rgba(239, 193, 169, 0.1) !important;
    }

    /* Close Button Inside Drawer */
    .nav__close-btn {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        font-size: 2rem;
        color: var(--title-color);
        background: transparent;
        border: none;
        cursor: pointer;
        transition: transform 0.3s ease, color 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10110;
    }

    .nav__close-btn:hover {
        color: var(--first-color);
        transform: rotate(90deg);
    }

    /* Ensure it always slides from the Right, even on Arabic (RTL) pages */
    body.rtl #nav-menu {
        right: 0 !important;
        left: auto !important;
        transform: translateX(100%) !important;
        border-radius: 2rem 0 0 2rem !important;
    }

    body.rtl #nav-menu.show-menu {
        transform: translateX(0) !important;
    }

    /* Close btn position can stay on the left in Arabic if they want, or we keep it top right */
    body.rtl .nav__close-btn {
        right: auto;
        left: 1.5rem;
    }
}

/* 10. Hide Hamburger & Close Button on Desktop & Redundant Close on Mobile */
@media screen and (min-width: 1024px) {

    .nav__toggle,
    .nav__close-btn,
    #nav-close {
        display: none !important;
    }
}

@media screen and (max-width: 1023px) {

    /* Hide the injected close button to use the main toggle as X */
    .nav__close-btn,
    #nav-close {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* 11. Mobile Header Layout & Alignment Fix (Unified for EN/AR) */
@media screen and (max-width: 1023px) {
    .nav {
        justify-content: space-between !important;
        padding: 0 1rem !important;
    }

    .nav__left {
        flex: 0 0 auto !important;
    }

    .nav__right {
        flex: 0 1 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        width: auto !important;
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        /* Force alignment to the end */
        margin-left: auto !important;
    }

    /* RTL Specific Overrides if needed */
    .rtl .nav__right {
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    .nav__toggle {
        position: relative !important;
        top: 0 !important;
        transform: none !important;
        margin-left: 0.5rem !important;
        margin-right: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        height: 42px !important;
        box-shadow: none !important;
        background: transparent !important;
        border: 1px solid rgba(239, 193, 169, 0.3) !important;
        border-radius: 8px !important;
        padding: 0 !important;
    }

    .rtl .nav__toggle {
        margin-left: 0 !important;
        margin-right: 0.5rem !important;
    }

    .nav__toggle span {
        width: 20px !important;
    }

    .change-theme {
        margin: 0 !important;
    }
}

/* 12. Hamburger Button Enhanced Styling */
/* 12. Hamburger Button Enhanced Styling - Responsive */
@media screen and (max-width: 1023px) {
    .nav__toggle {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        width: 44px !important;
        height: 44px !important;
        background: transparent !important;
        border: 1px solid rgba(239, 193, 169, 0.4) !important;
        border-radius: 10px !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 10100 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .nav__toggle span {
        display: block !important;
        width: 26px !important;
        /* Slightly wider */
        height: 3px !important;
        background: #ffffff !important;
        border-radius: 4px !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin: 5px auto !important;
        /* Standard hamburger gap */
        z-index: 10500 !important;
    }

    /* Active State (X) */
    .nav__toggle:active,
    .nav__toggle.active {
        background: var(--first-color, #efc1a9) !important;
        border-color: var(--first-color, #efc1a9) !important;
        transform: scale(0.95) !important;
        z-index: 10500 !important;
    }

    .nav__toggle.active span {
        background: #ffffff !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        margin: 0 !important;
        z-index: 10501 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Create the X */
    .nav__toggle.active span:nth-child(1) {
        transform: translate(-50%, -50%) rotate(45deg) !important;
        width: 26px !important;
    }

    .nav__toggle.active span:nth-child(2) {
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translate(-100%, -50%) !important;
    }

    .nav__toggle.active span:nth-child(3) {
        transform: translate(-50%, -50%) rotate(-45deg) !important;
        width: 26px !important;
    }

    /* Fallback for icon tags */
    .nav__toggle i {
        display: block !important;
        color: #ffffff !important;
        font-size: 1.8rem !important;
        z-index: 10501 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* 13. Mobile & Tablet Unified Fixes (Up to 1023px) */
@media screen and (max-width: 1023px) {

    /* Global Section Title Centering */
    .section__title,
    .section__subtitle {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
    }

    /* Founder Section (Value) - Clean Centered Layout */
    .value.section {
        padding: 4rem 0 2rem !important;
    }

    .value__container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2.5rem !important;
        padding: 0 1.5rem !important;
        grid-template-columns: 1fr !important;
        /* Force single column */
    }

    .value__images {
        order: 1 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        position: relative !important;
        margin-bottom: 0 !important;
    }

    .value__img {
        width: 280px !important;
        height: 360px !important;
        border-radius: 1.5rem !important;
        overflow: hidden !important;
        margin: 0 auto !important;
        box-shadow: var(--shadow-small) !important;
        z-index: 5 !important;
    }

    .value__orbe {
        width: 300px !important;
        height: 380px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: -10px !important;
        z-index: 1 !important;
    }

    .value__content {
        order: 2 !important;
        width: 100% !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .value__data {
        text-align: center !important;
        margin-bottom: 2rem !important;
    }

    .value__data .section__title {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
        line-height: 1.3 !important;
    }

    .value__description {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        max-width: 500px !important;
        margin: 0 auto 1.5rem auto !important;
    }

    /* Accordion Fixes for Mobile & Global Activity */
    .value__accordion-item {
        background: var(--container-color) !important;
        border: 1px solid rgba(239, 193, 169, 0.1) !important;
        border-radius: 1rem !important;
        margin-bottom: 1rem !important;
        transition: all 0.4s ease !important;
        overflow: hidden !important;
        cursor: pointer !important;
    }

    .value__accordion-header {
        padding: 1rem !important;
        display: flex !important;
        align-items: center !important;
        column-gap: 1rem !important;
    }

    .value__accordion-icon {
        background-color: rgba(239, 193, 169, 0.1) !important;
        padding: 8px !important;
        border-radius: 0.5rem !important;
        color: #efc1a9 !important;
        font-size: 1.25rem !important;
    }

    .value__accordion-arrow {
        margin-left: auto !important;
        color: #efc1a9 !important;
        font-size: 14px !important;
        transition: transform 0.4s ease !important;
    }

    /* Rotation & Open State */
    .accordion-open {
        border-color: #efc1a9 !important;
        box-shadow: 0 10px 25px rgba(239, 193, 169, 0.1) !important;
    }

    .accordion-open .value__accordion-arrow {
        transform: rotate(-180deg) !important;
    }

    .value__accordion-content {
        height: 0;
        overflow: hidden;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .value__accordion-title {
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: var(--title-color) !important;
    }

    .value__accordion-description {
        padding: 0 1rem 1.5rem 3.5rem !important;
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
        transition: color 0.3s ease !important;
    }



    /* RTL support for accordion content padding */
    .rtl .value__accordion-description,
    [dir="rtl"] .value__accordion-description {
        padding: 0 3.5rem 1.5rem 1rem !important;
    }

    .rtl .value__accordion-arrow,
    [dir="rtl"] .value__accordion-arrow {
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    /* Hide redundant extra title on small mobile to avoid mess */
    @media screen and (max-width: 480px) {

        /* Hide the section header for the Founder section to avoid double titles */
        .value.section>.container {
            display: none !important;
        }

        .value.section {
            padding-top: 2rem !important;
        }

        .value__img-caption {
            display: none !important;
        }

        .value__img {
            width: 85% !important;
            max-width: 320px !important;
            height: 380px !important;
        }

        .value__orbe {
            width: 90% !important;
            max-width: 340px !important;
            height: 400px !important;
        }

        /* Adjust global section title for very small screens */
        .section__title {
            font-size: 1.25rem !important;
        }
    }

    /* Fixed alignment for accordion icons & text */
    .value__accordion-header {
        display: flex !important;
        align-items: center !important;
        column-gap: 1rem !important;
    }

    .value__accordion-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 32px !important;
    }

    .value__accordion-title {
        flex: 1 !important;
        text-align: inherit !important;
    }

    /* Ensure proper font sizing for titles on all mobile */
    .section__title {
        margin-bottom: 2rem !important;
    }

    .section__subtitle {
        margin-bottom: 0.5rem !important;
    }

    /* Partners Section Visibility */
    .section#partners {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 3rem 0 !important;
    }

    .About__container {
        padding-bottom: 3rem !important;
    }

    .About__card {
        padding: 1.5rem !important;
        margin: 0 auto !important;
    }

    /* Footer Mobile Fixes (Respecting RTL/LTR alignments) */
    .footer {
        padding: 3rem 0 1rem !important;
    }

    .footer__container {
        padding: 0 1.5rem !important;
    }

    .footer__content {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 2rem !important;
        justify-content: space-between !important;
    }

    /* Make children adapt to flexible sizes */
    .footer__data {
        flex: 1 1 40% !important;
        /* Take roughly half the screen on large mobiles */
        min-width: 200px !important;
    }
}

/* End of Mobile & Tablet Unified Fixes */

/* On very small screens, it will stack automatically due to flex-basis */
@media screen and (max-width: 480px) {
    .footer__data {
        flex: 1 1 100% !important;
    }
}

/* 14. Project Cards Content Fix - Full Text Display */
.project-card {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    /* Crucial: allow content to expand outside if needed */
}

.project-card__content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: fit-content !important;
    overflow: visible !important;
    padding: 1.5rem !important;
    margin-top: -30px !important;
    /* Slightly reduced negative margin to prevent extreme overlap */
    position: relative !important;
    z-index: 5 !important;
}

.project-card__title {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    height: auto !important;
    color: var(--title-color) !important;
}

.project-card__description {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.25rem !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    height: auto !important;
    max-height: none !important;
    flex: 1 !important;
    color: var(--text-color) !important;
    opacity: 1 !important;
    /* Ensure text is fully visible */
}

.project-card__button {
    margin-top: auto !important;
    align-self: flex-start !important;
}

/* Fix section overlapping - Ensure enough space for the content boxes */
.projects.section {
    padding-bottom: 8rem !important;
    margin-bottom: 0 !important;
}

.value.section {
    padding-top: 5rem !important;
    /* Increase space above the Founder section */
}

.projects__container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    /* Space between cards on desktop */
}

/* Tablet responsive (2 columns) */
@media screen and (max-width: 1023px) and (min-width: 768px) {
    .projects__container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }

    .project-card__content {
        min-height: auto !important;
        padding: 1.5rem !important;
        margin-top: -25px !important;
    }

    .projects.section {
        padding-bottom: 6rem !important;
    }

    .value.section {
        padding-top: 4rem !important;
    }
}

/* Mobile responsive (1 column & Small Screens) */
@media screen and (max-width: 767px) {
    .projects__container {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
        /* Reduced from 5rem for better spacing */
    }

    .project-card__content {
        min-height: auto !important;
        padding: 1.25rem !important;
        margin-top: -20px !important;
    }

    .project-card__title {
        font-size: 1.1rem !important;
    }

    .project-card__description {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }

    .projects.section {
        padding-bottom: 6rem !important;
    }

    .value.section {
        padding-top: 3rem !important;
    }
}

/* ==================== NEWS SLIDER MOBILE & TABLET SWIPE & CONTROLS ==================== */
@media screen and (max-width: 1023px) {

    /* Hide the JS arrows and dots since we are using native swiping */
    .news-slider__arrow,
    .news-slider__arrow--left,
    .news-slider__arrow--right,
    .news-slider__dots,
    .news-slider__dot,
    body.rtl .news-slider__arrow,
    body.rtl .news-slider__arrow--left,
    body.rtl .news-slider__arrow--right,
    body[dir="rtl"] .news-slider__arrow,
    body[dir="rtl"] .news-slider__arrow--left,
    body[dir="rtl"] .news-slider__arrow--right {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Transform the container into a swipeable flex row */
    .news-slider__container {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        /* Hide scrollbar Firefox */
        gap: 1rem !important;
        scroll-behavior: smooth !important;
        padding-bottom: 5px !important;
    }

    .news-slider__container::-webkit-scrollbar {
        display: none !important;
        /* Hide scrollbar Chrome/Safari */
    }

    /* Force all slides to be visible, ignoring JS .active class on mobile */
    .news-slide,
    .news-slide.active {
        display: grid !important;
        grid-template-columns: 1fr !important;
        flex: 0 0 100% !important;
        /* Each slide takes exactly 100% of the screen width */
        min-width: 100% !important;
        scroll-snap-align: center !important;
        opacity: 1 !important;
        border-radius: 1.5rem !important;
        overflow: hidden !important;
        background: var(--container-color, #fff) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
        margin: 0 !important;
    }

    .news-slide__image {
        display: block !important;
        width: 100% !important;
        height: 220px !important;
        /* Forced height for mobile image */
        position: relative !important;
        overflow: hidden !important;
        order: 1 !important;
    }

    .news-slide__image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    .news-slide__content {
        padding: 1.5rem !important;
        order: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        text-align: left !important;
    }

    body.rtl .news-slide__content,
    body[dir="rtl"] .news-slide__content {
        text-align: right !important;
    }

    /* Fixed View All button in Arabic */
    body.rtl .news-slider__view-all,
    body[dir="rtl"] .news-slider__view-all {
        justify-content: flex-start !important;
    }
}

/* 15. Hero Image Aspect Ratio & Cut-off Overlap Fix */
.home__img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit !important;
    display: block !important;
}

@media screen and (min-width: 1024px) {
    .home__container {
        padding-bottom: 4rem !important; /* Ensure ample breathing room for absolute home__img */
    }
    
    .home__img {
        z-index: 5 !important; /* Keep it above next section backgrounds */
    }
}
