/* ==========================================================================
   WifiRoom — homepage design system
   Loaded last in <head> (see resources/views/master.blade.php). Component
   behaviour (modals, filters, carousels) lives in the Blade components; this
   file owns the visual layer only.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    /* brand */
    --c-primary: #0f4c5c;
    --c-primary-600: #0b3d4a;
    --c-primary-50: #eaf2f4;
    --c-accent: #e4823a;
    --c-accent-50: #fdf1e7;

    /* surfaces & text */
    --c-bg: #fbfaf7;
    --c-bg-soft: #f4f1ea;
    --c-surface: #ffffff;
    --c-text: #16202a;
    --c-text-soft: #55606b;
    --c-line: #e7e3da;
    --c-danger: #b42318;
    --c-success: #15803d;

    /* type */
    --f-head: 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif;
    --f-body: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif;

    /* spacing / shape */
    --space-section: clamp(36px, 4.5vw, 60px);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(22, 32, 42, .04), 0 2px 8px rgba(22, 32, 42, .04);
    --shadow-md: 0 2px 6px rgba(22, 32, 42, .04), 0 12px 32px rgba(22, 32, 42, .08);
    --ease: .2s ease;
    --nav-h: 68px;
}

/* ---------- 2. Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
    padding-top: var(--nav-h) !important;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: 1rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; }

h1, h2, h3, h4 { font-family: var(--f-head); color: var(--c-text); line-height: 1.3; }

:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

.container-x { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 3. Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font-family: var(--f-head);
    font-weight: 700; font-size: 1rem; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: background var(--ease), color var(--ease), border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-600); color: #fff; box-shadow: var(--shadow-md); }
.btn--outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn--outline:hover { background: var(--c-primary-50); }
.btn--lg { padding: 16px 32px; font-size: 1.1rem; }
.btn--sm { padding: 9px 18px; font-size: .95rem; }
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 4. Navigation ---------- */
body .site-nav {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    background: rgba(251, 250, 247, .92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--c-line);
}
.nav-inner {
    max-width: 1120px; margin-inline: auto; padding-inline: 24px;
    height: var(--nav-h);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-brand {
    font-family: var(--f-head); font-weight: 800; font-size: 1.35rem;
    color: var(--c-text); text-decoration: none; letter-spacing: -.01em; direction: ltr;
}
.nav-brand__dot { color: var(--c-accent); }
.desktop-menu { display: flex; gap: 28px; }
.nav-link {
    color: var(--c-text-soft); font-weight: 500; font-size: .98rem; text-decoration: none;
    padding: 6px 0; transition: color var(--ease);
}
.nav-link:hover { color: var(--c-primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-dropdown { position: relative; }
.lang-trigger {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 12px; border-radius: 999px;
    background: transparent; border: 1px solid var(--c-line);
    color: var(--c-text); font-size: .88rem; font-weight: 600; cursor: pointer;
    transition: background var(--ease), border-color var(--ease);
}
.lang-trigger:hover { background: var(--c-surface); border-color: #cfcabd; }
.lang-trigger img, .lang-item img { width: 20px; height: 14px; border-radius: 3px; object-fit: cover; }
.lang-menu {
    position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
    min-width: 160px; padding: 6px;
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: none; flex-direction: column; gap: 2px; z-index: 120;
}
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="ltr"] .lang-menu { left: auto; right: 0; }
.lang-menu.show { display: flex; }
.lang-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border-radius: var(--radius-sm); color: var(--c-text); text-decoration: none; font-weight: 500; font-size: .92rem;
}
.lang-item:hover, .lang-item.active { background: var(--c-bg-soft); }

#mobileMenuBtn {
    display: none; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px;
    background: transparent; border: 1px solid var(--c-line); color: var(--c-text); cursor: pointer;
}
#mobileMenu {
    display: none; flex-direction: column; gap: 4px;
    position: absolute; top: var(--nav-h); inset-inline: 0;
    padding: 12px 24px 24px;
    background: var(--c-bg); border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow-md);
}
#mobileMenu.show { display: flex; }
#mobileMenu .nav-link { padding: 12px 0; border-bottom: 1px solid var(--c-line); font-size: 1.05rem; }
#mobileMenu .lang-dropdown { margin-top: 12px; }
#mobileMenu .mobile-cta { margin-top: 12px; width: 100%; }

@media (max-width: 960px) {
    .desktop-menu, .nav-actions .nav-cta, .nav-actions .lang-dropdown { display: none; }
    #mobileMenuBtn { display: inline-flex; }
}

body.modal-open nav { opacity: 0; pointer-events: none; }

/* ---------- 5. Sections (shared) ---------- */
.section { padding-block: var(--space-section); background: var(--c-bg); }
.section--soft { background: var(--c-bg-soft); }
.section__head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section__head--spaced { margin-top: 96px; }
.section__title { font-size: clamp(1.9rem, 1.2rem + 2vw, 2.75rem); font-weight: 800; letter-spacing: -.01em; margin: 0 0 12px; }
.section__title--sm { font-size: clamp(1.6rem, 1rem + 1.6vw, 2.2rem); }
.section__sub { color: var(--c-text-soft); font-size: 1.08rem; margin: 0; }

.info-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.info-card {
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
    padding: 32px 28px; box-shadow: var(--shadow-sm);
}
.info-card h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 8px; }
.info-card p { color: var(--c-text-soft); margin: 0; }
.info-card__num {
    display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px;
    border-radius: 50%; background: var(--c-accent-50); color: var(--c-accent);
    font-family: var(--f-head); font-weight: 800;
}

.wa-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 760px; margin-inline: auto; }
.wa-link {
    display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20px;
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
    color: var(--c-text); font-weight: 600; text-decoration: none;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.wa-link:hover { border-color: #25d366; box-shadow: var(--shadow-md); }

/* ---------- 7. Offers & requests (cards, filters, carousels) ---------- */
body #offers.offers-section,
body #requests.requests-section { padding: var(--space-section) 0; background: var(--c-bg-soft); }
body #requests.requests-section { background: var(--c-bg); }

body .offers-shell, body .requests-shell { max-width: 1120px; padding-inline: 24px; }
body .offers-header, body .requests-header { max-width: 640px; margin: 0 auto 40px; text-align: center; }
body .offers-title, body .requests-title {
    font-size: clamp(1.9rem, 1.2rem + 2vw, 2.75rem); font-weight: 800; letter-spacing: -.01em; color: var(--c-text); margin: 0 0 12px;
}
body .offers-divider, body .requests-divider { display: none; }
body .offers-subtitle, body .requests-subtitle { color: var(--c-text-soft); font-size: 1.08rem; font-weight: 400; }

body .offers-subsection-title, body .requests-subsection-title {
    font-size: 1.35rem; font-weight: 700; text-align: start; margin: 56px 0 16px;
}
body .requests-subsection { padding: 0; margin: 0; border-radius: 0; background: transparent !important; --request-card-bg: var(--c-surface); --request-card-border: var(--c-line); }

/* filters */
body .offers-filter, body .requests-filter {
    background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0 0 8px; display: block;
}
body .offers-filter-row, body .requests-filter-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; align-items: center; }
body .offers-input, body .requests-input {
    min-width: 170px; padding: 10px 14px;
    background: var(--c-surface); color: var(--c-text);
    border: 1px solid var(--c-line); border-radius: 999px;
    font-weight: 500; font-size: .95rem;
}
body .offers-input:focus, body .requests-input:focus { border-color: var(--c-primary); outline: none; box-shadow: 0 0 0 3px var(--c-primary-50); }
body .offers-reset, body .requests-reset {
    background: transparent; color: var(--c-primary); border-radius: 999px; padding: 10px 14px; font-weight: 600; font-size: .95rem;
}
body .offers-reset:hover, body .requests-reset:hover { background: var(--c-primary-50); }
body .offers-count, body .requests-count { text-align: start; color: var(--c-text-soft); font-weight: 400; font-size: .92rem; margin: 6px 0 16px; }

/* carousel track */
body .offers-carousel, body .requests-carousel { max-width: 1120px; margin-inline: auto; padding: 0 24px 8px; }
body .offers-track, body .requests-track { gap: 20px; padding: 4px 2px 16px; }
body .offers-viewport, body .requests-viewport { scrollbar-width: thin; scrollbar-color: #d6d1c4 transparent; }

/* card */
body .offer-card, body .request-card {
    width: clamp(270px, 28vw, 340px); min-width: 270px;
    background: var(--c-surface);
    border: 1px solid var(--c-line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
}
body .offer-card:hover, body .request-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d8d3c6; }
body .offer-card__body, body .request-card { padding: 24px; }
body .offer-card__body { display: flex; flex-direction: column; width: 100%; }
body .offer-card__place { margin: 0 0 6px; color: var(--c-accent); font-weight: 600; font-size: .9rem; }
body .offer-card__title, body .request-card__title {
    font-family: var(--f-head); font-size: 1.2rem; font-weight: 700; line-height: 1.45; color: var(--c-text); margin: 0 0 16px;
}
body .offer-card__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0 0 20px; padding-top: 16px; border-top: 1px solid var(--c-line); }
body .offer-card__facts dt { color: var(--c-text-soft); font-size: .8rem; font-weight: 500; }
body .offer-card__facts dd { margin: 0; font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
body .offer-card__body p { margin: 0; }

/* request cards use "label: value" lines */
body .request-card { display: flex; flex-direction: column; }
body .request-card__meta { margin: 0 0 4px; color: var(--c-text-soft); font-size: .93rem; }

body .offer-card__actions, body .request-card__actions {
    margin-top: auto; padding-top: 4px; display: flex; gap: 10px; align-items: center; justify-content: space-between;
}
body .offer-card__cta, body .request-card__cta {
    background: var(--c-primary); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px;
    font-family: var(--f-head); font-weight: 700; font-size: .95rem; cursor: pointer;
    transition: background var(--ease);
}
body .offer-card__cta:hover, body .request-card__cta:hover { background: var(--c-primary-600); }
body .offer-card__copy, body .request-card__copy {
    background: transparent; border: 0; color: var(--c-text-soft); font-size: .88rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; cursor: pointer;
}
body .offer-card__copy:hover, body .request-card__copy:hover { color: var(--c-primary); }
body .offer-card__copy-icon, body .request-card__copy-icon { width: 16px; height: 16px; }

/* scroll buttons */
body .offers-scroll-actions, body .requests-scroll-actions { justify-content: flex-end; max-width: 1120px; margin: 0 auto; padding-inline: 24px; gap: 8px; }
body .offers-scroll-btn, body .requests-scroll-btn {
    background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-line); border-radius: 999px;
    padding: 8px 18px; font-weight: 600; font-size: .9rem; box-shadow: none;
}
body .offers-scroll-btn:hover, body .requests-scroll-btn:hover { border-color: var(--c-primary); color: var(--c-primary); transform: none; box-shadow: none; }

/* empty states */

body [id$="EmptyState"].hidden { display: none; }

/* ---------- 8. Special request (sponsors) ---------- */
body #sponsors.sponsors-section { padding: 0; background: transparent; }
body .sponsors-shell { max-width: 880px; margin-inline: auto; padding-inline: 24px; }
body .sponsors-header { margin-bottom: 36px; text-align: center; }
body .sponsors-title { color: #fff; font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.5rem); font-weight: 800; margin: 0 0 10px; }
body .sponsors-subtitle { color: rgba(255, 255, 255, .78); font-size: 1.08rem; margin: 0; }
body .sponsors-card { background: transparent; border: 0; box-shadow: none; padding: 0; }
body .sponsors-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
body .sponsors-actions .btn--primary { background: #fff; color: var(--c-primary); }
body .sponsors-actions .btn--primary:hover { background: var(--c-bg-soft); }
body .sponsors-actions .btn--outline { color: #fff; border-color: rgba(255, 255, 255, .5); }
body .sponsors-actions .btn--outline:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
body .sponsors-actions .btn { min-width: 200px; }
body .sponsors-wa {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: fit-content;
    margin: 28px auto 0; color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 5px;
}
body .sponsors-wa:hover { color: #fff; opacity: .85; }
body .sponsors-foot { margin-top: 20px; text-align: center; color: rgba(255, 255, 255, .6); font-size: .9rem; }
@media (max-width: 520px) { body .sponsors-actions .btn { width: 100%; } }

/* ---------- 9. Contact ---------- */
body #contact.contact-section { padding: var(--space-section) 0; background: var(--c-bg); color: var(--c-text); }
body .contact-shell { max-width: 1120px; padding-inline: 24px; gap: 40px; }
body .contact-title { color: var(--c-text); font-size: clamp(1.9rem, 1.2rem + 2vw, 2.75rem); font-weight: 800; margin: 0; }
body .contact-subtitle { color: var(--c-text-soft); font-weight: 400; margin: 0; }
.contact-header { text-align: center; display: grid; gap: 12px; }
.contact-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.contact-card {
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
    padding: 28px; text-align: center; display: grid; gap: 6px; justify-items: center;
    color: var(--c-text); text-decoration: none; box-shadow: var(--shadow-sm);
    transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d8d3c6; color: var(--c-text); }
.contact-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--c-primary-50); color: var(--c-primary); margin-bottom: 8px; }
.contact-label { font-family: var(--f-head); font-weight: 700; font-size: 1.05rem; }
.contact-value { color: var(--c-text-soft); font-size: .95rem; overflow-wrap: anywhere; }
.contact-footer { text-align: center; color: var(--c-text-soft); }

/* ---------- 10. Footer ---------- */
.site-footer { background: var(--c-text); color: rgba(255, 255, 255, .72); padding: 64px 0 28px; font-size: .95rem; }
.site-footer .nav-brand { color: #fff; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1.4fr 1fr 1fr; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-about p { margin: 16px 0 0; max-width: 360px; }
.site-footer h4 { color: #fff; font-size: 1rem; font-weight: 700; margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255, 255, 255, .72); text-decoration: none; transition: color var(--ease); }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 24px; font-size: .85rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #fff; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- 11. Misc ---------- */
.go-up {
    position: fixed; inset-block-end: 24px; inset-inline-start: 24px; z-index: 50;
    width: 44px; height: 44px; display: grid; place-items: center;
    background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-line); border-radius: 50%;
    box-shadow: var(--shadow-md); cursor: pointer; transition: background var(--ease);
}
.go-up:hover { background: var(--c-bg-soft); }
.go-up.hidden { display: none; }

/* Modals: keep their logic/markup, soften the look */
[data-overlay="modal"] > div { border-radius: var(--radius-lg) !important; }
[data-overlay="modal"] input:not([type="checkbox"]):not([type="radio"]),
[data-overlay="modal"] select,
[data-overlay="modal"] textarea {
    border-color: var(--c-line); border-radius: var(--radius-sm); background: #fff;
}
[data-overlay="modal"] input:focus, [data-overlay="modal"] select:focus, [data-overlay="modal"] textarea:focus {
    outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-50);
}
[data-overlay="modal"] h2 { font-family: var(--f-head); }

@media (max-width: 640px) {
    .container-x, body .offers-shell, body .requests-shell, body .sponsors-shell, body .contact-shell { padding-inline: 20px; }
    body .offers-carousel, body .requests-carousel { padding-inline: 20px; }
    body .offer-card, body .request-card { width: 82vw; }
    .section__head { margin-bottom: 36px; }
}

/* Segmented tabs */
[hidden] { display: none !important; }
.tabs {
    display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 auto;
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 999px;
}
.tabs__btn {
    padding: 10px 22px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
    color: var(--c-text-soft); font-family: var(--f-head); font-weight: 700; font-size: .98rem;
    transition: background var(--ease), color var(--ease);
}
.tabs__btn:hover { color: var(--c-primary); }
.tabs__btn.is-active { background: var(--c-primary); color: #fff; }
body .offers-header, body .requests-header { margin-bottom: 28px; }
.offers-header + .tabs, .requests-header + .tabs { display: flex; width: fit-content; }
body .offers-subsection-title, body .requests-subsection-title { display: none; }
@media (max-width: 520px) { .tabs { display: flex !important; width: 100% !important; } .tabs__btn { flex: 1; padding-inline: 10px; } }
.tabs { margin-bottom: 28px; }

/* ---------- Card v2 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body .offer-card__body, body .request-card { padding: 22px; gap: 0; }
.card-chip {
    display: flex; align-items: center; gap: 6px; margin: 0 0 14px !important;
    font-size: .85rem; font-weight: 600; color: var(--c-primary);
}
.card-chip > span { display: inline-flex; padding: 3px 10px; background: var(--c-primary-50); border-radius: 999px; }
.card-chip em { font-style: normal; color: var(--c-text-soft); font-weight: 500; margin-inline-start: auto; }
.card-ico { width: 16px; height: 16px; color: var(--c-accent); flex: none; }
body .offer-card__title, body .request-card__title {
    font-size: 1.15rem; margin: 0 0 16px; min-height: 2.9em;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-dates {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--radius);
    padding: 12px 16px; margin-bottom: 16px;
}
.card-dates div { display: grid; line-height: 1.4; }
.card-dates span { font-size: .75rem; color: var(--c-text-soft); }
.card-dates strong { font-size: .95rem; font-weight: 700; direction: ltr; text-align: start; }
.card-dates__arrow { width: 18px; height: 18px; color: var(--c-text-soft); flex: none; }
[dir="rtl"] .card-dates__arrow { transform: scaleX(-1); }
.card-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 20px; }
.card-facts div { display: grid; line-height: 1.4; }
.card-facts dt { font-size: .75rem; color: var(--c-text-soft); font-weight: 500; }
.card-facts dd { margin: 0; font-weight: 600; font-size: .92rem; }
body .offer-card__actions, body .request-card__actions { border-top: 1px solid var(--c-line); padding-top: 16px; margin-top: auto; flex-direction: row-reverse; justify-content: space-between; }
body .offer-card__cta, body .request-card__cta { flex: 1; padding: 11px 20px; box-shadow: none; }
body .offer-card__copy, body .request-card__copy {
    width: 42px; height: 42px; padding: 0; justify-content: center; flex: none;
    border: 1px solid var(--c-line); border-radius: 50%; color: var(--c-text-soft);
}
body .offer-card__copy:hover, body .request-card__copy:hover { border-color: var(--c-primary); background: var(--c-primary-50); }
body .offer-card__copy-icon, body .request-card__copy-icon { width: 18px; height: 18px; }
/* keep visually-hidden labels anchored inside their button (avoids stray overflow) */
body .offer-card__copy, body .request-card__copy { position: relative; overflow: hidden; }
.card-dates { padding: 12px; gap: 6px; }
.card-dates strong { font-size: .88rem; white-space: nowrap; }
body .offer-card__title, body .request-card__title { min-height: 0; margin-bottom: 14px; }
body .offer-card, body .request-card { min-width: 290px; }

/* ---------- No horizontal scrolling: wrapping grid + "show more" ---------- */
body .offers-viewport, body .requests-viewport {
    overflow: hidden; scroll-snap-type: none; position: relative;
    max-height: var(--clip, 940px);
}
body .offers-viewport.is-expanded, body .requests-viewport.is-expanded { max-height: none; }
body .offers-viewport.is-clipped::after, body .requests-viewport.is-clipped::after {
    content: ''; position: absolute; inset: auto 0 0 0; height: 120px; pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--fade, var(--c-bg-soft)));
}
body #requests .requests-viewport { --fade: var(--c-bg); }
body .offers-track, body .requests-track {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; padding: 4px 2px 16px;
}
body .offer-card, body .request-card { width: auto; min-width: 0; }
body .offers-scroll-actions, body .requests-scroll-actions { display: none; }
.show-more { display: flex; margin: 12px auto 0; }
@media (max-width: 640px) { body .offers-viewport, body .requests-viewport { --clip: 1000px; } body .offer-card, body .request-card { width: auto; } }

/* ---------- Hero (photo + search card) ---------- */
:root { --c-gold: #b98a4e; --c-gold-600: #a37640; }
.btn--accent { background: var(--c-gold); color: #fff; }
.btn--accent:hover { background: var(--c-gold-600); color: #fff; box-shadow: var(--shadow-md); }

#hero {
    position: relative;
    background:
        linear-gradient(180deg, rgba(7, 30, 38, .55) 0%, rgba(7, 30, 38, .25) 55%, rgba(7, 30, 38, .55) 100%),
        url('img/hero.jpg') center bottom / cover no-repeat;
    background-color: #0b3340;
}
#hero .hero-shell { padding: clamp(48px, 6vw, 80px) 0 clamp(130px, 14vw, 180px); }
#hero .hero-container { max-width: 960px; margin-inline: auto; padding-inline: 24px; text-align: center; display: block; }
#hero .hero-kicker {
    display: inline-block; margin-bottom: 20px; padding: 6px 20px; border-radius: 999px;
    background: rgba(185, 138, 78, .92); color: #fff; font-family: var(--f-head); font-weight: 700; font-size: .92rem;
}
#hero .hero-title {
    color: #fff; font-size: clamp(2rem, 1.1rem + 3.1vw, 3.4rem); font-weight: 800; line-height: 1.3; letter-spacing: -.01em;
    margin: 0 0 18px; padding: 0; text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
#hero .hero-title__hot { color: #f2c98c; background: none; padding: 0; }
#hero .hero-lead { max-width: 640px; margin: 0 auto 36px; color: rgba(255, 255, 255, .9); font-size: clamp(1rem, .95rem + .3vw, 1.15rem); }

.hero-search { max-width: 920px; margin-inline: auto; text-align: start; }
.hero-tabs { display: flex; gap: 6px; padding-inline: 16px; }
.hero-tab {
    padding: 12px 28px; border: 0; cursor: pointer;
    border-radius: 18px 18px 0 0;
    background: rgba(15, 76, 92, .88); color: rgba(255, 255, 255, .85);
    font-family: var(--f-head); font-weight: 700; font-size: .98rem;
    backdrop-filter: blur(6px); transition: background var(--ease), color var(--ease);
}
.hero-tab:hover { color: #fff; }
.hero-tab.is-active { background: #fff; color: var(--c-primary); }
.hero-panel {
    background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.hero-tabs + .hero-panel { border-start-start-radius: 22px; }
.hero-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 14px; align-items: end; }
.hero-field { display: grid; gap: 6px; min-width: 0; }
.hero-field > span { font-size: .82rem; font-weight: 600; color: var(--c-text-soft); }
.hero-field select, .hero-field input {
    width: 100%; height: 52px; padding: 0 14px; background: #fff; color: var(--c-text);
    border: 1px solid var(--c-line); border-radius: 14px; font-size: 1rem;
}
.hero-field select:focus, .hero-field input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-50); }
.hero-form__btn { height: 52px; border-radius: 14px; padding-inline: 36px; }
.hero-request { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-request .btn { border-radius: 14px; padding-block: 15px; }

@media (max-width: 860px) {
    .hero-form { grid-template-columns: 1fr 1fr; }
    .hero-form__btn { grid-column: 1 / -1; }
    .hero-request { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .hero-form { grid-template-columns: 1fr; }
    .hero-tab { flex: 1; padding-inline: 10px; font-size: .9rem; }
    .hero-tabs { padding-inline: 8px; }
}

/* ---------- Quick actions (overlaps hero) ---------- */
.quick { position: relative; z-index: 2; margin-top: -92px; padding-bottom: var(--space-section); background: var(--c-bg); }
.quick::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 92px; background: transparent; }
.quick__panel {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg);
    padding: 28px; box-shadow: var(--shadow-md); position: relative; top: 0;
}
.quick__title { font-size: 1.25rem; font-weight: 800; margin: 0 0 20px; }
.quick__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.qa {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
    min-height: 124px; padding: 18px 14px; cursor: pointer; text-decoration: none;
    background: #fff; color: var(--c-text); border: 1px solid var(--c-line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); font-family: var(--f-head); font-weight: 700; font-size: .98rem; line-height: 1.4;
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.qa:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d8d3c6; color: var(--c-text); }
.qa__ico { display: grid; place-items: center; color: var(--c-gold); }
.qa--primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.qa--primary:hover { color: #fff; background: var(--c-primary-600); }
.qa--primary .qa__ico { color: #fff; }
@media (max-width: 860px) { .quick__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .quick__panel { padding: 20px; } .qa { min-height: 104px; } }

/* ---------- WhatsApp tile ---------- */
.qa--wa { background: #1faa59; border-color: #1faa59; color: #fff; }
.qa--wa .qa__ico { color: #fff; }
.qa--wa:hover { background: #178f49; border-color: #178f49; color: #fff; }

/* ---------- Modals: backdrop + stacking (Tailwind v2 has no bg-black/60 or z-[...]) ---------- */
#madinaOverlay, #hajjOverlay, #privateOverlay, #requestOverlay, #requestOfferOverlay, #requestDetailsModal, #offerModal {
    z-index: 200; background: rgba(10, 24, 30, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
#successPopup { z-index: 300; background: rgba(10, 24, 30, .62); backdrop-filter: blur(4px); }
#requestDetailsModal > div, #offerModal > div { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
#requestDetailsModal h3, #offerModal h3 { color: var(--c-primary) !important; font-family: var(--f-head); }
#offerModal #closeOfferModal, #requestDetailsModal button[id*="lose"] { cursor: pointer; }

/* ---------- Spacing ---------- */
.quick { margin-top: -80px; padding-bottom: 28px; }
.section__head, body .offers-header, body .requests-header { margin-bottom: 24px; }
body .offers-subsection-title, body .requests-subsection-title { margin: 0 0 12px; }
body .offers-carousel, body .requests-carousel { padding-bottom: 0; }
body .offers-track, body .requests-track { padding-bottom: 8px; }
.tabs { margin-bottom: 20px; }

/* ---------- Empty states ---------- */
body #hotelEmptyState, body #hajjEmptyState, body #roomRequestsEmptyState, body #hajjRequestsEmptyState, body #requestsEmptyState {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    max-width: 560px; margin: 8px auto 0 !important; padding: 36px 24px;
    background: var(--c-surface); border: 1px dashed #d6d1c4; border-radius: var(--radius-lg);
    color: var(--c-text-soft) !important; font-size: 1rem;
}
[id$="EmptyState"]::before {
    content: ''; width: 52px; height: 52px; border-radius: 50%;
    background: var(--c-primary-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f4c5c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21V8l9-5 9 5v13M9 21v-6h6v6'/%3E%3C/svg%3E") center / 26px no-repeat;
}
body [id$="EmptyState"].hidden { display: none; }
/* nothing to filter yet -> hide the filter row and counter instead of showing "0" */
.tab-panel:not(:has(.offer-card)):not(:has(.request-card)) .offers-filter,
.tab-panel:not(:has(.offer-card)):not(:has(.request-card)) .requests-filter,
.tab-panel:not(:has(.offer-card)):not(:has(.request-card)) .offers-count,
.tab-panel:not(:has(.offer-card)):not(:has(.request-card)) .requests-count,
.tab-panel:not(:has(.offer-card)):not(:has(.request-card)) .offers-carousel,
.tab-panel:not(:has(.offer-card)):not(:has(.request-card)) .requests-carousel { display: none; }
[data-overlay="modal"] h2, #requestDetailsModal h3 { color: var(--c-primary) !important; }
@media (max-width: 640px) {
    body #hotelEmptyState, body #hajjEmptyState, body #roomRequestsEmptyState, body #hajjRequestsEmptyState, body #requestsEmptyState { width: calc(100% - 40px); }
}

/* ==========================================================================
   Modals — proper centering, bounded height, internal scroll
   (the old h-[80vh]/sm:items-center classes aren't generated by Tailwind v2,
   so tall forms were clipped at the top and bottom)
   ========================================================================== */
#madinaOverlay, #hajjOverlay, #privateOverlay, #requestOverlay, #requestOfferOverlay {
    align-items: flex-start !important; justify-content: center !important;
    padding: 20px 16px !important; overflow-y: auto; overscroll-behavior: contain;
}
#madinaOverlay > div, #hajjOverlay > div, #privateOverlay > div, #requestOverlay > div, #requestOfferOverlay > div {
    height: auto !important; min-height: 0 !important;
    max-height: calc(100vh - 40px) !important; max-height: calc(100dvh - 40px) !important;
    width: 100% !important; max-width: 520px !important;
    margin: auto !important;
    padding: 28px 28px 24px !important;
    overflow-y: auto !important;
    background: #fff; border-radius: var(--radius-lg) !important; box-shadow: 0 30px 80px rgba(0, 0, 0, .35) !important;
    animation: modalIn .22s ease both;
}
#madinaOverlay.hidden > div, #hajjOverlay.hidden > div, #privateOverlay.hidden > div, #requestOverlay.hidden > div, #requestOfferOverlay.hidden > div { animation: none; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* close button: neutral, stays visible while the form scrolls */
[data-modal-close], #closeRequestOverlay, #closeRequestOfferForm, #privateOverlay > div > button:first-child {
    position: sticky !important; top: 0 !important; inset-inline: auto !important; right: auto !important; left: auto !important;
    float: inline-start; margin: -8px 0 -36px !important; z-index: 5;
    width: 36px !important; height: 36px !important; padding: 0; line-height: 1;
    display: inline-flex !important; align-items: center; justify-content: center;
    background: var(--c-bg-soft) !important; color: var(--c-text) !important; border: 1px solid var(--c-line); border-radius: 50% !important;
    font-size: 22px !important; cursor: pointer; transition: background var(--ease);
}
[data-modal-close]:hover, #closeRequestOverlay:hover, #closeRequestOfferForm:hover, #privateOverlay > div > button:first-child:hover { background: #e9e4d8 !important; }

#madinaOverlay h2, #hajjOverlay h2, #privateOverlay h2, #requestOverlay h2, #requestOfferOverlay h2 {
    font-size: 1.4rem !important; font-weight: 800; margin: 0 0 20px !important; padding-inline: 44px; text-align: center;
}
[data-overlay="modal"] label { font-size: .9rem; font-weight: 600; color: var(--c-text); }
[data-overlay="modal"] form > div, [data-overlay="modal"] form .space-y-4 > * { margin-bottom: 0; }
[data-overlay="modal"] input:not([type="checkbox"]):not([type="radio"]),
[data-overlay="modal"] select, [data-overlay="modal"] textarea { padding: 10px 14px; min-height: 46px; font-size: 1rem; }
[data-overlay="modal"] textarea { min-height: 110px; }
[data-overlay="modal"] button[type="submit"], [data-overlay="modal"] [id$="NextStep"], [data-overlay="modal"] [id$="PrevStep"] {
    border-radius: 999px !important; padding: 11px 26px !important; font-family: var(--f-head); font-weight: 700; cursor: pointer;
}
[data-overlay="modal"] button[type="submit"] { background: var(--c-primary) !important; color: #fff !important; }
[data-overlay="modal"] button[type="submit"]:hover { background: var(--c-primary-600) !important; }

/* details dialogs */
#requestDetailsModal, #offerModal { padding: 16px; overflow-y: auto; }
#requestDetailsModal > div, #offerModal > div {
    max-height: calc(100dvh - 32px); overflow-y: auto; margin: auto; animation: modalIn .22s ease both;
}
@media (max-width: 520px) {
    #madinaOverlay > div, #hajjOverlay > div, #privateOverlay > div, #requestOverlay > div, #requestOfferOverlay > div { padding: 22px 18px 20px !important; }
}

/* ==========================================================================
   Offer cards — tidy v3
   ========================================================================== */
body .offer-card, body .request-card { min-width: 0; }
body .offer-card__body { padding: 22px; gap: 0; }
body .offer-card__title { margin-bottom: 14px; }
body .card-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 18px; }
body .card-facts div { padding: 0; }
body .card-facts dd { overflow-wrap: anywhere; }
body .offer-card__actions, body .request-card__actions { gap: 10px; align-items: stretch; }
body .offer-card__cta, body .request-card__cta { min-height: 44px; }
/* copy = small ghost pill with a text label (JS swaps the label to "تم النسخ") */
body .offer-card__copy, body .request-card__copy {
    width: auto; height: auto; min-height: 44px; padding: 0 14px; gap: 6px; border-radius: 999px; overflow: visible;
    font-size: .85rem; font-weight: 600; white-space: nowrap; flex: none;
}
body .offer-card__copy .sr-only, body .request-card__copy .sr-only {
    position: static; width: auto; height: auto; clip: auto; overflow: visible; white-space: nowrap;
}
body .offer-card__copy[data-original-text] { color: var(--c-success); border-color: #bfe3cb; background: #f0faf3; }

/* ---------- Details dialogs (offer + request) ---------- */
.detail-title { font-family: var(--f-head); font-size: 1.35rem; font-weight: 800; color: var(--c-primary); margin: 0 0 14px; padding-inline-end: 40px; line-height: 1.4; }
.detail-list { display: grid; margin-bottom: 20px; }
.detail-row, #requestDetailsModal .detail-dialog > p {
    display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
    margin: 0; padding: 11px 0; border-bottom: 1px solid var(--c-line); font-size: .95rem;
}
.detail-row span, #requestDetailsModal .detail-dialog > p > strong { color: var(--c-text-soft); font-weight: 500; flex: none; }
.detail-row strong, #requestDetailsModal .detail-dialog > p > span { color: var(--c-text); font-weight: 600; text-align: end; overflow-wrap: anywhere; }
.detail-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.detail-actions .btn, #requestDetailsModal .detail-dialog #openRequestOfferForm { min-height: 46px; }
#requestDetailsModal .detail-dialog #openRequestOfferForm { margin-top: 18px; width: 100%; justify-content: center; display: flex; align-items: center; }
#offerModal > div, #requestDetailsModal > div { padding: 28px !important; border-radius: var(--radius-lg) !important; max-width: 520px !important; width: 100%; }
#closeOfferModal, #closeRequestDetails {
    position: absolute; top: 16px; inset-inline-end: 16px; right: auto; left: auto; width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--c-bg-soft); border: 1px solid var(--c-line); color: var(--c-text); font-size: 14px; box-shadow: none; cursor: pointer;
}
[dir="rtl"] #closeOfferModal, [dir="rtl"] #closeRequestDetails { left: 16px; right: auto; }
[dir="ltr"] #closeOfferModal, [dir="ltr"] #closeRequestDetails { right: 16px; left: auto; }
#closeOfferModal:hover, #closeRequestDetails:hover { background: #e9e4d8; }
/* the id-based empty-state rule above must not defeat the .hidden toggle used by the filters' JS */
body #hotelEmptyState.hidden, body #hajjEmptyState.hidden, body #roomRequestsEmptyState.hidden, body #hajjRequestsEmptyState.hidden, body #requestsEmptyState.hidden { display: none; }

/* long free-text cities must not blow up the chip */
.card-chip { min-width: 0; }
.card-chip > span { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-chip em { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-ico { flex: none; }
body .offer-card__title, body .request-card__title { overflow-wrap: anywhere; }

/* ---------- Share sheet ---------- */
.share {
    position: fixed; inset: 0; z-index: 250; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(10, 24, 30, .62); backdrop-filter: blur(4px);
}
.share.hidden { display: none; }
.share__panel {
    width: 100%; max-width: 440px; background: #fff; border-radius: var(--radius-lg); padding: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: modalIn .22s ease both;
}
.share__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.share__head h3 { font-size: 1.25rem; font-weight: 800; margin: 0; }
.share__close {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-bg-soft);
    font-size: 22px; line-height: 1; cursor: pointer; color: var(--c-text);
}
.share__close:hover { background: #e9e4d8; }
.share__item-title { color: var(--c-text-soft); margin: 0 0 16px; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share__link { display: flex; gap: 8px; margin-bottom: 20px; }
.share__link input {
    flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--c-line); border-radius: 999px;
    background: var(--c-bg); color: var(--c-text-soft); font-size: .88rem;
}
.share__link .btn { min-width: 104px; border-radius: 999px; }
.share__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.share__opt {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; cursor: pointer;
    border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; color: var(--c-text);
    font-size: .88rem; font-weight: 600; text-decoration: none; font-family: inherit;
    transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.share__opt:hover { border-color: #d0cbbd; box-shadow: var(--shadow-sm); transform: translateY(-2px); color: var(--c-text); }
.share__opt[hidden] { display: none; }
.share__opt > span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.15rem; }
.share__opt--wa > span { background: #1faa59; }
.share__opt--tg > span { background: #2a9fd8; }
.share__opt--fb > span { background: #1877f2; font-family: Georgia, serif; }
.share__opt--x > span { background: #111; }
.share__opt--mail > span { background: var(--c-gold); }
.share__opt--more > span { background: var(--c-text-soft); }
@media (max-width: 520px) {
    .share { align-items: flex-end; padding: 0; }
    .share__panel { max-width: none; border-radius: 24px 24px 0 0; padding: 22px 18px 28px; }
}

/* ---------- Brand wordmark ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-text); }
.brand:hover { color: var(--c-text); }
.brand__mark {
    width: 38px; height: 38px; display: grid; place-items: center; flex: none;
    background: var(--c-primary); color: #fff; border-radius: 12px; border-end-end-radius: 4px;
    box-shadow: 0 4px 12px rgba(15, 76, 92, .28);
}
.brand__text { display: inline-flex; align-items: baseline; font-family: var(--f-head); font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; line-height: 1; }
.brand__wifi { color: var(--c-primary); }
.brand__room { color: var(--c-gold); }
.brand__tld {
    margin-inline-start: 3px; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--c-text-soft); border: 1px solid var(--c-line); border-radius: 999px; padding: 3px 7px; align-self: center; line-height: 1;
}
.site-footer .brand, .site-footer .brand:hover { color: #fff; }
.site-footer .brand__mark { background: #fff; color: var(--c-primary); box-shadow: none; }
.site-footer .brand__wifi { color: #fff; }
.site-footer .brand__room { color: #e0b57a; }
.site-footer .brand__tld { color: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .25); }
@media (max-width: 380px) { .brand__tld { display: none; } }
