/* ======================================================
   Menuza
   Cuisine Directory
   Version: 1.0.0
   ====================================================== */

:root {
    --page-background: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #eef2f7;

    --text-primary: #172033;
    --text-secondary: #667085;
    --text-muted: #98a2b3;

    --border: #e4e7ec;
    --border-strong: #d0d5dd;

    --brand: #ea5b20;
    --brand-hover: #d94d15;
    --brand-soft: #fff3ed;

    --success: #178b52;
    --rating: #f59e0b;

    --shadow-small:
        0 1px 2px rgba(16, 24, 40, 0.04),
        0 1px 3px rgba(16, 24, 40, 0.08);

    --shadow-medium:
        0 4px 10px rgba(16, 24, 40, 0.05),
        0 12px 28px rgba(16, 24, 40, 0.08);

    --radius-small: 10px;
    --radius-medium: 16px;
    --radius-large: 22px;

    --shell-width: 1240px;
}

/* ======================================================
   Reset
   ====================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--page-background);
    color: var(--text-primary);
    font-family:
        "Tajawal",
        "Noto Sans Arabic",
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.cuisine-shell {
    width: min(
        calc(100% - 32px),
        var(--shell-width)
    );
    margin-inline: auto;
}

/* ======================================================
   Accessibility
   ====================================================== */

.skip-link {
    position: fixed;
    inset-block-start: 12px;
    inset-inline-start: 12px;
    z-index: 9999;
    padding: 10px 16px;
    border-radius: var(--radius-small);
    background: var(--text-primary);
    color: #ffffff;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

/* ======================================================
   Header
   ====================================================== */

.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 100;
    border-block-end: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-brand {
    color: var(--brand);
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: var(--radius-small);
    color: var(--text-secondary);
    font-weight: 700;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--surface-soft);
    color: var(--text-primary);
}

.site-nav .site-nav__primary {
    background: var(--brand);
    color: #ffffff;
}

.site-nav .site-nav__primary:hover,
.site-nav .site-nav__primary:focus-visible {
    background: var(--brand-hover);
    color: #ffffff;
}

/* ======================================================
   Breadcrumbs
   ====================================================== */

.breadcrumbs {
    min-height: 56px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.breadcrumbs a {
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--brand);
}

.breadcrumbs span[aria-current="page"] {
    color: var(--text-primary);
    font-weight: 700;
}

/* ======================================================
   Hero
   ====================================================== */

.cuisine-hero {
    padding-block: 28px 42px;
}

.cuisine-hero__inner {
    position: relative;
    overflow: hidden;
    padding: 42px;
    border: 1px solid #f0d8cb;
    border-radius: var(--radius-large);
    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(234, 91, 32, 0.12),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #fff8f4 100%
        );
    box-shadow: var(--shadow-small);
}

.cuisine-hero__inner::after {
    content: "🍽";
    position: absolute;
    inset-inline-end: 36px;
    inset-block-start: 24px;
    font-size: 120px;
    opacity: 0.055;
    transform: rotate(-10deg);
    pointer-events: none;
}

.cuisine-eyebrow {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 900;
}

.cuisine-hero h1 {
    max-width: 760px;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.cuisine-hero h1 + p {
    max-width: 820px;
    margin: 18px 0 0;
    color: var(--text-secondary);
    font-size: 18px;
}

.cuisine-hero__stats {
    margin-block-start: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cuisine-hero__stats span {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-secondary);
    font-size: 14px;
    box-shadow: var(--shadow-small);
}

.cuisine-hero__stats strong {
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 900;
}

/* ======================================================
   Main Layout
   ====================================================== */

.cuisine-layout {
    padding-block-end: 64px;
    display: grid;
    grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
    align-items: start;
    gap: 26px;
}

.cuisine-sidebar {
    position: sticky;
    inset-block-start: 94px;
    display: grid;
    gap: 18px;
}

.cuisine-widget {
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--surface);
    box-shadow: var(--shadow-small);
}

.cuisine-widget h2 {
    margin: 0 0 16px;
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1.4;
}

.country-links,
.city-links {
    display: grid;
    gap: 8px;
}

.cuisine-widget > a,
.country-links a,
.city-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-small);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.cuisine-widget > a:hover,
.country-links a:hover,
.city-links a:hover {
    background: var(--brand-soft);
    color: var(--brand);
    transform: translateX(-2px);
}

.country-links small,
.city-links small {
    color: var(--text-muted);
    font-size: 12px;
}

/* ======================================================
   Results Section
   ====================================================== */

.cuisine-results {
    min-width: 0;
}

.section-heading {
    margin-block-end: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(23px, 3vw, 30px);
    line-height: 1.35;
}

.section-heading p {
    margin: 7px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.section-heading > span {
    flex: none;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
}

/* ======================================================
   Restaurant Grid
   ====================================================== */

.restaurant-grid {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 20px;
}

.restaurant-card {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--surface);
    box-shadow: var(--shadow-small);
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.restaurant-card:hover {
    transform: translateY(-4px);
    border-color: #efc4b0;
    box-shadow: var(--shadow-medium);
}

.restaurant-card__image {
    position: relative;
    height: 205px;
    overflow: hidden;
    display: block;
    background:
        linear-gradient(
            135deg,
            #f8fafc,
            #eef2f7
        );
}

.restaurant-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.restaurant-card:hover
.restaurant-card__image img {
    transform: scale(1.04);
}

.restaurant-card__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 54px;
}

.restaurant-card__body {
    flex: 1;
    min-width: 0;
    padding: 17px;
    display: flex;
    flex-direction: column;
}

.restaurant-card__top {
    min-height: 30px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}

.restaurant-card__top > span:last-child {
    max-width: 45%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.restaurant-card__rating {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fff8e7;
    color: #8a5a00;
    font-size: 13px;
    font-weight: 900;
}

.restaurant-card__rating small {
    color: #987329;
    font-size: 11px;
    font-weight: 800;
}

.restaurant-card__rating--empty {
    background: var(--surface-muted);
    color: var(--text-muted);
    font-weight: 700;
}

.restaurant-card h3 {
    min-height: 56px;
    margin: 14px 0 6px;
    color: var(--text-primary);
    font-size: 19px;
    line-height: 1.45;
}

.restaurant-card h3 a {
    transition: color 0.2s ease;
}

.restaurant-card h3 a:hover {
    color: var(--brand);
}

.restaurant-card__cuisine {
    min-height: 25px;
    margin: 0;
    overflow: hidden;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.restaurant-card__address {
    min-height: 46px;
    margin: 9px 0 0;
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.restaurant-card__footer {
    margin-block-start: auto;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.restaurant-card__footer > span {
    min-width: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.restaurant-card__footer > a {
    flex: none;
    padding: 8px 11px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.restaurant-card__footer > a:hover {
    background: var(--brand);
    color: #ffffff;
}

/* ======================================================
   Pagination
   ====================================================== */

.pagination {
    margin-block-start: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 800;
}

.pagination a {
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.pagination a:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand);
}

.pagination span[aria-current="page"] {
    border-color: var(--brand);
    background: var(--brand);
    color: #ffffff;
}

/* ======================================================
   Footer
   ====================================================== */

.site-footer {
    border-block-start: 1px solid var(--border);
    background: var(--surface);
}

.site-footer__inner {
    min-height: 150px;
    padding-block: 34px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
}

.site-footer strong {
    color: var(--brand);
    font-size: 22px;
    font-weight: 900;
}

.site-footer p {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.site-footer nav a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
}

.site-footer nav a:hover {
    color: var(--brand);
}

/* ======================================================
   Focus
   ====================================================== */

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(234, 91, 32, 0.28);
    outline-offset: 3px;
}

/* ======================================================
   Responsive
   ====================================================== */

@media (max-width: 1100px) {

    .restaurant-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}

@media (max-width: 900px) {

    .cuisine-layout {
        grid-template-columns: 1fr;
    }

    .cuisine-sidebar {
        position: static;
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .cuisine-sidebar
    .cuisine-widget:last-child {
        grid-column: 1 / -1;
    }

}

@media (max-width: 720px) {

    .cuisine-shell {
        width: min(
            calc(100% - 22px),
            var(--shell-width)
        );
    }

    .site-header__inner {
        min-height: 64px;
    }

    .site-nav a:not(.site-nav__primary) {
        display: none;
    }

    .cuisine-hero {
        padding-block: 18px 28px;
    }

    .cuisine-hero__inner {
        padding: 28px 22px;
    }

    .cuisine-hero__inner::after {
        font-size: 80px;
        inset-inline-end: 18px;
    }

    .cuisine-hero h1 + p {
        font-size: 16px;
    }

    .cuisine-hero__stats {
        gap: 8px;
    }

    .cuisine-hero__stats span {
        min-height: 42px;
        padding: 7px 11px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .restaurant-grid {
        grid-template-columns: 1fr;
    }

    .restaurant-card__image {
        height: 225px;
    }

    .cuisine-sidebar {
        grid-template-columns: 1fr;
    }

    .cuisine-sidebar
    .cuisine-widget:last-child {
        grid-column: auto;
    }

    .site-footer__inner {
        flex-direction: column;
    }

}

@media (max-width: 460px) {

    .restaurant-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .restaurant-card__footer > a {
        width: 100%;
        text-align: center;
    }

    .pagination a,
    .pagination span {
        min-width: 38px;
        min-height: 38px;
        padding-inline: 9px;
    }

}