/*
 * assets/css/site-shared.css
 * Shared styles for the public site navbar, footer, and common UI.
 * Included by all public-facing pages.
 */

:root {
  --yellow: #FFD700;
  --yellow-dark: #E6C200;
  --yellow-light: #FFF4B8;
  --charcoal: #1E293B;
  --charcoal-dark: #0F172A;
  --white: #FFFFFF;
  --muted: #64748B;
  --line: #E2E8F0;
  --surface: #F8FAFC;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .12);
  --transition-fast: 0.18s ease;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--charcoal);
  background: #ffffff;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── RTL overrides ── */
body.rtl .ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

body.rtl .me-auto {
  margin-left: auto !important;
  margin-right: 0 !important;
}

body.rtl .text-start {
  text-align: right !important;
}

body.rtl .text-end {
  text-align: left !important;
}

body.rtl .me-1 {
  margin-left: .25rem !important;
  margin-right: 0 !important;
}

body.rtl .me-2 {
  margin-left: .5rem !important;
  margin-right: 0 !important;
}

body.rtl .ms-1 {
  margin-right: .25rem !important;
  margin-left: 0 !important;
}

body.rtl .ms-2 {
  margin-right: .5rem !important;
  margin-left: 0 !important;
}

/* ── Buttons ── */
.btn {
  padding: .6rem 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  letter-spacing: .2px;
}

.btn-primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--charcoal);
}

.btn-primary:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-dark {
  border: 2px solid rgba(30, 41, 59, .25);
  color: var(--charcoal);
}

.btn-outline-dark:hover {
  background: var(--charcoal);
  color: white;
  border-color: var(--charcoal);
}

/* ── Language bits ── */
[lang="ar"] .english-only,
[lang="en"] .arabic-only {
  display: none !important;
}

.arabic-only,
.english-only {
  display: inline-block;
}

.btn-lang {
  background: var(--yellow);
  border: none;
  padding: .4rem .5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--charcoal);
  box-shadow: var(--shadow);
  display: inline-block;
}

.btn-lang:hover {
  background: var(--yellow-dark);
  color: var(--charcoal);
}

.lang-toggle {
  margin-left: .5rem;
}

body.rtl .lang-toggle {
  margin-left: 0;
  margin-right: 1rem;
}

/* ── Brand ── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
}

.brand-logo {
  width: 100px;
  height: 100px;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 991px) {
  .brand-logo {
    width: 60px;
    height: 60px;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  height: 60px;
  width: auto;
}

.main-footer .footer-logo img {
  height: 60px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
}

.footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.footer-partners {
  border-left: 1px solid var(--line);
  padding-left: .75rem;
}

.footer-partners-label {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1;
  margin-bottom: .4rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.footer-partners-logos {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.footer-partner-logo {
  width: 100px;
  height: 100px;
}

.footer-partner-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-partner-logo--parkers {
  width: 100px;
}

/* Keep the three brand marks in one lockup on the public-site footer. */
.main-footer .footer-brand-lockup {
  flex-wrap: nowrap;
}

.main-footer .footer-partners-logos {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

.main-footer .footer-partner-logo {
  flex: 0 0 100px;
}

/* ── Country selector ── */
.country-selector {
  position: relative;
}

.country-dropdown-btn {
  background: var(--yellow-light);
  border: none;
  padding: .4rem .8rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-dropdown-btn:hover {
  background: var(--yellow);
  transform: translateY(-1px);
}

.country-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 1100;
  display: none;
  border: 1px solid var(--line);
  overflow: hidden;
  animation: fadeInDown .2s ease;
}

body.rtl .country-dropdown-menu {
  right: auto;
  left: 0;
}

.country-dropdown-menu.show {
  display: block;
}

.country-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  text-decoration: none;
  color: var(--charcoal);
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--line);
}

.country-dropdown-item:last-child {
  border-bottom: none;
}

.country-dropdown-item:hover {
  background: var(--yellow-light);
}

.country-dropdown-item.active {
  background: var(--yellow);
  font-weight: 600;
}

.country-flag {
  font-size: 1.3rem;
}

/* ── Header ── */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

/* ── Nav dropdowns ── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  background: none;
  border: none;
  padding: .4rem .6rem;
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: inherit;
  white-space: nowrap;
}

.nav-dropdown-btn:hover {
  background: var(--yellow-light);
}

.nav-dropdown-btn i.bi-chevron-down {
  font-size: .65rem;
  transition: transform var(--transition-fast);
}

.nav-dropdown.open .nav-dropdown-btn i.bi-chevron-down {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  z-index: 1100;
  display: none;
  border: 1px solid var(--line);
  overflow: hidden;
}

body.rtl .nav-dropdown-menu {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

.nav-dropdown-menu.show {
  display: block;
  animation: fadeInDown .2s ease;
}

.nav-dropdown-group-label {
  padding: .65rem 1rem .35rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .7rem 1rem;
  text-decoration: none;
  color: var(--charcoal);
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  font-size: .92rem;
}

.nav-dropdown-item:last-child {
  border-bottom: none;
}

.nav-dropdown-item:hover {
  background: var(--yellow-light);
}

.nav-dropdown-item i {
  font-size: 1.1rem;
  color: var(--muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-dropdown-item:hover i {
  color: var(--charcoal);
}

/* ── Mobile menu ── */
.mobile-menu {
  display: none;
  background: white;
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}

.mobile-menu a {
  display: block;
  padding: .8rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  color: var(--charcoal);
  user-select: none;
}

.mobile-dropdown-toggle:hover {
  background: var(--surface);
}

.mobile-dropdown-toggle i.bi-chevron-down {
  font-size: .75rem;
  transition: transform var(--transition-fast);
}

.mobile-dropdown-toggle.open i.bi-chevron-down {
  transform: rotate(180deg);
}

.mobile-dropdown-content {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.mobile-dropdown-content.show {
  display: block;
}

.mobile-dropdown-content a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .65rem 1rem .65rem 2rem;
  font-weight: 500;
  font-size: .9rem;
  color: var(--charcoal);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

body.rtl .mobile-dropdown-content a {
  padding: .65rem 2rem .65rem 1rem;
}

.mobile-dropdown-content a:last-child {
  border-bottom: none;
}

.mobile-dropdown-content a:hover {
  background: var(--yellow-light);
}

.mobile-dropdown-content a i {
  font-size: 1rem;
  color: var(--muted);
  width: 20px;
  text-align: center;
}

/* ── Footer ── */
.main-footer {
  background: rgba(255, 255, 255, .98);
  color: var(--charcoal);
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.footer-links-col {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-col li {
  margin-bottom: .55rem;
}

.footer-links-col a {
  color: var(--muted);
  font-size: .9rem;
  transition: color var(--transition-fast);
}

.footer-links-col a:hover {
  color: var(--charcoal);
}

.footer-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  transition: all .2s;
}

.footer-social-btn:hover {
  background: var(--yellow);
  color: var(--charcoal) !important;
}

.footer-country-selector .country-dropdown-btn {
  background: transparent;
  border: 1px solid rgba(30, 41, 59, .2);
  max-width: 180px;
}

.footer-country-selector .country-dropdown-btn:hover {
  background: var(--yellow-light);
}

/* ── Page header (used across inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
  color: var(--charcoal);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1497366216548-37526070297c?w=1920&q=60') center/cover no-repeat;
  opacity: .07;
  pointer-events: none;
}

.page-hero>.container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-weight: 800;
}

.page-hero .breadcrumb-item+.breadcrumb-item::before {
  color: rgba(30, 41, 59, .5);
}

/* ── Content card (used in policy / story pages) ── */
.content-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .content-card {
    padding: 1.5rem;
  }
}

.highlight-box {
  background: rgba(255, 215, 0, .1);
  border-left: 4px solid var(--yellow);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

body.rtl .highlight-box {
  border-left: none;
  border-right: 4px solid var(--yellow);
}

/* ── Section spacing ── */
.section {
  padding: 4.5rem 0;
}

@media (max-width: 768px) {
  .section {
    padding: 2.75rem 0;
  }
}

/* ── Scroll margin for sticky header ── */
section[id],
div[id] {
  scroll-margin-top: 80px;
}

/* ── Animations ── */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
