@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   Variables
   All custom properties are scoped to .ordine-page so this stylesheet never
   leaks tokens into the rest of the site (which has its own theme).
   ========================================================================== */
.ordine-page {
    --qrcod-yellow: #FDC71A;
    --qrcod-gold: #F5A524;
    --qrcod-orange: #FF9118;
    --qrcod-brown: #4F3D36;
    --qrcod-background: #FFFCF8;
    --qrcod-light-orange: #FFF5E7;
    --qrcod-border: #F1E4D8;
    --qrcod-text: #4F3D36;
    --qrcod-muted: #746964;
    --qrcod-white: #FFFFFF;

    --ordine-max-width: 1180px;
    --ordine-shadow-soft: 0 24px 48px -26px rgba(79, 61, 54, 0.4);
    --ordine-shadow-card: 0 10px 30px -18px rgba(79, 61, 54, 0.25);
    --ordine-transition: 180ms ease;
}

/* ==========================================================================
   Page
   ========================================================================== */
.ordine-page {
    background: var(--qrcod-background);
    color: var(--qrcod-text);
    font-family: "Poppins", "29LT Bukra", Arial, sans-serif;
    overflow-x: hidden;
}

.ordine-page *,
.ordine-page *::before,
.ordine-page *::after {
    box-sizing: border-box;
}

.ordine-page h1,
.ordine-page h2,
.ordine-page h3 {
    color: var(--qrcod-brown);
    font-weight: 700;
    margin: 0;
}

.ordine-page p {
    color: var(--qrcod-muted);
    line-height: 1.65;
    margin: 0;
}

.ordine-page a {
    text-decoration: none;
}

.ordine-page img {
    max-width: 100%;
    display: block;
}

.ordine-page a:focus-visible,
.ordine-page button:focus-visible {
    outline: 2px solid var(--qrcod-orange);
    outline-offset: 3px;
    border-radius: 6px;
}

.ordine-container {
    max-width: var(--ordine-max-width);
    margin-inline: auto;
    padding-inline: 24px;
}

.ordine-section-title {
    font-size: clamp(28px, 3vw, 36px);
    margin-bottom: 32px;
}

/* Shared buttons (used in intro + CTA) */
.ordine-btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.ordine-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    transition: transform var(--ordine-transition), box-shadow var(--ordine-transition), background var(--ordine-transition);
}

.ordine-btn--primary {
    background: linear-gradient(135deg, var(--qrcod-yellow), var(--qrcod-orange));
    color: var(--qrcod-white);
    box-shadow: 0 12px 24px -10px rgba(255, 145, 24, 0.55);
    border: 1.5px solid transparent;
}

.ordine-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -10px rgba(255, 145, 24, 0.6);
}

.ordine-btn--secondary {
    background: var(--qrcod-white);
    color: var(--qrcod-orange);
    border: 1.5px solid var(--qrcod-orange);
}

.ordine-btn--secondary:hover {
    background: var(--qrcod-light-orange);
    transform: translateY(-2px);
}

.ordine-btn__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.ordine-btn--secondary .ordine-btn__icon {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Intro
   ========================================================================== */
.ordine-intro {
    padding: 70px 0 45px;
}

.ordine-intro__grid {
    display: flex;
    align-items: center;
    gap: 48px;
}

.ordine-intro__content {
    flex: 0 0 45%;
    max-width: 45%;
}

.ordine-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    margin-bottom: 24px;
    background: var(--qrcod-white);
    border: 1.5px solid var(--qrcod-orange);
    border-radius: 999px;
    color: var(--qrcod-orange);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ordine-intro__title {
    font-size: clamp(44px, 5vw, 72px);
    line-height: 1.05;
    font-weight: 700;
    margin-bottom: 20px;
}

.ordine-intro__title-brown,
.ordine-intro__title-orange {
    display: block;
}

.ordine-intro__title-brown {
    color: var(--qrcod-brown);
}

.ordine-intro__title-orange {
    color: var(--qrcod-orange);
}

.ordine-intro__desc {
    max-width: 500px;
    font-size: 17px;
    margin-bottom: 32px;
}

/* ==========================================================================
   Screenshot composition
   ========================================================================== */
.ordine-intro__visual {
    flex: 0 0 55%;
    max-width: 55%;
    position: relative;
    min-height: 560px;
}

.ordine-intro__dots {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background-image: radial-gradient(var(--qrcod-orange) 1.4px, transparent 1.6px);
    background-size: 12px 12px;
    opacity: 0.35;
    z-index: 0;
}

.ordine-screens {
    position: relative;
    min-height: 560px;
    z-index: 1;
}

.ordine-screen {
    position: absolute;
    top: 50%;
    width: 265px;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    border: 6px solid var(--qrcod-white);
    background: var(--qrcod-white);
    box-shadow: var(--ordine-shadow-card);
    object-fit: cover;
    object-position: top center;
    transform: translateY(-50%);
}

.ordine-screen--back-left {
    left: 0;
    z-index: 1;
}

.ordine-screen--back-right {
    right: 0;
    z-index: 2;
}

.ordine-screen--front {
    left: 50%;
    width: 345px;
    border-radius: 22px;
    box-shadow: var(--ordine-shadow-soft);
    transform: translate(-50%, -54%);
    z-index: 3;
}

/* ==========================================================================
   Highlights
   ========================================================================== */
.ordine-highlights {
    padding: 0 0 90px;
}

.ordine-highlights__card {
    display: flex;
    background: var(--qrcod-white);
    border: 1px solid var(--qrcod-border);
    border-radius: 18px;
    box-shadow: var(--ordine-shadow-card);
    min-height: 120px;
}

.ordine-highlight {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 28px;
    position: relative;
}

.ordine-highlight + .ordine-highlight::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: var(--qrcod-border);
}

.ordine-highlight__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--qrcod-light-orange);
    color: var(--qrcod-orange);
}

.ordine-highlight__icon svg {
    width: 22px;
    height: 22px;
}

.ordine-highlight__text h3 {
    font-size: 15px;
    margin-bottom: 4px;
}

.ordine-highlight__text p {
    font-size: 13px;
}

/* ==========================================================================
   Ordering modes
   ========================================================================== */
.ordine-modes {
    padding: 0 0 90px;
}

/* Tab bar — mirrors the Delivery / Pickup / Car Pickup segmented control
   already shown inside the app screenshots themselves. */
.ordine-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.ordine-mode-tab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 24px;
    border-radius: 14px;
    border: 1.5px solid var(--qrcod-orange);
    background: var(--qrcod-white);
    color: var(--qrcod-orange);
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background var(--ordine-transition), color var(--ordine-transition), box-shadow var(--ordine-transition), transform var(--ordine-transition);
}

.ordine-mode-tab svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ordine-mode-tab:hover {
    background: var(--qrcod-light-orange);
}

.ordine-mode-tab.is-active {
    background: linear-gradient(135deg, var(--qrcod-yellow), var(--qrcod-orange));
    border-color: transparent;
    color: var(--qrcod-white);
    box-shadow: 0 12px 24px -12px rgba(255, 145, 24, 0.55);
}

.ordine-mode-tab.is-active:hover {
    background: linear-gradient(135deg, var(--qrcod-yellow), var(--qrcod-orange));
}

.ordine-mode-panels {
    position: relative;
}

.ordine-mode-card {
    display: flex;
    align-items: stretch;
    background: var(--qrcod-white);
    border: 1px solid var(--qrcod-border);
    border-radius: 20px;
    box-shadow: var(--ordine-shadow-card);
    overflow: hidden;
    min-height: 260px;
}

/* .ordine-mode-card{display:flex} above would otherwise beat the UA
   stylesheet's [hidden]{display:none} (author styles always win over
   user-agent styles regardless of specificity), so this needs to be explicit. */
.ordine-mode-card[hidden] {
    display: none;
}

/* Screenshot sits framed/inset on a soft brand-tinted panel, echoing the
   layered device treatment used in the intro, rather than bleeding flush
   to the card edge. */
.ordine-mode-card__media {
    flex: 0 0 44%;
    max-width: 44%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 22px;
    background: linear-gradient(160deg, var(--qrcod-light-orange) 0%, #FFFDF9 65%, var(--qrcod-white) 100%);
}

.ordine-mode-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--qrcod-orange) 1.2px, transparent 1.4px);
    background-size: 11px 11px;
    background-position: -4px -4px;
    opacity: 0.12;
    pointer-events: none;
}

.ordine-mode-card__media img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
    object-position: center 25%;
    border: 5px solid var(--qrcod-white);
    box-shadow: 0 16px 32px -16px rgba(79, 61, 54, 0.45);
    transition: transform var(--ordine-transition);
}

.ordine-mode-card:hover .ordine-mode-card__media img {
    transform: translateY(-2px);
}

/* Each card now has its own correctly-tabbed screenshot (delivery.png,
   pickup.png, car-pickup.png), each already a self-contained, centered app
   card mockup with even margin on all sides — a slight top bias keeps each
   screen's tab row comfortably in frame under tighter crops. */

.ordine-mode-card__body {
    flex: 0 0 56%;
    max-width: 56%;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.ordine-mode-card__icon {
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--qrcod-light-orange), #FFE1B3);
    color: var(--qrcod-orange);
}

.ordine-mode-card__icon svg {
    width: 24px;
    height: 24px;
}

.ordine-mode-card__title {
    color: var(--qrcod-orange);
    font-size: 21px;
    margin-bottom: 8px;
}

.ordine-mode-card__desc {
    font-size: 14.5px;
    max-width: 340px;
}

/* ==========================================================================
   Process
   ========================================================================== */
.ordine-process {
    padding: 0 0 90px;
}

.ordine-process__panel {
    position: relative;
    background: var(--qrcod-white);
    border: 1px solid var(--qrcod-border);
    border-radius: 22px;
    box-shadow: var(--ordine-shadow-card);
    padding: 8px 40px;
}

.ordine-process__panel::before {
    content: "";
    position: absolute;
    left: 53px;
    top: 60px;
    bottom: 60px;
    width: 2px;
    background: linear-gradient(var(--qrcod-yellow), var(--qrcod-orange));
    opacity: 0.4;
}

.ordine-process__row {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 32px 0;
    border-bottom: 1px solid var(--qrcod-border);
    position: relative;
}

.ordine-process__row:last-child {
    border-bottom: none;
}

.ordine-process__number {
    position: relative;
    z-index: 1;
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--qrcod-yellow), var(--qrcod-orange));
    color: var(--qrcod-white);
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 8px 18px -10px rgba(255, 145, 24, 0.6);
}

/* The three process screenshots (browse-menu.png, add-to-cart.png,
   shopping-cart.png) are full portrait app screens (~3:4). The panel is sized
   to that same ratio and uses object-fit: contain so the complete screenshot
   is always shown, never cropped. */
.ordine-process__media {
    flex: 0 0 220px;
    width: 220px;
    height: 293px;
    padding: 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(160deg, var(--qrcod-light-orange) 0%, #FFFDF9 65%, var(--qrcod-white) 100%);
    box-shadow: var(--ordine-shadow-card);
}

.ordine-process__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
}

.ordine-process__text {
    flex: 1;
    min-width: 0;
}

.ordine-process__text h3 {
    font-size: 19px;
    margin-bottom: 6px;
}

.ordine-process__text p {
    font-size: 14px;
}

/* ==========================================================================
   CTA
   ========================================================================== */
.ordine-cta {
    padding: 0 0 110px;
}

.ordine-cta__card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 32px;
    background: linear-gradient(135deg, var(--qrcod-light-orange), #FFFFFF 60%);
    border: 1px solid var(--qrcod-border);
    border-radius: 26px;
    padding: 48px 56px;
}

.ordine-cta__card::before,
.ordine-cta__card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background-image: radial-gradient(var(--qrcod-orange) 1.4px, transparent 1.6px);
    background-size: 10px 10px;
    opacity: 0.25;
}

.ordine-cta__card::before {
    bottom: -60px;
    left: -60px;
}

.ordine-cta__card::after {
    bottom: -60px;
    right: -60px;
}

.ordine-cta__icon {
    position: relative;
    z-index: 1;
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--qrcod-white);
    border: 1.5px solid var(--qrcod-orange);
    box-shadow: var(--ordine-shadow-card);
    color: var(--qrcod-orange);
}

.ordine-cta__icon svg {
    width: 36px;
    height: 36px;
}

.ordine-cta__content {
    position: relative;
    z-index: 1;
    flex: 1;
}

.ordine-cta__heading {
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.2;
    margin-bottom: 10px;
}

.ordine-cta__heading-brown {
    color: var(--qrcod-brown);
}

.ordine-cta__heading-orange {
    color: var(--qrcod-orange);
}

.ordine-cta__desc {
    font-size: 15px;
}

.ordine-cta__actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 14px;
    flex-shrink: 0;
}

/* ==========================================================================
   RTL (Arabic)
   ========================================================================== */
/* Note: these flex rows deliberately do NOT get an explicit row-reverse here.
   flex-direction: row is direction-relative — under dir="rtl" (set on <main>,
   inherited by every descendant) the browser already mirrors "row" containers
   automatically. Adding row-reverse on top of that double-flips them back to
   looking like the LTR order, which was the actual RTL bug. Only the
   non-relative absolute-positioned bits below (arrow, dots, decorative
   screens, timeline rail) need an explicit left/right swap, since `left`/
   `right` are physical, not logical, properties. */
.ordine-page[dir="rtl"] .ordine-intro__dots {
    right: auto;
    left: -30px;
}

.ordine-page[dir="rtl"] .ordine-screen--back-left {
    left: auto;
    right: 0;
}

.ordine-page[dir="rtl"] .ordine-screen--back-right {
    right: auto;
    left: 0;
}

.ordine-page[dir="rtl"] .ordine-highlight + .ordine-highlight::before {
    left: auto;
    right: 0;
}

.ordine-page[dir="rtl"] .ordine-process__panel::before {
    left: auto;
    right: 53px;
}

.ordine-page[dir="rtl"] .ordine-btn--primary .ordine-btn__icon {
    transform: scaleX(-1);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
    .ordine-container {
        padding-inline: 20px;
    }
}

@media (max-width: 992px) {
    .ordine-intro {
        padding: 60px 0 40px;
    }

    .ordine-intro__grid {
        gap: 36px;
    }

    .ordine-screen {
        width: 210px;
    }

    .ordine-screen--front {
        width: 285px;
    }

    .ordine-highlights__card {
        flex-wrap: wrap;
    }

    .ordine-highlight {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .ordine-highlight:nth-child(2n+1)::before {
        display: none;
    }

    .ordine-process__media {
        flex: 0 0 170px;
        width: 170px;
        height: 227px;
    }
}

@media (max-width: 768px) {
    .ordine-intro {
        padding: 56px 0 40px;
    }

    .ordine-intro__grid {
        flex-direction: column;
    }

    .ordine-page[dir="rtl"] .ordine-intro__grid {
        flex-direction: column;
    }

    .ordine-intro__content,
    .ordine-intro__visual {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .ordine-intro__visual {
        min-height: 440px;
        margin-top: 24px;
    }

    .ordine-screens {
        min-height: 440px;
    }

    .ordine-btn-group {
        flex-direction: column;
    }

    .ordine-btn {
        width: 100%;
    }

    .ordine-highlights,
    .ordine-modes,
    .ordine-process,
    .ordine-cta {
        padding: 0 0 56px;
    }

    .ordine-highlight {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .ordine-highlight::before {
        display: none;
    }

    .ordine-mode-tab {
        flex: 1 1 auto;
        justify-content: center;
        padding: 12px 14px;
        font-size: 14px;
    }

    .ordine-mode-card {
        flex-direction: column;
        min-height: auto;
    }

    .ordine-mode-card__media,
    .ordine-mode-card__body {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .ordine-mode-card__media {
        height: 240px;
    }

    .ordine-mode-card__body {
        padding: 24px;
    }

    .ordine-process__panel {
        padding: 8px 20px;
    }

    .ordine-process__panel::before {
        left: 33px;
    }

    .ordine-page[dir="rtl"] .ordine-process__panel::before {
        left: auto;
        right: 33px;
    }

    .ordine-process__row,
    .ordine-page[dir="rtl"] .ordine-process__row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
        padding: 24px 0;
    }

    .ordine-process__number {
        flex: 0 0 50px;
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .ordine-process__media {
        flex: 0 0 130px;
        width: 130px;
        height: 173px;
        padding: 8px;
    }

    .ordine-process__text {
        flex: 1 1 calc(100% - 66px);
    }

    .ordine-cta__card {
        flex-direction: column;
        text-align: center;
        padding: 36px 24px;
    }

    .ordine-cta__actions {
        flex-direction: column;
        width: 100%;
    }

    .ordine-cta__actions .ordine-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .ordine-container {
        padding-inline: 18px;
    }

    .ordine-screen--front {
        width: 215px;
    }

    .ordine-screen {
        width: 165px;
    }

    .ordine-intro__visual {
        min-height: 340px;
    }

    .ordine-screens {
        min-height: 340px;
    }

    .ordine-process__media {
        flex: 0 0 100px;
        width: 100px;
        height: 133px;
        padding: 6px;
    }

    .ordine-process__text {
        flex: 1 1 calc(100% - 46px);
    }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {

    .ordine-page *,
    .ordine-page *::before,
    .ordine-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
