/* ============================================================
   index-ar.css — 3A Rent Car AR homepage styles (RTL)
   Extracted from inline <style> for caching + LCP optimization
   Mobile-optimized: 16px form fonts, 44px+ tap targets
   ============================================================ */

:root {
    --brand: #0f1a2e;
    --brand-light: #1a6985;
    --gold: #c9a84c;
    --ink: #111827;
    --muted: #6b7280;
    --card: #ffffff;
    --bg: #fafafa;
    --radius: 16px;
    --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
}

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    margin: 0; padding: 0;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
* { -webkit-tap-highlight-color: rgba(15,26,46,0.1); }

/* ─── HERO ─── */
.hero-bg {
    background: linear-gradient(170deg, rgba(15,26,46,0.94) 0%, rgba(26,105,133,0.82) 100%);
    background-color: var(--brand);
    color: #fff;
    padding: 3rem 1rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-bg::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to top, #fafafa, transparent);
    pointer-events: none;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 3rem 0; }
.card {
    background: var(--card);
    border-radius: 1rem;
    box-shadow: 0 24px 48px -12px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.03);
    padding: 0.5rem 0.75rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }
@media(max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media(max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ─── Form inputs (16px on mobile to prevent iOS zoom) ─── */
.form-input,
select,
input[type="date"],
input[type="time"] {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 0.7rem 0.8rem;
    background: #fff;
    color: #111;
    outline: 0;
    font-family: inherit;
    font-size: 0.95rem;
    min-height: 48px;
}
select option { color: #111; background: #fff; }
.form-input::placeholder, input::placeholder { color: var(--muted); }

/* ─── Buttons (48px min-height) ─── */
.btn-primary {
    background: var(--brand);
    color: #fff;
    padding: 0.95rem 1.75rem;
    border-radius: 0.625rem;
    font-weight: 600;
    width: 100%;
    border: 0;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.95rem;
    min-height: 48px;
}
.btn-primary:hover {
    background: #1a2f4d;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15,26,46,0.25);
}
.btn-primary:focus-visible {
    outline: 3px solid rgba(201,168,76,0.5);
    outline-offset: 2px;
}

.btn-gold {
    background: var(--gold);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.625rem;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    min-height: 44px;
    line-height: 1.5;
}
.btn-gold:hover {
    background: #b8943f;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(201,168,76,0.3);
}

/* ─── Badges ─── */
.badge {
    background: #eef2ff;
    color: #1f2937;
    font-size: 0.875rem;
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    display: inline-block;
    text-decoration: none;
}
a.badge:hover { background: #dde5ff; }

/* ─── Typography ─── */
h1 { line-height: 1.25; }
h2 { line-height: 1.3; }
.eyebrow {
    color: #c9a84c;
    letter-spacing: 0.03em;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.text-gold { color: #c9a84c; }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* ─── Transfer cards ─── */
.transfer-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.3s;
}
.transfer-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* ─── Feature cards ─── */
.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

/* ─── Tier cards ─── */
.tier-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.tier-card:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.tier-card.featured {
    background: #fdf8ed;
    border-color: rgba(201,162,39,0.4);
}

@keyframes barGrow { to { transform: scaleX(1); } }

/* ─── Booking bar (RTL) ─── */
.booking-bar {
    display: flex;
    align-items: center;
    gap: 0;
}
.booking-bar .bb-section {
    flex: 1;
    padding: 0.625rem 1rem;
    border-left: 1px solid #e5e7eb;
    min-width: 0;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.booking-bar .bb-section:last-child { border-left: none; }
.booking-bar .bb-section.bb-toggle {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    min-height: 56px;
}
.booking-bar .bb-section.bb-btn {
    flex: 0 0 auto;
    padding: 0;
    border-left: none;
}
.bb-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}
.bb-select,
.bb-input {
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1.4;
    font-family: inherit;
    min-height: 24px;
}
input[type="date"].bb-input { position: relative; cursor: pointer; }
input[type="date"].bb-input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}
.bb-select:focus, .bb-input:focus { outline: none; }
.bb-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0 center;
    padding-left: 1rem;
}

/* ─── Bar button (48px) ─── */
.btn-bar {
    background-color: var(--brand);
    color: white;
    padding: 0.95rem 1.75rem;
    border: none;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    min-height: 48px;
}
.btn-bar:hover {
    background-color: #1a2f4d;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15,26,46,0.25);
}
.btn-bar:focus-visible {
    outline: 3px solid rgba(201,168,76,0.5);
    outline-offset: 2px;
}
.btn-bar svg { width: 1.1rem; height: 1.1rem; }

/* ─── Toggle (44px+ tap target, gold color) ─── */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 44px;
    flex-shrink: 0;
    cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
    position: relative;
    cursor: pointer;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
    display: block;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    right: 3px; /* RTL: slider starts on the right */
    top: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .toggle-slider { background: var(--gold); }
input:checked + .toggle-slider:before { transform: translateX(-20px); } /* RTL: moves left */
.toggle-switch input:focus-visible + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(201,168,76,0.3);
}

/* ─── Mobile responsive ─── */
@media (max-width: 768px) {
    .hero-bg { padding: 2rem 0.75rem 2rem; }
    .booking-bar { flex-direction: column; gap: 0; }
    .booking-bar .bb-section {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #f3f4f6;
        padding: 0.875rem 0.5rem;
        min-height: 64px;
    }
    .booking-bar .bb-section:last-child { border-bottom: none; }
    .booking-bar .bb-section.bb-toggle {
        min-height: 56px;
        padding: 0.875rem 0.75rem;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }
    #toggleLabel {
        font-size: 0.95rem !important;
        line-height: 1.2;
        font-weight: 600;
        color: #374151;
    }
    #toggleLabel br { display: none; }
    .booking-bar .bb-section.bb-btn { padding: 0.875rem 0 0.25rem; }
    .bb-label { font-size: 0.75rem; margin-bottom: 0.4rem; }
    /* CRITICAL: 16px+ prevents iOS auto-zoom */
    .bb-select,
    .bb-input,
    .form-input,
    select,
    input[type="date"],
    input[type="time"] {
        font-size: 16px;
        min-height: 28px;
    }
    .form-input, select, input[type="date"], input[type="time"] {
        min-height: 48px;
    }
    .btn-bar,
    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 0.95rem;
        min-height: 52px;
    }
    #dropoffSection .bb-label {
        justify-content: center !important;
        text-align: center;
        gap: 10px;
    }
}

/* ─── Touch-only states ─── */
@media (hover: none) {
    .btn-bar:hover,
    .btn-primary:hover,
    .btn-gold:hover { transform: none; box-shadow: none; }
    .btn-bar:active,
    .btn-primary:active {
        background-color: #1a2f4d;
        transform: scale(0.98);
    }
    .tier-card:hover,
    .transfer-card:hover { transform: none; }
}

/* ─── Language banner (RTL-friendly) ─── */
.lang-banner {
    position: fixed;
    top: 80px;
    left: 20px; /* RTL: place on the left */
    background: rgba(15, 26, 46, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px 16px 10px 14px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    z-index: 999;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    max-width: calc(100vw - 24px);
    border: 1px solid rgba(201,168,76,0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .35s ease, transform .35s ease;
    pointer-events: none;
}
.lang-banner.visible {
    display: flex; opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.lang-banner.fade-out { opacity: 0; transform: translateY(-10px); }
.lang-banner span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.lang-banner a {
    color: #0f1a2e;
    background: #c9a84c;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 50px;
    transition: all .2s;
    flex-shrink: 0;
    font-size: 0.78rem;
}
.lang-banner a:hover { background: #fff; transform: scale(1.05); }
.lang-banner button {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    transition: background .2s;
}
.lang-banner button:hover,
.lang-banner button:focus-visible {
    background: rgba(255,255,255,0.2);
    outline: none;
}

@media (max-width: 640px) {
    .lang-banner {
        top: auto;
        bottom: 16px;
        left: 12px;
        right: 12px;
        max-width: none;
        padding: 10px 12px;
        font-size: 0.78rem;
        gap: 8px;
    }
    .lang-banner span {
        max-width: none;
        flex: 1;
        white-space: normal;
        line-height: 1.3;
    }
    .lang-banner a {
        padding: 5px 10px;
        font-size: 0.72rem;
    }
}
