/* ============================================================
   MasaratKM — مساراتكم brand tokens + landing styles
   Keep Lighthouse 100. Zero JS. Pure CSS.
   ============================================================ */

:root {
    --mk-navy: #0B1F3A;
    --mk-navy-2: #13335F;
    --mk-green: #1F8A4E;        /* Saudi green accent */
    --mk-cta: #F39200;          /* orange CTA */
    --mk-cta-2: #C87400;
    --mk-ink: #0F172A;
    --mk-muted: #475569;
    --mk-soft: #F8FAFC;
    --mk-line: #E2E8F0;
    --mk-white: #FFFFFF;
    --mk-radius: 14px;
    --mk-radius-sm: 10px;
    --mk-shadow: 0 10px 30px rgba(11,31,58,.08);
    --mk-shadow-lg: 0 20px 50px rgba(11,31,58,.14);
    --mk-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Naskh Arabic", "IBM Plex Sans Arabic", Roboto, Helvetica, Arial, sans-serif;
    --mk-max: 1200px;
}

* { box-sizing: border-box; }

html, body.mk-body {
    margin: 0;
    padding: 0;
    color: var(--mk-ink);
    background: var(--mk-white);
    font-family: var(--mk-font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.mk-body[dir="rtl"] { text-align: right; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--mk-navy); text-decoration: none; }
a:hover { color: var(--mk-cta); }

/* --- container --- */
.mk-container { max-width: var(--mk-max); margin: 0 auto; padding: 0 20px; }

/* --- top nav --- */
.mk-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--mk-line);
}
.mk-nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.mk-logo {
    font-weight: 800; font-size: 22px; letter-spacing: .2px;
    color: var(--mk-navy); display: inline-flex; align-items: center; gap: 10px;
}
.mk-logo-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: linear-gradient(135deg, var(--mk-cta), var(--mk-green));
    box-shadow: 0 0 0 4px rgba(243,146,0,.15);
}
.mk-nav-links { display: flex; gap: 22px; align-items: center; }
.mk-nav-links a { color: var(--mk-ink); font-weight: 600; font-size: 15px; }
.mk-nav-cta {
    background: var(--mk-cta); color: var(--mk-white) !important;
    padding: 10px 18px; border-radius: 999px; font-weight: 700;
    transition: background .15s ease;
}
.mk-nav-cta:hover { background: var(--mk-cta-2); color: var(--mk-white) !important; }
.mk-lang {
    border: 1px solid var(--mk-line); border-radius: 999px;
    padding: 6px 12px; font-weight: 600; font-size: 14px;
    color: var(--mk-ink); background: var(--mk-white);
}

/* --- hero --- */
.mk-hero {
    background:
        radial-gradient(900px 450px at 85% -10%, rgba(243,146,0,.18), transparent 60%),
        radial-gradient(700px 400px at -10% 20%, rgba(31,138,78,.16), transparent 60%),
        linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
    padding: 72px 0 48px;
}
.mk-hero-grid {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
}
.mk-hero h1 {
    font-size: clamp(32px, 4.4vw, 54px);
    line-height: 1.1; margin: 0 0 18px; color: var(--mk-navy);
    font-weight: 800; letter-spacing: -.5px;
}
.mk-hero p.lead {
    font-size: clamp(16px, 1.4vw, 19px); color: var(--mk-muted);
    margin: 0 0 28px; max-width: 52ch;
}
.mk-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.mk-badge {
    display: inline-flex; gap: 6px; align-items: center;
    padding: 6px 12px; border-radius: 999px;
    background: rgba(31,138,78,.10); color: var(--mk-green);
    font-size: 13px; font-weight: 700;
}

/* --- booking card --- */
.mk-card {
    background: var(--mk-white); border: 1px solid var(--mk-line);
    border-radius: var(--mk-radius); box-shadow: var(--mk-shadow);
    padding: 22px;
}
.mk-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.mk-field label { font-size: 13px; font-weight: 700; color: var(--mk-ink); }
.mk-field input, .mk-field select, .mk-field textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--mk-line);
    border-radius: var(--mk-radius-sm); font-size: 15px; color: var(--mk-ink);
    background: var(--mk-white); font-family: inherit;
}
.mk-field input:focus, .mk-field select:focus, .mk-field textarea:focus {
    outline: none; border-color: var(--mk-navy);
    box-shadow: 0 0 0 3px rgba(11,31,58,.10);
}
.mk-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 22px; border-radius: 999px; font-weight: 800; font-size: 16px;
    background: var(--mk-cta); color: var(--mk-white); border: none; cursor: pointer;
    width: 100%; transition: background .15s ease, transform .05s ease;
}
.mk-btn:hover { background: var(--mk-cta-2); }
.mk-btn:active { transform: translateY(1px); }
.mk-btn-ghost { background: var(--mk-white); color: var(--mk-navy); border: 1.5px solid var(--mk-navy); }

/* --- sections --- */
section.mk-sec { padding: 64px 0; }
section.mk-sec.alt { background: var(--mk-soft); }
.mk-sec h2 { font-size: clamp(26px,3vw,36px); margin: 0 0 10px; color: var(--mk-navy); font-weight: 800; }
.mk-sec p.sub { color: var(--mk-muted); margin: 0 0 36px; max-width: 70ch; }

/* --- vehicle grid --- */
.mk-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.mk-tile {
    background: var(--mk-white); border: 1px solid var(--mk-line);
    border-radius: var(--mk-radius); padding: 22px; transition: transform .15s ease, box-shadow .15s ease;
}
.mk-tile:hover { transform: translateY(-3px); box-shadow: var(--mk-shadow-lg); }
.mk-tile h3 { margin: 0 0 6px; font-size: 18px; color: var(--mk-navy); }
.mk-tile p { margin: 0; color: var(--mk-muted); font-size: 14px; }
.mk-tile .ico {
    width: 44px; height: 44px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(11,31,58,.06); margin-bottom: 12px; font-size: 24px;
}

/* --- steps --- */
.mk-steps { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.mk-step {
    padding: 22px; background: var(--mk-white); border: 1px solid var(--mk-line);
    border-radius: var(--mk-radius);
}
.mk-step .n {
    display: inline-flex; width: 36px; height: 36px; border-radius: 50%;
    background: var(--mk-navy); color: var(--mk-white); align-items: center; justify-content: center;
    font-weight: 800; margin-bottom: 10px;
}

/* --- trust strip --- */
.mk-trust { display: flex; flex-wrap: wrap; gap: 18px 34px; align-items: center; justify-content: center; opacity: .8; }
.mk-trust span { font-weight: 700; color: var(--mk-muted); font-size: 14px; }

/* --- CTA band --- */
.mk-cta-band {
    background: linear-gradient(135deg, var(--mk-navy) 0%, var(--mk-navy-2) 100%);
    color: var(--mk-white); padding: 56px 0; text-align: center;
}
.mk-cta-band h2 { color: var(--mk-white); font-size: clamp(24px,3vw,34px); margin: 0 0 10px; }
.mk-cta-band p { color: rgba(255,255,255,.8); margin: 0 0 22px; }
.mk-cta-band .mk-btn { width: auto; min-width: 220px; }

/* --- footer --- */
.mk-footer { background: #0A1A31; color: #CBD5E1; padding: 48px 0 28px; }
.mk-footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.mk-footer h4 { color: var(--mk-white); margin: 0 0 14px; font-size: 15px; }
.mk-footer a { color: #CBD5E1; display: block; padding: 4px 0; font-size: 14px; }
.mk-footer a:hover { color: var(--mk-cta); }
.mk-foot-bar { text-align: center; padding-top: 24px; margin-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #94A3B8; }

/* --- responsive --- */
@media (max-width: 960px) {
    .mk-hero-grid, .mk-grid, .mk-steps, .mk-footer-grid { grid-template-columns: 1fr; }
    .mk-hero { padding: 48px 0 32px; }
    .mk-nav-links { display: none; }
    .mk-nav-links.mk-visible-mobile { display: flex; }
}
/* ============================================================
   MasaratKM — Booking form v2 additions (append, no overrides)
   Zero JS required for styling. One tiny inline script in the
   blade shows the filename after upload. Keep Lighthouse 100.
   ============================================================ */

/* Booking form — layered card over a soft pattern */
.mk-bform {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    border: 1px solid var(--mk-line);
    border-radius: 18px;
    box-shadow: 0 22px 44px -18px rgba(11, 31, 58, 0.18), 0 2px 6px rgba(11, 31, 58, 0.05);
    padding: 26px 26px 22px;
    position: relative;
    overflow: hidden;
}
.mk-bform::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto -1px;
    height: 4px;
    background: linear-gradient(90deg, var(--mk-cta), var(--mk-green));
    border-radius: 18px 18px 0 0;
}
.mk-bform h3 {
    margin: 0 0 4px;
    color: var(--mk-navy);
    font-weight: 800;
    font-size: 20px;
}
.mk-bform .sub {
    margin: 0 0 18px;
    color: var(--mk-muted);
    font-size: 13.5px;
}

/* Lane row — two dropdowns joined by a visual swap marker */
.mk-lane-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.mk-lane-row .mk-field { margin-bottom: 0; }
.mk-lane-row .mk-arrow {
    align-self: end;
    width: 40px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mk-cta);
    font-size: 22px;
    font-weight: 700;
    user-select: none;
}
body[dir="rtl"] .mk-lane-row .mk-arrow::before { content: "←"; }
body[dir="ltr"] .mk-lane-row .mk-arrow::before { content: "→"; }

/* Inputs — icon inside, larger tap targets */
.mk-ifield { position: relative; margin-bottom: 14px; }
.mk-ifield > label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--mk-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
}
.mk-ifield .wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--mk-line);
    border-radius: 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.mk-ifield .wrap:focus-within {
    border-color: var(--mk-cta);
    box-shadow: 0 0 0 4px rgba(243, 146, 0, 0.12);
}
.mk-ifield .ico {
    flex: 0 0 auto;
    width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mk-navy);
    font-size: 16px;
    opacity: .7;
    pointer-events: none;
}
.mk-ifield input,
.mk-ifield select,
.mk-ifield textarea {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 13px 12px 13px 0;
    font-size: 15px;
    color: var(--mk-ink);
    font-family: inherit;
    appearance: none;
}
body[dir="rtl"] .mk-ifield input,
body[dir="rtl"] .mk-ifield select,
body[dir="rtl"] .mk-ifield textarea {
    padding: 13px 0 13px 12px;
}
.mk-ifield select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230B1F3A' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 10px 6px;
    padding-left: 32px;
}
body[dir="rtl"] .mk-ifield select {
    background-position: left 16px center;
    padding-left: 32px;
    padding-right: 0;
}

/* Custom file upload — no default "Choose File" button */
.mk-upload {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px dashed var(--mk-line);
    border-radius: 12px;
    background: #fafbfd;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.mk-upload:hover {
    border-color: var(--mk-cta);
    background: #fff8ee;
}
.mk-upload input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}
.mk-upload .ico {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mk-cta), #FFB454);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
}
.mk-upload .t { flex: 1; }
.mk-upload .t b { display: block; color: var(--mk-navy); font-weight: 700; font-size: 14.5px; }
.mk-upload .t small { color: var(--mk-muted); font-size: 12.5px; }
.mk-upload.has-file { border-style: solid; border-color: var(--mk-green); background: #f0fdf4; }

/* Pill vehicle selector (radio chips — optional, we keep select for now) */
.mk-pill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 8px 0 16px;
}
.mk-pill-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    padding: 12px 6px;
    border: 1.5px solid var(--mk-line);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-size: 12px;
    font-weight: 600;
    color: var(--mk-navy);
    text-align: center;
}
.mk-pill-grid label .ico { font-size: 20px; }
.mk-pill-grid input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.mk-pill-grid label:hover { border-color: var(--mk-cta); }
.mk-pill-grid input[type="radio"]:checked + label {
    border-color: var(--mk-cta);
    background: #fff8ee;
    box-shadow: 0 0 0 3px rgba(243, 146, 0, 0.12);
}

/* CTA button upgrade */
.mk-bform .mk-btn {
    padding: 16px 22px;
    font-size: 16px;
    font-weight: 800;
    margin-top: 4px;
    box-shadow: 0 10px 22px rgba(243, 146, 0, 0.28);
}
.mk-bform .mk-btn:hover { box-shadow: 0 14px 28px rgba(243, 146, 0, 0.36); }
.mk-bform .fineprint {
    margin: 10px 0 0;
    color: var(--mk-muted);
    font-size: 12px;
    text-align: center;
}

/* Trust strip under the form */
.mk-trust-line {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--mk-line);
}
.mk-trust-line .it {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mk-muted);
    font-size: 12.5px;
    font-weight: 600;
}
.mk-trust-line .it .ic {
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(31, 138, 78, 0.12);
    color: var(--mk-green);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; flex: 0 0 auto;
}

/* Ship page: wider card, section dividers */
.mk-ship-card { max-width: 760px; margin: 0 auto; }
.mk-ship-section {
    padding: 14px 0 4px;
    margin-top: 10px;
    border-top: 1px solid var(--mk-line);
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mk-muted);
    letter-spacing: .3px;
}
.mk-ship-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

/* Mobile */
@media (max-width: 640px) {
    .mk-bform { padding: 20px 18px 18px; border-radius: 14px; }
    .mk-pill-grid { grid-template-columns: repeat(2, 1fr); }
    .mk-trust-line { grid-template-columns: 1fr; }
    .mk-lane-row { grid-template-columns: 1fr; }
    .mk-lane-row .mk-arrow { display: none; }
}


/* ============================================================
   MasaratKM SEO pages — minimal additions (grids, cards, chips,
   breadcrumbs, prose). No overrides of existing .mk-* rules.
   Keep small and CSS-only to preserve Lighthouse 100.
   ============================================================ */

/* --- Grids --- */
.mk-grid { display: grid; gap: 16px; }
.mk-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.mk-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.mk-grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

@media (max-width: 960px) {
    .mk-grid-3, .mk-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px) {
    .mk-grid-2, .mk-grid-3, .mk-grid-4 { grid-template-columns: 1fr; }
}

/* --- Cards (anchor or div) --- */
.mk-card {
    display: block;
    background: #fff;
    border: 1px solid var(--mk-line);
    border-radius: 14px;
    padding: 20px 18px;
    color: var(--mk-ink);
    text-decoration: none;
    transition: border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.mk-card:hover {
    border-color: var(--mk-cta);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -10px rgba(11, 31, 58, 0.18);
}
.mk-card .mk-card-ico { font-size: 28px; margin-bottom: 8px; }
.mk-card h3 { margin: 0 0 6px; color: var(--mk-navy); font-size: 18px; font-weight: 800; }
.mk-card h4 { margin: 0 0 6px; color: var(--mk-navy); font-size: 15px; font-weight: 700; }
.mk-card p  { margin: 0 0 10px; color: var(--mk-muted); font-size: 13.5px; line-height: 1.55; }
.mk-card .mk-link { color: var(--mk-cta); font-weight: 700; font-size: 13.5px; }

/* --- Breadcrumbs --- */
.mk-crumbs {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--mk-muted);
    margin-bottom: 10px;
}
.mk-crumbs a { color: var(--mk-muted); text-decoration: none; }
.mk-crumbs a:hover { color: var(--mk-cta); }
.mk-crumbs span { color: var(--mk-line); }

/* --- Chips (for long city/lane lists) --- */
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-chip {
    display: inline-flex;
    padding: 8px 14px;
    border: 1px solid var(--mk-line);
    border-radius: 999px;
    color: var(--mk-navy);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    background: #fff;
    transition: border-color .15s ease, background .15s ease;
}
.mk-chip:hover { border-color: var(--mk-cta); background: #fff8ee; }
.mk-chip-lg { padding: 12px 20px; font-size: 14.5px; }

/* --- Prose body (for LLM-generated content) --- */
.mk-prose { line-height: 1.75; color: var(--mk-ink); }
.mk-prose h2 { margin: 28px 0 10px; color: var(--mk-navy); font-size: 24px; font-weight: 800; }
.mk-prose h3 { margin: 20px 0 8px; color: var(--mk-navy); font-size: 19px; font-weight: 700; }
.mk-prose p  { margin: 0 0 14px; }
.mk-prose ul, .mk-prose ol { margin: 0 0 14px; padding-inline-start: 24px; }
.mk-prose ul li, .mk-prose ol li { margin-bottom: 6px; }
.mk-prose a { color: var(--mk-cta); text-decoration: underline; }
.mk-prose table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.mk-prose th, .mk-prose td { border: 1px solid var(--mk-line); padding: 10px 12px; text-align: start; }
.mk-prose th { background: #f8fbfd; font-weight: 700; }

/* --- FAQ details/summary --- */
.mk-faq {
    border: 1px solid var(--mk-line);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: #fff;
}
.mk-faq summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--mk-navy);
    list-style: none;
}
.mk-faq summary::-webkit-details-marker { display: none; }
.mk-faq[open] summary { margin-bottom: 8px; }
.mk-faq p { margin: 0; color: var(--mk-muted); font-size: 14px; }
