/* ================================================================
   FlyBuraq — Design System (layered over Bootstrap 5.1)
   Tokens → base → components. Consistency over creativity.
   ================================================================ */

:root {
    /* Brand — FlyBuraq original identity */
    --fb-navy-900: #061d33;
    --fb-navy-700: #0a2e50; /* dark_color — headings, footer */
    --fb-navy: #36a9e3;     /* accent sky blue — primary actions */
    --fb-navy-400: #1b8fcf; /* darker blue — hover */
    --fb-dark: #0a2e50;
    --fb-turq: #5ce1e6;     /* turquoise */
    --fb-gold: #5ce1e6;     /* accent (turquoise) */
    --fb-gold-600: #33ccd2;

    /* Neutrals */
    --fb-ink: #2a3340;
    --fb-muted: #6b7280;
    --fb-line: #ece4d6;
    --fb-surface: #ffffff;
    --fb-bg: #f8efe2; /* warm cream page background */

    /* Semantic */
    --fb-success: #17885c;
    --fb-danger: #f7274a;
    --fb-warn: #c9880a;

    /* Typography */
    --fb-font: "Roboto", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --fb-font-head: "Cairo", "Roboto", sans-serif;

    /* Radius */
    --fb-r-sm: 10px;
    --fb-r: 16px;
    --fb-r-lg: 22px;
    --fb-r-pill: 999px;

    /* Elevation */
    --fb-shadow-sm: 0 1px 2px rgba(13,59,102,.05), 0 2px 6px rgba(13,59,102,.06);
    --fb-shadow: 0 8px 24px rgba(13,59,102,.09);
    --fb-shadow-lg: 0 20px 48px rgba(13,59,102,.16);

    /* Motion */
    --fb-ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Base ---------- */
html { font-size: 15px; position: relative; min-height: 100%; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
    font-family: var(--fb-font);
    color: var(--fb-ink);
    background: var(--fb-bg);
    margin-bottom: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--fb-font-head);
    color: var(--fb-navy-700);
    letter-spacing: -0.01em;
}

a { color: var(--fb-navy-400); text-decoration: none; }
a:hover { color: var(--fb-navy); }

.text-muted { color: var(--fb-muted) !important; }

main { min-height: 60vh; }

/* ---------- Navbar ---------- */
.navbar {
    background: rgba(255,255,255,.92) !important;
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--fb-line) !important;
    box-shadow: 0 1px 0 rgba(13,59,102,.03);
    padding-top: .6rem; padding-bottom: .6rem;
    position: sticky; top: 0; z-index: 1030;
}
.navbar-brand { font-weight: 800; font-size: 1.35rem; color: var(--fb-navy) !important; }
.navbar-brand::after { content: none; }
.navbar .nav-link { color: var(--fb-ink) !important; font-weight: 500; border-radius: var(--fb-r-pill); padding: .4rem .85rem !important; transition: background .18s var(--fb-ease), color .18s var(--fb-ease); }
.navbar .nav-link:hover { background: #eef3fa; color: var(--fb-navy) !important; }
/* Subtle elevation once the page is scrolled */
.navbar { transition: box-shadow .2s var(--fb-ease), padding .2s var(--fb-ease); }
.navbar.fb-nav-scrolled { box-shadow: var(--fb-shadow-sm); padding-top: .45rem; padding-bottom: .45rem; }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--fb-r-pill); font-weight: 600; padding: .5rem 1.15rem; transition: transform .12s var(--fb-ease), box-shadow .18s var(--fb-ease), background .18s var(--fb-ease); }
.btn-lg { padding: .7rem 1.5rem; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fb-navy); border-color: var(--fb-navy); }
.btn-primary:hover, .btn-primary:focus { background: var(--fb-navy-400); border-color: var(--fb-navy-400); box-shadow: 0 6px 16px rgba(54,169,227,.3); }
.btn-outline-primary { color: var(--fb-navy); border-color: #cfdcea; }
.btn-outline-primary:hover { background: var(--fb-navy); border-color: var(--fb-navy); color: #fff; }
.btn-outline-secondary { color: var(--fb-ink); border-color: #d6deea; }
.btn-outline-secondary:hover { background: #eef3fa; color: var(--fb-navy); border-color: #c4d2e4; }
.btn-warning { background: var(--fb-gold); border-color: var(--fb-gold); color: #1b1b1b; }
.btn-warning:hover, .btn-warning:focus { background: var(--fb-gold-600); border-color: var(--fb-gold-600); color: #1b1b1b; box-shadow: 0 6px 16px rgba(246,181,25,.35); }
.btn-danger { background: var(--fb-danger); border-color: var(--fb-danger); }
.btn-link.nav-link { font-weight: 500; }

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-radius: var(--fb-r-sm);
    border: 1px solid #d9e1ec;
    padding: .6rem .9rem;
    background: #fff;
    transition: border-color .15s var(--fb-ease), box-shadow .15s var(--fb-ease);
}
.form-control:focus, .form-select:focus {
    border-color: var(--fb-navy-400);
    box-shadow: 0 0 0 .22rem rgba(31,111,178,.14);
}
.form-control-lg { padding: .8rem 1.1rem; border-radius: 12px; }
.form-label { font-weight: 600; font-size: .9rem; color: #334155; margin-bottom: .35rem; }

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--fb-line);
    border-radius: var(--fb-r);
    background: var(--fb-surface);
    overflow: hidden;
}
.card.shadow-sm { box-shadow: var(--fb-shadow-sm) !important; border-color: transparent; transition: transform .18s var(--fb-ease), box-shadow .22s var(--fb-ease); }
.card.shadow-sm:hover { transform: translateY(-4px); box-shadow: var(--fb-shadow) !important; }
.card-img-top { overflow: hidden; }
.card .card-img-top { transition: transform .4s var(--fb-ease); }
.card.shadow-sm:hover .card-img-top { transform: scale(1.06); }
.card-header { background: #fbfdff; border-bottom: 1px solid var(--fb-line); font-weight: 600; }

/* ---------- Badges ---------- */
.badge { font-weight: 600; border-radius: var(--fb-r-pill); padding: .4em .7em; letter-spacing: .01em; }
.badge.bg-warning { color: #3d2c00 !important; }

/* ---------- Hero ---------- */
.fb-hero {
    position: relative;
    /* full-bleed out of the layout container */
    width: 100vw;
    margin-inline-start: calc(50% - 50vw);
    background:
        radial-gradient(1200px 500px at 80% -10%, rgba(246,181,25,.18), transparent 60%),
        linear-gradient(135deg, var(--fb-navy-900) 0%, var(--fb-navy) 55%, var(--fb-navy-400) 120%);
    color: #fff;
    overflow: hidden;
    margin-top: -1rem;
}
.fb-hero::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 22px 22px; opacity: .5; pointer-events: none;
}
.fb-hero .container { position: relative; z-index: 1; }
.fb-hero h1 { color: #fff; font-weight: 800; font-size: clamp(2rem, 4vw, 3.1rem); }
.fb-search-card {
    background: #fff;
    border-radius: var(--fb-r-lg);
    box-shadow: var(--fb-shadow-lg);
    padding: 1rem;
}
.fb-search-card .form-control { border-color: #e3e9f2; }
.fb-hero-stats { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; margin-top: 1.4rem; color: rgba(255,255,255,.9); font-weight: 500; }
.fb-hero-stats .n { font-family: var(--fb-font-head); font-weight: 800; font-size: 1.25rem; color: #fff; }

/* ---------- Section headers ---------- */
.fb-section-title { font-weight: 800; position: relative; padding-inline-start: 14px; }
.fb-section-title::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%); width: 5px; height: 1.1em; border-radius: 4px; background: linear-gradient(var(--fb-navy), var(--fb-gold)); }

/* ---------- Hotel card specifics ---------- */
.fb-why-icon {
    width: 58px; height: 58px; margin: 0 auto .8rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(54,169,227,.12);
    color: var(--fb-navy);
    font-size: 1.5rem; line-height: 1;
}
.hotel-stars, .text-warning { color: var(--fb-gold) !important; }

/* ---------- Footer ---------- */
.fb-footer { background: var(--fb-navy-900); color: #c9d6e5; margin-top: 3rem; }
.fb-footer a { color: #c9d6e5; }
.fb-footer a:hover { color: #fff; }
.fb-footer h6 { color: #fff; font-weight: 700; margin-bottom: .9rem; }
.fb-footer .fb-foot-brand { color: #fff; font-family: var(--fb-font-head); font-weight: 800; font-size: 1.3rem; }
.fb-footer .fb-foot-bottom { border-top: 1px solid rgba(255,255,255,.08); color: #8fa3bb; }

/* ---------- Focus ring (a11y) ---------- */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible,
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--fb-navy);
    outline-offset: 2px;
    border-radius: var(--fb-r-sm);
}

/* ---------- Nav crowding (small desktop) ---------- */
@media (min-width: 576px) {
    .navbar .navbar-nav { flex-wrap: wrap; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .navbar-collapse { padding: .5rem 0; }
    .navbar .navbar-nav { align-items: flex-start; gap: .1rem; }
    .navbar .navbar-nav form.d-inline { padding-inline-start: .85rem; }
}

/* Comfortable tap targets on touch/phone widths */
@media (max-width: 767.98px) {
    .btn, .form-control, .form-select { min-height: 44px; }
    .input-group-sm .form-control, .input-group-sm .btn { min-height: 38px; }
    .navbar-toggler { min-height: 44px; min-width: 44px; }
}
@media (max-width: 575.98px) {
    .fb-hero .container { padding-top: 2.2rem !important; padding-bottom: 2.2rem !important; }
    .fb-hero h1 { font-size: 1.8rem; }
    .fb-hero .lead { font-size: 1rem; }
    .fb-hero-stats { gap: .6rem 1.25rem; font-size: .85rem; margin-top: 1rem; }
    .fb-search-card { padding: .7rem; border-radius: var(--fb-r); }
    .card-img-top { height: 150px !important; }
    h1, .h1 { font-size: 1.6rem; }
    .btn-lg { padding: .6rem 1.1rem; }
    .table-responsive { -webkit-overflow-scrolling: touch; }
}

/* ---------- RTL niceties ---------- */
html[dir="rtl"] body { line-height: 1.75; }
html[dir="rtl"] .navbar-brand::after { margin-inline-start: 4px; }
html[dir="rtl"] .fb-section-title { padding-inline-start: 14px; padding-inline-end: 0; }
