/* ==========================================================================
   AqarSyriaNI - Ultra-Compact & Clean Footer Styles
   Inspired by Bayut, Property Finder, Zillow, Rightmove & Idealista
   Optimized for 3G Networks (Pure CSS & SVG, No Heavy Borders/Boxes)
   Full RTL & LTR Bi-directional Support using CSS Logical Properties
   ========================================================================== */

:root {
  --aqar-footer-bg: #0f1c17;           /* Deep elegant charcoal emerald */
  --aqar-footer-surface: #14251f;      /* Subtle elevated surface */
  --aqar-footer-border: #1f372e;       /* Ultra-thin hairline border */
  --aqar-footer-text: #c0cfca;         /* High readability soft muted text */
  --aqar-footer-title: #ffffff;        /* Crisp white titles */
  --aqar-footer-link-hover: #e8b67b;   /* Warm Damascus amber highlight */
  --aqar-primary: #0d5c46;
  --aqar-accent: #c68a4c;
  --aqar-radius: 8px;
  --aqar-transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --aqar-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Cairo", "Tahoma", sans-serif;
}

/* Footer Container */
.aqar-footer {
  background-color: var(--aqar-footer-bg);
  color: var(--aqar-footer-text);
  font-family: var(--aqar-font-family);
  direction: inherit;
  border-top: 1px solid var(--aqar-footer-border);
  box-sizing: border-box;
  font-size: 13.5px;
  line-height: 1.5;
  position: relative;
  z-index: 10;
}

.aqar-footer *,
.aqar-footer *::before,
.aqar-footer *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.aqar-footer-container {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ── 2. Middle Compact Grid (شبكة وسطى مضغوطة 4 أعمدة) ── */
.aqar-footer-main {
  padding-block: 40px 32px;
  border-bottom: 1px solid var(--aqar-footer-border);
}

.aqar-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

/* Column 1: Brand & Bio & Direct Contacts */
.aqar-footer-col-brand {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  align-items: flex-start !important;
  text-align: start !important;
}

[dir="rtl"] .aqar-footer-col-brand,
html[dir="rtl"] .aqar-footer-col-brand {
  align-items: flex-start !important;
  text-align: right !important;
}

[dir="ltr"] .aqar-footer-col-brand,
html[dir="ltr"] .aqar-footer-col-brand {
  align-items: flex-start !important;
  text-align: left !important;
}

.aqar-footer-brand-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important; /* flex items-center gap-3 */
  text-decoration: none !important;
  color: var(--aqar-footer-title) !important;
  width: fit-content !important;
  align-self: flex-start !important;
}

[dir="rtl"] .aqar-footer-brand-link,
html[dir="rtl"] .aqar-footer-brand-link {
  flex-direction: row !important;
  justify-content: flex-start !important;
  text-align: right !important;
}

[dir="ltr"] .aqar-footer-brand-link,
html[dir="ltr"] .aqar-footer-brand-link {
  flex-direction: row !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

.aqar-footer-brand-link picture,
.aqar-footer-brand-picture {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.aqar-footer-brand-link picture img,
.aqar-footer-brand-link img {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  background: transparent !important;
  border: none !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.aqar-footer-brand-title {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: inline-block !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.aqar-footer-brand-title span {
  color: var(--aqar-accent) !important;
}

.aqar-footer-bio {
  font-size: 13.5px !important;
  color: #9cb2aa !important;
  max-width: 320px !important;
  line-height: 1.6 !important;
  text-align: start !important;
  margin: 0 !important;
  margin-inline-end: auto !important;
  margin-inline-start: 0 !important;
}

[dir="rtl"] .aqar-footer-bio,
html[dir="rtl"] .aqar-footer-bio {
  text-align: right !important;
}

[dir="ltr"] .aqar-footer-bio,
html[dir="ltr"] .aqar-footer-bio {
  text-align: left !important;
}

/* Compact Contact Round Buttons (34px) */
.aqar-footer-contacts-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 4px !important;
  width: 100% !important;
}

[dir="rtl"] .aqar-footer-contacts-row,
html[dir="rtl"] .aqar-footer-contacts-row {
  justify-content: flex-start !important;
}

[dir="ltr"] .aqar-footer-contacts-row,
html[dir="ltr"] .aqar-footer-contacts-row {
  justify-content: flex-start !important;
}

/* Nav Columns (Columns 2, 3, 4) */
.aqar-footer-col {
  display: flex;
  flex-direction: column;
}

.aqar-footer-heading {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--aqar-footer-title);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aqar-footer-heading-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  padding: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
}

.aqar-footer-heading-icon {
  display: none;
}

.aqar-footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 0;
  margin: 0;
}

.aqar-footer-nav-link {
  color: var(--aqar-footer-text);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.5;
  transition: color var(--aqar-transition), transform var(--aqar-transition);
  display: inline-block;
  width: fit-content;
}

.aqar-footer-nav-link:hover {
  color: var(--aqar-footer-link-hover);
  transform: translateX(-2px);
}

[dir="ltr"] .aqar-footer-nav-link:hover {
  transform: translateX(2px);
}

/* ── 3. Slim Single-Row Utility Bar (شريط سفلي نحيف ونظيف بعبارة الحقوق فقط) ── */
.aqar-footer-utility {
  border-top: 1px solid var(--aqar-footer-border);
  background-color: rgba(12, 23, 19, 0.95);
  padding-block: 16px;
  font-size: 12.5px;
}

.aqar-utility-container {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.aqar-copyright {
  color: #70877f;
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

/* ── 4. Fixed Mobile Bottom Nav (شريط الموبايل السفلي الثابت - 56px) ── */
.aqar-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  height: 56px;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e2e8e5;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  z-index: 1050;
  align-items: center;
  justify-content: space-around;
  padding-inline: 8px;
}

/* Dark theme / footer match or clean app view */
.aqar-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: #5e726b;
  font-size: 10.5px;
  font-weight: 600;
  height: 100%;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--aqar-transition);
  -webkit-tap-highlight-color: transparent;
}

.aqar-bottom-nav-item:hover,
.aqar-bottom-nav-item.active {
  color: var(--aqar-primary);
}

.aqar-bottom-nav-item svg {
  width: 20px;
  height: 20px;
}

/* Center Elevated "Add Property" button */
.aqar-bottom-nav-center {
  position: relative;
  top: -10px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aqar-accent) 0%, #a86c32 100%);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(198, 138, 76, 0.45);
  border: 3px solid #ffffff;
  transition: transform var(--aqar-transition);
  text-decoration: none;
  flex-shrink: 0;
}

.aqar-bottom-nav-center:active {
  transform: scale(0.92);
}

.aqar-bottom-nav-center svg {
  width: 22px;
  height: 22px;
}

/* ── Responsive Mobile Breakpoints ── */
@media (max-width: 900px) {
  .aqar-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  /* Provide bottom padding so fixed 56px bottom bar doesn't overlay content */
  body {
    padding-bottom: 56px;
  }

  .aqar-bottom-nav {
    display: flex;
  }

  .aqar-footer-main {
    padding-block: 20px 16px;
  }

  .aqar-footer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Transform Columns 2, 3, 4 into slim single-row accordions */
  .aqar-footer-col:not(.aqar-footer-col-brand) {
    border-bottom: 1px solid var(--aqar-footer-border);
    padding-bottom: 10px;
  }

  .aqar-footer-heading-btn {
    cursor: pointer;
    padding-block: 4px;
  }

  .aqar-footer-heading-icon {
    display: block;
    width: 14px;
    height: 14px;
    color: #8fa79f;
    transition: transform var(--aqar-transition);
  }

  .aqar-footer-col.is-open .aqar-footer-heading-icon {
    transform: rotate(180deg);
  }

  .aqar-footer-col:not(.aqar-footer-col-brand) .aqar-footer-nav-list {
    display: none;
    padding-top: 8px;
    padding-inline-start: 4px;
  }

  .aqar-footer-col.is-open .aqar-footer-nav-list {
    display: flex;
  }

  .aqar-utility-container {
    justify-content: center;
    text-align: center;
  }
}
