/*=============== FONT ================*/
@font-face {
    font-family: "IBM Plex";
    src: url("../fonts/IBMPlexSans-VariableFont_wdth\,wght.woff2") format("woff2");
    font-weight: 300 900;
    font-style: normal;
}


/*=============== ANIMATION ================*/
@keyframes pinBounce {

    0%,
    100% {
        transform: translate(-50%, -50%);
    }

    50% {
        transform: translate(-50%, calc(-50% + 3px));
    }
}

@keyframes maquree {
    to {
        offset-distance: 100%
    }
}

/*=============== VARIABLES CSS ===============*/
:root {

    /*========== Colors ==========*/
    --red: #ED1B24;
    --red-hover: #E63329;
    --blue: #005BAA;
    --blue-hover: #1B4B8C;
    --orang: #F5A623;
    --orang-hover: #E89102;
    --headings: #111827;
    --text: #1F2937;
    --subtext: #6B7280;
    --white: #FFFFFF;



    /*========== Font and typography ==========*/
    --body-font: "IBM Plex", sans-serif;


    /*========== Font weight ==========*/
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;

    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
}

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

input,
button {
    outline: none;
    border: none;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

body {
    position: relative;
    font-family: var(--body-font);
    overflow-x: hidden;
}

.btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
    width: 0.6rem;
    background-color: rgba(232, 234, 235, 0.364);
    border-radius: 0.2rem;
}

::-webkit-scrollbar-thumb {
    background-color: #9fa1a597;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue);
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
    max-width: 1350px;
    margin: 0 auto;
}

.section {
    padding-block: 5rem 3rem;
    padding-inline: 3rem;
}


/*=============== HEADER & NAV ===============*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: var(--z-fixed);

    .subheader {
        position: relative;
        width: 100%;
        height: 42px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--blue-hover);
        padding-inline: 0 45px;

        .right {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            height: 42px;
            padding-inline: 20px;
            border-radius: 40px 0 0 40px;
            background-color: var(--red-hover);

            a {
                font-size: 18px;
                padding: 5px;
                border-radius: 50%;
                font-weight: var(--font-medium);
                color: white;
                background-color: #4D4D4D33;
                transition: color 0.3s ease-in-out;

                &:hover {
                    color: var(--red-hover);
                }
            }

            .line {
                margin: 0 5px;
                width: 1px;
                height: 10px;
                background-color: #FFFFFF66;
            }

            .span {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 10px;
                color: var(--white);
                font-size: 12px;
                font-weight: var(--font-medium);

                i {
                    font-size: 18px;
                }
            }
        }

        .left {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;

            .info-toggle {
                display: none;
            }
			
			.info-dropdown {
                display: flex;
                align-items: center;
                gap: 20px;
            }

            a {
                position: relative;
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 8px;
                font-size: 12px;
                font-weight: var(--font-medium);
                color: var(--white);
                transition: color 0.3s ease-in-out;

                &:hover {
                    color: var(--red-hover);
                }
            }

            .line {
                width: 1px;
                height: 10px;
                background-color: #FFFFFF66;
            }
        }

    }

    .nav {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #F7F7F7;
        padding-inline: 82.5px;
        border: 1px solid #E4E4E4;

        .logo {
            width: 144px;
            height: 83px;

            img {
                width: 100%;
                height: 100%;
            }
        }

        .nav__menu {
            display: flex;
            justify-content: center;
            align-items: center;

            .nav__menu__logo {
                display: none;
            }

            .nav__list {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 32px;

                .nav__link {
                    position: relative;
                    font-size: 16px;
                    font-weight: var(--font-medium);
                    color: var(--text);
                    transition: color 0.3s ease;

                    &::after {
                        content: '';
                        position: absolute;
                        bottom: -5px;
                        left: 0;
                        width: 100%;
                        height: 2px;
                        background-color: var(--red-hover);

                        /* البداية مخفي */
                        transform: scaleX(0);
                        transform-origin: left;
                        /* يبدأ من اليمين */
                        transition: transform 0.3s ease;
                    }

                    &:hover {
                        color: var(--red-hover);

                        &::after {
                            transform: scaleX(1);
                            /* يتمدد */
                            transform-origin: right;
                            /* يكمل لحد الشمال */
                        }
                    }

                    &.active-link {
                        color: var(--red-hover);
                        font-weight: var(--font-bold);

                        &::after {
                            transform: scaleX(1);
                            transform-origin: left;
                        }
                    }


                }

                .nav__dropdown {
                    position: relative;

                    &:hover .dropdown {
                        opacity: 1;
                        visibility: visible;
                        transform: translateY(0);
                    }
                }

                .dropdown {
                    position: absolute;
                    top: calc(100% + 10px);
                    left: 0;

                    min-width: 200px;
                    background: #fff;
                    border-radius: 10px;
                    box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.1);

                    padding: 10px 0;

                    opacity: 0;
                    visibility: hidden;
                    transform: translateY(10px);
                    transition: all 0.25s ease;

                    z-index: 999;

                    li {
                        list-style: none;
                    }

                    a {
                        display: block;
                        padding: 10px 15px;

                        font-size: 14px;
                        color: #6B7280;
                        text-decoration: none;

                        transition: 0.2s;

                        &:hover {
                            background: #f9f9f9;
                            color: var(--orange);
                        }
                    }
                }

            }
        }

        .btns {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 31px;

            .btn {
                gap: 8px;
                padding: 8.5px 10px 8.5px 21px;
                background-color: var(--red);
                color: var(--white);
                border-radius: 999px;
                font-size: 16px;
                font-weight: var(--font-bold);
                transition: all 0.3s ease-in-out;

                .arrow {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    width: 26px;
                    height: 26px;
                    background-color: var(--text);
                    border-radius: 50%;
                    padding: 5px;
                    font-size: 12px;
                }

                &:hover {
                    background-color: var(--red-hover);
                }
            }

            .language-dropdown {
                position: relative;
                width: fit-content;
            }

            /* ================= TOGGLE ================= */

            .language-dropdown__toggle {
                width: 100%;

                display: flex;
                align-items: center;
                justify-content: space-between;

                gap: 10px;

                padding: 8px 10px;

                background: transparent;
                border: 1px solid transparent;
                border-radius: 6px;

                color: var(--text);

                font-family: inherit;
                font-size: 18px;
                font-weight: var(--font-regular);

                cursor: pointer;

                transition: all 0.3s ease;
				
				span{
					margin-bottom: 8px;
				}
            }

            .language-dropdown__toggle i {
                font-size: 11px;

                transition: transform 0.3s ease;
            }

            /* Hover */

            .language-dropdown__toggle:hover {
                color: var(--red);
                background-color: rgba(170, 0, 0, 0.05);
            }

            /* ================= MENU ================= */

            .language-dropdown__menu {
                position: absolute;

                top: calc(100% + 6px);
                left: 0;

                width: 100%;

                padding: 5px;

                background-color: var(--white);

                border: 1px solid #E5E7EB;
                border-radius: 8px;

                box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);

                opacity: 0;
                visibility: hidden;

                transform: translateY(-8px);

                transition:
                    opacity 0.2s ease,
                    transform 0.2s ease,
                    visibility 0.2s ease;

                z-index: 1000;
            }

            /* ================= OPEN ================= */

            .language-dropdown.active .language-dropdown__menu {
                opacity: 1;
                visibility: visible;

                transform: translateY(0);
            }

            .language-dropdown.active .language-dropdown__toggle i {
                transform: rotate(180deg);
            }

            /* ================= OPTIONS ================= */

            .language-dropdown__option {
                width: 100%;

                display: block;

                padding: 9px 10px;

                background: transparent;
                border: none;
                border-radius: 5px;

                color: var(--text);

                font-family: inherit;
                font-size: 16px;
                text-align: left;

                cursor: pointer;

                transition: all 0.2s ease;
            }

            .language-dropdown__option:hover {
                background-color: rgba(170, 0, 0, 0.08);
                color: var(--red);
            }

            .language-dropdown__option.active {
                background-color: rgba(170, 0, 0, 0.08);
                color: var(--red);
                font-weight: 500;
            }
        }

        /* زرار المنيو */
        .nav__toggle {
            display: none;
            justify-content: center;
            align-items: center;
            gap: 6px;
            color: #6B7280;
            font-weight: var(--font-medium);
            font-size: 18px;
            cursor: pointer;
            z-index: 900;
        }

        /* زرار القفل */
        .nav__close {
            display: none;
            font-size: 24px;
            cursor: pointer;
        }

        .btns__mobile {
            display: none;
        }
    }
}


/*=============== FOOTER ===============*/
.footer {
    background-color: var(--headings);

    .footer__container {

        .footer__content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 125px;
            padding-inline: 120px;
            padding-block: 61px;

            .group__logo {
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;

                img {
                    width: 300px;
                    height: 160px;
                }

                span {
                    font-size: 20px;
                    font-weight: var(--font-medium);
                    color: var(--white);
                }

            }

            .group__links {
                display: flex;
                justify-content: center;
                align-items: flex-start;
                flex-direction: column;
                gap: 14px;

                p {
                    font-size: 20px;
                    font-weight: var(--font-regular);
                    color: var(--subtext);
                }

                ul {

                    display: flex;
                    justify-content: center;
                    align-items: flex-start;
                    flex-direction: column;
                    gap: 10px;

                    li,
                    a {
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        gap: 8px;
                        font-size: 16px;
                        font-weight: var(--font-regular);
                        color: var(--white);
                        transition: color 0.3s ease-in-out;

                        i {
                            font-size: 18px;
                            color: var(--orang);
                        }
                    }

                    a:hover {
                        color: var(--orang);
                    }
                }

                .contact__links {
                    li {
                        a {
                            font-weight: var(--font-medium);
                        }
                    }
                }
            }
        }

        .copyright {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-block: 15px;
            padding-inline: 95.5px;
            border-top: 2px solid var(--text);

            p {
                font-size: 14px;
                font-weight: var(--font-regular);
                color: #455B79;
            }

            span {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 11px;
                font-size: 14px;
                font-weight: var(--font-regular);
                color: var(--subtext);

                a {
                    width: 144px;
                    height: 13.5px;

                    img {
                        width: 100%;
                        height: 100%;
                    }
                }
            }

            .social {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 15px;

                a {
                    font-size: 20px;
                    color: var(--white);
                    transition: color 0.3s ease-in-out;

                    &:hover {
                        color: var(--orang);
                    }
                }
            }
        }
    }
}



/*=============== RESPONSIVE ===============*/
@media (max-width: 1200px) {

    /*=============== HEADER & NAV ===============*/
    .header {
        .nav {
            padding-inline: 40px;

            .nav__menu {
                .nav__list {
                    gap: 20px;
                }
            }

            .btns {
                gap: 15px;

                .btn {
                    padding: 8px 16px;
                    font-size: 14px;
                }
            }
        }
    }

    /*=============== FOOTER ===============*/
    .footer {
        .footer__container {
            .footer__content {
                gap: 60px;
                padding-inline: 40px;

                .group__logo {
                    img {
                        width: 240px;
                        height: 128px;
                    }

                    span {
                        font-size: 16px;
                    }
                }

                .group__links {
                    p {
                        font-size: 18px;
                    }

                    ul li,
                    ul a {
                        font-size: 15px;
                    }
                }
            }

            .copyright {
                padding-inline: 40px;
            }
        }
    }
}

@media (max-width: 991px) {

    /*=============== HEADER & NAV ===============*/
    .header {
        .subheader {
            height: 42px;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            padding-inline: 0 20px;

            .right {
                height: 42px;
                background-color: var(--red-hover);
                padding-inline: 20px;
                border-radius: 40px 0 0 40px;
                flex-wrap: nowrap;
                justify-content: center;
                gap: 10px;

                .span {
                    font-size: 11px;

                    i {
                        font-size: 14px;
                    }
                }

                a {
                    font-size: 11px;
                }
            }

            .left {
                gap: 10px;

                a {
                    font-size: 11px;
                }

                .line {
                    display: block;
                }

                .info-toggle {
                    display: none;
                }
            }
        }

        .nav {
            padding-inline: 30px;
            padding-block: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 83px;

            .logo {
                display: block;
                width: 144px;
                height: 83px;
            }

            .nav__toggle {
                display: none;
            }

            .nav__menu {
                display: flex;
                position: static;
                opacity: 1;
                visibility: visible;
                transform: none;
                box-shadow: none;
                padding: 0;
                min-width: auto;
                background-color: transparent;
                border: none;
                width: auto;
                z-index: auto;
                height: auto;
                border-radius: 0;

                .nav__close {
                    display: none;
                }

                .nav__menu__logo {
                    display: none;
                }

                .nav__list {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    gap: 24px;
                    width: auto;

                    .nav__link {
                        font-size: 16px;

                        &::after {
                            display: block;
                        }
                    }
                }

                .btns__mobile {
                    display: none !important;
                }
            }

            /* Hide desktop buttons except dropdown in header on mobile/tablet */
            .btns:not(.btns__mobile) {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 15px;

                .btn {
                    display: flex;
                    padding: 8px 16px;
                    font-size: 14px;
                }
            }
        }
    }

    /*=============== FOOTER ===============*/
    .footer {
        .footer__container {
            .footer__content {
                gap: 40px;

                .group__logo {
                    grid-column: span 2;
                    align-items: center;
                    text-align: center;
                    margin-bottom: 20px;

                    img {
                        width: 260px;
                        height: 138px;
                    }
                }
            }

            .copyright {
                gap: 20px;
                text-align: center;
            }
        }
    }
}

@media (max-width: 768px) {

    /*=============== HEADER & NAV ===============*/
    .header {
        .subheader {
            height: 32px;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            padding-inline: 0 20px;

            .right {
                height: 32px;
                padding-inline: 10px;
                border-radius: 40px 0 0 40px;
                gap: 5px;

                .span {
                    font-size: 10px;

                    i {
                        font-size: 14px;
                    }
                }

                a {
                    display: none;
                }
            }

            .left {
                gap: 7px;

                a {
                    font-size: 10px;
                }

                .line {
                    display: block;
                }
            }
        }

        .nav {
            padding-inline: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 70px;
            position: relative;

            .logo {
                display: block;
                width: 120px;
                height: 70px;
                order: 1;
                /* Aligned far right in RTL */
            }

            .nav__toggle {
                display: flex;
                order: 2;
                /* Positioned to the left of Logo */
                font-size: 28px;
                color: var(--subtext);
                cursor: pointer;
                align-items: center;
                margin-inline-start: 200px;
            }

            .nav__menu {
                position: fixed;
                top: 115px;
                left: 45%;
                min-width: 240px;
                background-color: #FAFCFF;
                border: 1px solid #F3F4F6E5;
                box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
                border-radius: 16px;
                flex-direction: column;
                justify-content: flex-start;
                align-items: center;
                padding: 40px 24px 30px 24px;
                transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
                z-index: 999;
                opacity: 0;
                visibility: hidden;
                transform: translateY(10px);
                border-radius: 16px;
                height: auto;
                width: auto;

                .nav__close {
                    position: absolute;
                    top: 14px;
                    right: 14px;
                    width: 30px;
                    height: 30px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    border: 0.5px solid #FFA769A6;
                    border-radius: 50%;
                    background-color: var(--orang);
                    box-shadow: 1.5px 2px 0px #FFA769A6;
                    color: white;
                    font-size: 16px;
                    cursor: pointer;
                }

                .nav__menu__logo {
                    display: none;
                    /* Hide logo inside the menu wrapper */
                }

                .nav__list {
                    flex-direction: column;
                    align-items: center;
                    gap: 17px;
                    width: 100%;

                    .nav__link {
                        font-size: 20px;

                        &::after {
                            display: none;
                        }
                    }
                }

                .btns__mobile {
                    display: none !important;
                    width: 100%;
                    margin-top: 30px;

                    .btn {
                        width: 100%;
                        padding: 10px 15px;
                        font-size: 14px;
                        display: flex !important;
                        justify-content: center;
                        align-items: center;
                    }
                }
            }

            .nav__menu.show-menu {
                opacity: 1;
                visibility: visible;
                transform: translateY(0);
            }

            .btns:not(.btns__mobile) {
                display: flex;
                order: 3;
                /* Aligned to the left of the bar */
                gap: 15px;
                align-items: center;

                .btn {
                    display: flex;
                    padding: 8px 16px;
                    font-size: 14px;
                }
            }
        }
    }

    /*=============== FOOTER ===============*/
    .footer {
        .footer__container {
            .footer__content {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                text-align: right;
                gap: 30px;

                .group__logo {
                    grid-column: span 3;
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    align-items: center;
                    text-align: center;
                }

                .group__links {
                    align-items: flex-start;

                    ul {
                        align-items: flex-start;
                    }
                }
            }

            .copyright {
                position: relative;
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                flex-wrap: wrap;
                margin-top: 90px;

                p {
                    font-size: 13px;
                    order: 1;
                }

                span {
                    position: absolute;
                    font-size: 13px;
                    top: -45px;
                    left: 50%;
                    transform: translateX(-50%);
                    width: 100%;
                    order: -1;
                    text-align: center;

                    a {
                        width: 120px;
                    }
                }

                .social {
                    order: 2;
                }
            }
        }
    }
}

@media (max-width: 576px) {

    /*=============== HEADER & NAV ===============*/
    .header {
        top: 0;

         .subheader {
            padding-inline: 0 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            overflow: visible;

            .right {


                a,
                .line {
                    display: none;
                }

                .span {
                    color: var(--white);
                    font-size: 11px;
                }
            }

            .left {
                position: relative;

                .info-dropdown {
                    display: none;
                }

                .info-toggle {
                    display: flex;
                    color: var(--white);
                    font-size: 12px;
                    font-weight: var(--font-medium);
                    cursor: pointer;
                    align-items: center;
                    gap: 4px;

                    i {
                        font-size: 10px;
                        transition: transform 0.3s ease;
                    }
                }
            }
        }

        /* Expanded Subheader showing addresses/contacts */
        .subheader.show-info {
            .left {
                .info-toggle {
                    i.fa-chevron-left, i.fa-chevron-right {
                        transform: rotate(-90deg);
                    }
                }

                .info-dropdown {
                    display: flex !important;
                    flex-direction: column;
                    align-items: flex-start;
                    gap: 10px;
                    position: absolute;
                    top: calc(100% + 10px);
                    left: 0;
                    background-color: var(--blue-hover);
                    border-radius: 10px;
                    padding: 12px 15px;
                    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
                    z-index: 1000;
                    border: 1px solid rgba(255, 255, 255, 0.1);
                    width: max-content;
                    max-width: 300px;

                    a {
                        display: flex !important;
                        font-size: 11px;
                        text-align: right;
                        color: var(--white) !important;
                        gap: 8px;
                        align-items: center;
                        white-space: normal;
                        line-height: 1.4;
                    }

                    .line {
                        display: block !important;
                        width: 100%;
                        height: 1px;
                        background-color: rgba(255, 255, 255, 0.15);
                        margin: 4px 0;
                    }
                }
            }
        }

        .nav {
            padding-inline: 15px;
            height: 65px;

            .logo {
                width: 100px;
                height: 60px;
            }

            .nav__toggle {
                font-size: 24px;
                margin-inline-start: 100px;
            }

            .nav__menu {
                left: 15%;
                width: 75%;

                .btns__mobile {
                    display: flex !important;
                }
            }

            .btns:not(.btns__mobile) {
                gap: 0;

                .btn {
                    display: none !important;
                }
            }
        }
    }

    /*=============== FOOTER ===============*/
    .footer {
        .footer__container {
            .footer__content {
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
                gap: 40px;
                padding-inline: 20px;

                .group__logo {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    text-align: center;
                    order: 1;

                    img {
                        width: 220px;
                        height: auto;
                    }
                }

                .group__links {
                    align-items: center;
                    text-align: center;

                    ul {
                        align-items: center;
                        text-align: center;
						gap: 13px;
                    }

                    &:nth-child(3) {
                        /* روابط تهمك */
                        order: 2;
                    }

                    &:nth-child(2) {
                        /* خدمات الراشيدين */
                        order: 3;
                    }

                    &:nth-child(4) {
                        /* تواصل معنا */
                        order: 4;
                    }
                }
            }

            .copyright {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 15px;
                text-align: center;
                margin-top: 55px;

                p {
                    font-size: 13px;
                    order: 2;
                    position: absolute;
                    top: -50px;
                    left: 45%;
                    transform: translateX(-50%);
                    width: 100%;
                }

                span {
                    font-size: 13px;
                    order: 3;
                    /* Four Software link at very bottom */
                    text-align: center;
                    position: static;
                    top: auto;
                    left: auto;
                    transform: none;

                    a {
                        width: 120px;
                    }
                }

                .social {
                    position: absolute;
                    top: -100px;
                    left: 45%;
                    transform: translateX(-50%);
                    order: 1;
                    /* Social icons on top */
                    display: flex;
                    gap: 15px;
                }
            }
        }
    }
}