/* --- 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%;
}

.home__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem;
}

.typing-text {
    color: var(--title-color);
}

@media screen and (max-width: 768px) {
    #prime-coler {
        font-size: 2.5rem;
        /* Smoother scaling on mobile */
        margin-bottom: -0.5rem !important;
    }

    .home__title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        line-height: 1.0 !important;
    }

    .typing-text {
        display: block;
        margin-top: -0.8rem !important;
        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 */
    margin-top: 2rem;
}

/* 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 */
#nav-menu.show-menu {
    opacity: 1 !important;
    visibility: visible !important;
    top: 0 !important;
    display: block !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    /*  position: fixed !important;*/
    height: auto !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding-top: 2rem !important;
    background: var(--body-color) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    width: 90% !important;
    border-radius: 0 0 1rem 1rem !important;
}

.dark-theme #nav-menu.show-menu {
    background: var(--body-color) !important;
}

/* 10. Hide Hamburger on Desktop */
@media screen and (min-width: 1024px) {
    .nav__toggle {
        display: 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 */
@media screen and (max-width: 1023px) {
    .nav__toggle {
        transition: all 0.3s ease !important;
    }

    .nav__toggle:hover {
        background: rgba(239, 193, 169, 0.1) !important;
    }

    .nav__toggle span {
        background: var(--text-color) !important;
        transition: background 0.3s ease !important;
    }

    .dark-theme .nav__toggle {
        border-color: rgba(239, 193, 169, 0.5) !important;
    }

    .dark-theme .nav__toggle:hover {
        background: rgba(239, 193, 169, 0.15) !important;
    }

    .dark-theme .nav__toggle span {
        background: var(--text-color) !important;
    }

    .nav__toggle:active {
        transform: scale(0.95) !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 Centering Fixes */
    .footer {
        padding: 3rem 0 1rem !important;
        text-align: center !important;
    }

    .footer__container {
        grid-template-columns: 1fr !important;
        row-gap: 2.5rem !important;
    }

    .footer__content {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .footer__logo,
    .footer__title,
    .footer__description,
    .footer__link {
        text-align: center !important;
        justify-content: center !important;
        display: block !important;
    }

    .footer__social {
        justify-content: center !important;
        margin-top: 1rem !important;
    }

    .footer__info {
        justify-content: center !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        text-align: center !important;
    }
}

/* End of Mobile & Tablet Unified Fixes */

/* 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 */
}

/* Mobile & Tablet: 1 column & Small Screens Specific */
@media screen and (max-width: 1023px) {
    .projects__container {
        grid-template-columns: 1fr !important;
        gap: 5rem !important;
        /* Substantial space between cards on mobile */
    }

    .project-card__content {
        min-height: auto !important;
        padding: 1.25rem !important;
        margin-top: -20px !important;
        /* Even smaller negative margin on mobile */
    }

    .project-card__title {
        font-size: 1.1rem !important;
        /* Maintain readable size */
    }

    .project-card__description {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }

    .projects.section {
        padding-bottom: 10rem !important;
        /* Even more space on small screens */
    }

    .value.section {
        padding-top: 4rem !important;
    }
}