/* MauriPages - Global styles */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  --brand-yellow: #FFD400;
  --brand-yellow-dark: #E6BE00;
  --brand-yellow-soft: #FFF6BF;
  --brand-navy: #0B2545;
  --brand-navy-light: #1B3A6B;
  --muted: #F4F5F7;
  --border: #E5E7EB;
  --text-soft: #6B7280;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--brand-navy);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

/* Search keyword highlight */
mark.mp-hl {
  background: var(--brand-yellow-soft);
  color: var(--brand-navy);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}

[dir="rtl"] body {
  font-family: 'Cairo', 'Inter', system-ui, sans-serif;
}

/* ---------- Autocomplete suggestion dropdown ---------- */
.mp-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px -10px rgba(11, 37, 69, 0.18);
  max-height: 360px;
  overflow-y: auto;
  z-index: 50;
  padding: 6px;
}
.mp-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  text-align: start;
  width: 100%;
  border: none;
  background: transparent;
}
.mp-suggest-item:hover,
.mp-suggest-item.is-active {
  background: var(--muted);
}
.mp-suggest-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--muted) center/cover no-repeat;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
}
.mp-suggest-title { font-weight: 600; color: var(--brand-navy); font-size: 0.9rem; }
.mp-suggest-sub { color: var(--text-soft); font-size: 0.78rem; }
.mp-suggest-empty { padding: 14px; text-align: center; color: var(--text-soft); font-size: 0.85rem; }


/* ---------- RTL spacing flips ---------- */
[dir="rtl"] .rtl-flip {
  transform: scaleX(-1);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.65rem 1.25rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-yellow);
  color: var(--brand-navy);
}
.btn-primary:hover {
  background: var(--brand-yellow-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(255, 212, 0, 0.6);
}
.btn-navy {
  background: var(--brand-navy);
  color: #fff;
}
.btn-navy:hover {
  background: var(--brand-navy-light);
}
.btn-outline {
  background: #fff;
  color: var(--brand-navy);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--brand-navy);
}
.btn-ghost {
  background: transparent;
  color: var(--brand-navy);
}
.btn-ghost:hover {
  background: var(--muted);
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  transition: all 0.25s ease;
}
.card:hover {
  border-color: transparent;
  box-shadow: 0 18px 40px -22px rgba(11, 37, 69, 0.25);
  transform: translateY(-2px);
}

/* ---------- Inputs ---------- */
.input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--brand-navy);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus {
  border-color: var(--brand-yellow);
  box-shadow: 0 0 0 4px rgba(255, 212, 0, 0.18);
}

/* ---------- Sections ---------- */
.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .section { padding-top: 6rem; padding-bottom: 6rem; }
}

/* ---------- Loading skeletons ---------- */
.skeleton {
  background: linear-gradient(90deg, #f1f3f5 25%, #e9ecef 37%, #f1f3f5 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: 0.5rem;
}
@keyframes skeleton {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- Stars ---------- */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--brand-yellow);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--brand-navy);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  z-index: 100;
  font-weight: 500;
  transition: transform 0.3s ease;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.3);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: #b91c1c; }
.toast.success { background: #047857; }

/* ---------- Custom scroll ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f3f5; }
::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }

/* ---------- Hero gradient ---------- */
.hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 212, 0, 0.18) 0%, rgba(255, 212, 0, 0) 60%),
    linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

/* ---------- Avatar / chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--muted);
  color: var(--brand-navy);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
}
.chip-yellow {
  background: var(--brand-yellow-soft);
  color: var(--brand-navy);
}

/* ---------- Tabs ---------- */
.tab-btn {
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn.active {
  color: var(--brand-navy);
  border-bottom-color: var(--brand-yellow);
}
.tab-btn:hover { color: var(--brand-navy); }

.mp-tab {
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.mp-tab:hover { color: var(--brand-navy); background: var(--muted); }
.mp-tab-active {
  color: var(--brand-navy);
  border-bottom-color: var(--brand-yellow);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.chip-gray {
  background: var(--muted);
  color: var(--brand-navy);
}

.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { scrollbar-width: none; }

.shadow-card { box-shadow: 0 8px 24px -12px rgba(11, 37, 69, 0.12); }
.shadow-glow { box-shadow: 0 0 40px rgba(255, 212, 0, 0.35); }


/* ---------- Map height ---------- */
.map-frame {
  width: 100%;
  height: 420px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ---------- Mobile bottom sheet ---------- */
.bottom-sheet {
  position: fixed;
  inset: 0;
  background: rgba(11, 37, 69, 0.45);
  display: none;
  z-index: 60;
}
.bottom-sheet.open { display: block; }
.bottom-sheet-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 1.25rem;
  max-height: 85vh;
  overflow-y: auto;
}

/* ---------- Animations ---------- */
.fade-in { animation: fadeIn 0.4s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Utility helpers ---------- */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Focus ring for accessibility ---------- */
*:focus-visible {
  outline: 2px solid var(--brand-yellow);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- RTL polishing ---------- */
[dir="rtl"] .chip svg,
[dir="rtl"] .btn svg { transform: scaleX(-1); }
[dir="rtl"] .translate-review-btn svg,
[dir="rtl"] .lang-opt svg { transform: none; }
[dir="rtl"] input[type="text"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="search"],
[dir="rtl"] input[type="url"],
[dir="rtl"] textarea { text-align: right; }
[dir="rtl"] .border-l-4 { border-left-width: 0; border-right-width: 4px; }
[dir="rtl"] .border-l-2 { border-left-width: 0; border-right-width: 2px; }
[dir="rtl"] .pl-4 { padding-left: 0; padding-right: 1rem; }
[dir="rtl"] .rounded-br-sm { border-bottom-right-radius: 1rem; border-bottom-left-radius: 0.25rem; }
[dir="rtl"] .rounded-bl-sm { border-bottom-left-radius: 1rem; border-bottom-right-radius: 0.25rem; }
[dir="rtl"] .ltr-only { direction: ltr; text-align: left; unicode-bidi: isolate; }

/* Phone numbers always render LTR even inside an RTL document */
.phone-ltr { direction: ltr !important; unicode-bidi: embed; white-space: nowrap; }
[dir="rtl"] .phone-ltr { text-align: right; }

/* Leaflet controls in RTL */
[dir="rtl"] .leaflet-control-attribution { direction: ltr; }

/* ---------- Mobile polish ---------- */
@media (max-width: 640px) {
  .btn { padding: 0.6rem 1.05rem; font-size: 0.92rem; }
  .card { border-radius: 0.9rem; }
  .input { font-size: 16px; /* prevent iOS zoom on focus */ }
  h1 { line-height: 1.15; }
}

/* ---------- Collapsing search bar (mobile) ---------- */
.mp-searchbar-wrap {
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}
.mp-search-pill {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.5rem 0.75rem 0.5rem 0.6rem;
  box-shadow: 0 8px 24px -10px rgba(11, 37, 69, 0.18);
  cursor: pointer;
  width: fit-content;
  color: var(--brand-navy);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.25s ease;
}
.mp-search-pill svg { flex-shrink: 0; color: var(--brand-yellow-dark); }
.mp-search-pill:hover { box-shadow: 0 12px 30px -8px rgba(11, 37, 69, 0.25); }
@media (max-width: 767px) {
  .mp-searchbar-wrap.is-collapsed {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    background: transparent !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
  }
  .mp-searchbar-wrap.is-collapsed .mp-searchbar-inner { display: none !important; }
  .mp-searchbar-wrap.is-collapsed .mp-search-pill { display: inline-flex; }
}

/* ---------- Modern company-page search bar (back-to-search) ---------- */
.mp-company-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.45rem 0.55rem 0.45rem 0.85rem;
  box-shadow: 0 12px 30px -14px rgba(11, 37, 69, 0.18);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.mp-company-search:focus-within {
  border-color: var(--brand-yellow);
  box-shadow: 0 14px 36px -12px rgba(255, 212, 0, 0.35);
}
.mp-company-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--brand-navy);
  min-width: 0;
}
.mp-company-search input::placeholder { color: var(--text-soft); }
.mp-company-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: var(--brand-yellow);
  color: var(--brand-navy);
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.15s ease;
}
.mp-company-search-btn:hover { background: var(--brand-yellow-dark); transform: scale(1.05); }
[dir="rtl"] .mp-company-search { padding: 0.45rem 0.85rem 0.45rem 0.55rem; }

/* ---------- Sticky mobile bottom-action bar ---------- */
.mp-mobile-actions {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 0.6rem 1rem;
  display: none;
  gap: 0.5rem;
  z-index: 40;
  box-shadow: 0 -10px 25px -12px rgba(11, 37, 69, 0.15);
}
@media (max-width: 767px) {
  .mp-mobile-actions.show { display: flex; }
  .mp-mobile-actions.show ~ main { padding-bottom: 5rem; }
}

/* ---------- Print ---------- */
@media print {
  header, footer, .btn, .mp-mobile-actions { display: none !important; }
  .card { break-inside: avoid; box-shadow: none; }
}

