/*font-family: "Noto Sans Arabic", sans-serif; */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&family=Noto+Sans+Arabic:wght@100..900&family=Noto+Serif+TC:wght@200..900&display=swap');

@property --scroll-position {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
}

@property --scroll-position-delayed {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
}

* {
    -webkit-box-sizing: border-box;
    -o-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 20px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--mainWhite);
    border-radius: 20px;
}

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

::-webkit-scrollbar-track {
    background: var(--material8);
}

body {
    background-color: var(--material2);
    background-image: url("./../../3D\ models/coffee beans transparent.webp");
    background-size: 70%;
    background-position: top;
}

main {
    margin-top: 90px;
    direction: rtl;
}

header {
    position: fixed;
    z-index: 5;
    top: 5px;
    left: 5px;
    right: 5px;
    direction: ltr;
    animation-name: slideDown;
    animation-duration: 2100ms;
    transform: translateY(calc(5rem * var(--scrolling-up)));
}

nav {
    width: 100%;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    background-color: hsla(42, 31%, 87%, 0.6);
    border-radius: 50px;
    background-image: url("./../../Main\ page\ photos/wallpaper.png");
    background-blend-mode: overlay;
    background-position: center;
    background-repeat: repeat;
    backdrop-filter: blur(10px);
    box-shadow: var(--buttonShadow);
    border: 1px solid var(--material5);

    h1 {
        margin: 0;
        color: var(--material5);
        animation-name: slideDown;
        animation-duration: 2400ms;
    }

    a#logo {
        flex-basis: fit-content;
        clip-path: circle();
        animation-name: slidedown;
        animation-duration: 2000ms;
        animation-fill-mode: both;
        animation-name: slideDown;
        animation-duration: 2150ms;
    }

    a#logo img {
        width: max(3.25em);
        vertical-align: middle;
        background-color: var(--material1);
        border-radius: 50%;
    }

    .humburger {
        cursor: pointer;
        aspect-ratio: 1/1;
        width: 51.99px;
        background-color: var(--material1);
        border: none;
        border-radius: 50%;
        padding: calc(52px - 3.25em);
        display: none;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        position: relative;
        animation-name: slideDown;
        animation-duration: 2700ms;

        .bar {
            width: 25px;
            height: 4px;
            background-color: var(--material4);
            margin: 2px;
            border-radius: 0.2em;
        }
    }

    #menu-nav {
        position: relative;
        z-index: 2;
    }
}

.nav-buttons {
    animation-name: slideDown;
    animation-duration: 2700ms;
}

.nav-buttons,
.nav-buttons-small {
    list-style-type: none;
    margin: 0 0.5em 0 0;
    padding: 0.25em;
    border-radius: 20em;
    background-color: var(--material1);
    display: flex;
    flex-direction: row-reverse;
    gap: 20px;
    font-weight: 400;

    a {
        text-decoration: none;
        color: var(--text);
        padding: 0 10px;
        width: fit-content;
        height: fit-content;
        border-radius: 20em;
        transition: 200ms;
    }

    a:hover {
        background-color: #6f4e3761;
    }

    a:active {
        background-color: var(--material4);
        color: var(--mainWhite);
    }

    #menu {
        background-color: var(--material4);
        color: white;
        pointer-events: none;
    }
}

.nav-buttons-small {
    display: none;
    background-color: #c6a988a5;
    backdrop-filter: blur(10px);
    direction: rtl;
}

section.most-orderd {
    color: white;
    padding: 0.75vw 0;
    animation: mostOrderd-scrolling linear both;
    animation-timeline: scroll();
    animation-range: 0 80vh;

    h2 {
        margin: 0 1.5em;
        position: relative;
        animation: slideUp 1500ms 500ms both;
    }

    h2::before {
        content: '';
        width: 0.4em;
        height: 70%;
        position: absolute;
        top: 50%;
        transform: translate(0, -50%);
        right: -0.75em;
        background-color: var(--mainWhite);
    }

    .content {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: nowrap;
        overflow: auto;
        animation-name: slideUp;
        animation-duration: 2000ms;
        animation-delay: 500ms;
        animation-fill-mode: both;

        figure {
            flex: 0 0 clamp(150px, 10vw, 16em);
            background-color: var(--material1);
            border-radius: 15px;
            margin: 2em 1vw;
            padding: 0.5em;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            box-shadow: var(--buttonShadow);

            img {
                width: 100%;
                border-radius: 10px;
            }

            figcaption {
                font-weight: bold;
            }

            span {
                direction: ltr;
                margin-top: -5px;
                font-size: 0.875em;
            }

            span::after {
                content: " EGP";
            }
        }
    }
}


.menu {
    background-image: url("./../../Main\ page\ photos/wallpaper.png");
    background-color: var(--mainWhite);
    background-blend-mode: darken;
    background-position: center;
    background-repeat: repeat;
    box-shadow: 0 -2px 7px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
    border-radius: 15px 15px 0 0;
    animation-name: slideUp;
    animation-duration: 2500ms;
    animation-delay: 500ms;
    animation-fill-mode: both;

    h2 {
        background-color: var(--material1);
        color: white;
        padding: 0.75rem;
        margin: 0;
        position: relative;
        width: fit-content;
        right: 50%;
        transform: translateX(50%);
        border-radius: 20px 20px 0 0;

        span {
            background-color: var(--material3);
            border-radius: 10px;
            display: inline-block;
            padding: 0 0.5em;
            box-shadow: var(--buttonShadow);
        }
    }

    h2::before {
        content: '';
        height: 1.125em;
        width: 1.125em;
        position: absolute;
        bottom: 0;
        right: -1.125em;
        background-color: transparent;
        border-bottom-left-radius: 0.625em;
        box-shadow: -0.375em 0.375em 0 0 var(--material1);
    }

    h2::after {
        content: '';
        height: 1.125em;
        width: 1.125em;
        position: absolute;
        bottom: 0;
        left: -1.125em;
        background-color: transparent;
        border-bottom-right-radius: 0.625em;
        box-shadow: 0.375em 0.375em 0 0 var(--material1);
    }

    >div {
        width: fit-content;
        margin: 0 15%;
        padding-top: 10rem;

        .menu-content {
            background-color: var(--material1);
            border-radius: 20px;
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            grid-template-rows: auto;
            align-items: center;
            padding: 0.75em;
            gap: 1em;
        }

        figure {
            width: auto;
            background-color: var(--mainWhite);
            border-radius: 10px;
            padding: 0.5em;
            margin: 0;
            box-shadow: var(--buttonShadow);
            transition: 200ms;
            animation: menu-scrolling linear;
            animation-timeline: view(block);

            img {
                width: 100%;
                border-radius: 5px;
            }

            figcaption {
                font-weight: 600;
                margin-top: -7px;
            }
        }

        figure:hover {
            box-shadow: 0 2.5px 5px rgba(0, 0, 0, 0.4);
            scale: 1.03;
        }

        .drink-info {

            .price-info {
                direction: ltr;
                display: flex;
                justify-content: space-between;
                align-items: center;

                span {
                    margin-top: -1em;
                }

                .col1 {
                    display: flex;
                    flex-direction: column;
                    align-items: flex-end;
                    font-weight: 800;
                }

                .col2 {
                    flex: 2 1;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                }

                .col2 span::after {
                    content: " EGP";
                }
            }

            p {
                margin: 0.75em 0 0 0;
                line-height: 1.5;
            }
        }
    }

    #additions {
        width: 100%;
        margin: 0;

        .menu-content {
            background-color: var(--material7);
            grid-template-columns: auto;
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
            justify-content: flex-start;
            overflow: auto;
            margin: 0;
            border-radius: 0;
            padding: 2em 1em;

            figure {
                flex: 0 0 clamp(150px, 10vw, 16em);
                margin: 0 1vw;
            }
        }

        h2 {

            background-color: var(--material7);
        }

        h2 span {
            background-color: var(--material2);
        }

        h2::before {
            box-shadow: -0.375em 0.375em var(--material7);
        }

        h2::after {
            box-shadow: 0.375em 0.375em var(--material7);
        }
    }
}

.fast-scroll {
    position: fixed;
    z-index: 5;
    bottom: 0;

    #fast-scroll-button {
        border: none;
        border-radius: 50%;
        aspect-ratio: 1/1;
        width: 4rem;
        background-color: var(--material6-orange);
        color: white;
        margin-bottom: clamp(1.25em, 2vw, 2vw);
        margin-right: clamp(1.25em, 2vw, 2vw);
        box-shadow: var(--buttonShadow);
        transition: 100ms;
        animation-name: slideLeft;
        animation-duration: 2100ms;
    }

    #fast-scroll-button:hover {
        opacity: 0.8;
    }

    .fast-scroll-links {
        visibility: hidden;
        display: flex;
        justify-content: space-evenly;
        flex-wrap: wrap;
        gap: 0.5em;
        background-color: var(--material6-orange);
        border-radius: 10px 10px 0 0;
        padding: 0.5em;
        box-shadow: 0 -2px 7px rgba(0, 0, 0, 0.2);

        a {
            text-decoration: none;
            color: white;
            background-color: hsl(36, 68%, 60%);
            flex: 1 1 auto;
            min-width: 80px;
            text-align: center;
            font-weight: 500;
            padding: 10px;
            border-radius: 5px;
            transition: 100ms;
        }
    }

    a:hover {
        transform: scale(1.0625);
        box-shadow: var(--buttonShadow);
    }

    a:active {
        transform: scale(1);
    }
}

footer {
    background-color: var(--material7);
    color: white;
    padding: 1em;
    font-family: "Lexend", serif;
    position: relative;
    z-index: 2;
    padding-top: 7em;
    animation: footer linear both;
    animation-timeline: view;
    animation-range: entry;
}

footer a:hover {
    color: rgba(255, 255, 255, 0.31);
}

.top-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-content: space-between;
    flex-wrap: wrap;
    width: 95%;
    margin-left: auto;
}

.bottom-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    align-content: flex-start;
    flex-wrap: wrap;
}

.bottom-footer .links {
    display: flex;
    width: 100%;
    justify-content: center;
}

.bottom-footer a {
    margin: 0 1%;
    color: white;
}

.bottom-footer p {
    margin: 5px 0 10px;
    font-weight: 50;
    font-size: 0.65rem;
}

.logo-footer {
    color: white;
    font-weight: 900;
    font-size: 2rem;
    flex: 2 70px;
    position: relative;
    text-wrap: nowrap;
    line-height: 0.8;
    letter-spacing: 0;
}

.footer-fast-links {
    flex: 0.5 1 auto;
}

.top-footer a {
    color: white;
    text-transform: uppercase;
    font-size: 0.65rem;
}

footer hr {
    width: 85%;
    margin-top: 1.75em;
    margin-bottom: 1em;
}

@media (prefers-reduced-motion:no-preference) {

    @keyframes scroll-velocity {
        from {
            --scroll-position: 0;
            --scroll-position-delayed: 0;
        }

        to {
            --scroll-position: 1;
            --scroll-position-delayed: 1;
        }
    }

    @keyframes mostOrderd-scrolling {
        to {
            transform: translateY(calc(50% + (20rem * var(--scrolling-down))));
            scale: 0.9;
            opacity: 0.3;
        }
    }

    @keyframes menu-scrolling {
        entry 0% {
            transform: translateY(20px) scale(0.9);
            opacity: 0.4;
        }

        entry 100% {
            transform: translateY(0);
            opacity: 1;
        }

        exit 0% {
            transform: scale(1) translateY(0);
            opacity: 1;
        }

        exit 100% {
            transform: translateY(-20px) scale(0.9);
            opacity: 0.4;
        }
    }

    @keyframes slideDown {
        0% {
            transform: translateY(-100px);
        }
    }

    @keyframes slideLeft {
        0% {
            transform: translateX(150px);
        }
    }

    @keyframes slideUp {
        0% {
            transform: translateY(100px);
            opacity: 0;
        }
    }
}

@media (max-width:1500px) {
    .menu div.menu-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width:900px) {
    .menu div {
        margin-left: 5%;
        margin-right: 5%;
    }

    .menu div.menu-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width:800px) {
    .menu {
        h2 {
            font-size: 20px;
        }

        h2::before {
            width: 18px;
            right: -18px;
        }

        h2::after {
            width: 18px;
            left: -18px;
        }
    }
}

@media (max-width:700px) {

    a:focus,
    button:focus {
        outline: 1.5px solid var(--material5);
        -webkit-tap-highlight-color: transparent;
    }

    .nav-buttons {
        display: none;
    }

    nav .humburger {
        display: flex;
    }

    .nav-buttons-small {
        /*JavaScript issue*/
        visibility: hidden;
        display: flex;
        justify-content: flex-end;
        flex-direction: column;
        border-radius: 0 0 10px 10px;
        box-shadow: var(--buttonShadow);
        position: absolute;
        z-index: 1;
        top: 20px;
        right: 0;
        width: 200px;
        height: 200px;

        a {
            border-radius: 5px;
            width: 100%;
            font-weight: 450;
        }
    }

    .menu {
        div.menu-content {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    .fast-scroll {
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.89125em;
        gap: 2px;
        width: 95%;
    }

    .logo-footer {
        flex: 2 1 100%;
        margin-bottom: 20px;
    }
}

@media (max-width:540px) {
    .menu div.menu-content {
        margin-left: 0;
        margin-right: 0;
    }

    .menu {

        >div {
            margin-left: 20px;
            margin-right: 20px;
        }

        figure .price-info {
            padding: 0;
            width: 100%;
            flex-wrap: nowrap;
            text-wrap: nowrap;
        }

    }

}