/**
 * ui_polish.css — Visual polish layer
 * ONLY spacing, shadows, radius, hover effects, image ratios
 * Does NOT change content, layout, or business logic
 */

/* ═══════════════════════════════════════════════════════
   1. CSS DESIGN TOKENS
═══════════════════════════════════════════════════════ */
:root {
  /* Spacing scale */
  --sp-1: 8px;
  --sp-2: 12px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;

  /* Card system */
  --card-radius: 16px;
  --card-padding: 16px;
  --card-shadow: 0 6px 20px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 12px 32px rgba(0,0,0,0.14);
  --card-transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* Image */
  --img-ratio: 4 / 3;

  /* Input */
  --input-height: 48px;
  --input-radius: 10px;
  --input-padding: 0 14px;
}

/* ═══════════════════════════════════════════════════════
   2. PROJECT CARDS
═══════════════════════════════════════════════════════ */
/* ── Project card v4: floating panel ── */
.project-card {
  transition: transform .25s ease, box-shadow .25s ease !important;
}
.project-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,.16) !important;
}
.project-card:hover .project-card__img {
  transform: scale(1.04) !important;
}

/* Grid gap */
.projects-grid {
  gap: 24px !important;
}

/* ═══════════════════════════════════════════════════════
   3. SECTOR CARDS
═══════════════════════════════════════════════════════ */
.sector-card {
  border-radius: var(--card-radius) !important;
  aspect-ratio: 4 / 3 !important;
  box-shadow: var(--card-shadow) !important;
  transition: var(--card-transition) !important;
}

.sector-card:hover {
  transform: translateY(-4px) scale(1.01) !important;
  box-shadow: var(--card-shadow-hover) !important;
}

/* Improved overlay */
.sector-card__overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.60) 0%,
    rgba(0,0,0,0.20) 50%,
    transparent 100%
  ) !important;
}

.sectors-grid {
  gap: 20px !important;
}

/* ═══════════════════════════════════════════════════════
   4. BUTTON SYSTEM
═══════════════════════════════════════════════════════ */
/* Primary gold buttons */
.btn-gold,
.ea-btn-gold,
a.btn.gold,
button.btn.gold {
  border-radius: 10px !important;
  padding: 0 24px !important;
  height: var(--input-height) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-gold:hover,
.ea-btn-gold:hover,
a.btn.gold:hover,
button.btn.gold:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(189,153,58,0.35) !important;
}

/* Secondary buttons */
.btn-outline,
.ea-btn,
a.btn:not(.gold),
button.btn:not(.gold) {
  border-radius: 10px !important;
  padding: 0 20px !important;
  font-size: 14px !important;
  transition: transform 0.2s ease, border-color 0.2s ease !important;
}

/* ═══════════════════════════════════════════════════════
   5. FORM INPUTS — UNIFIED
═══════════════════════════════════════════════════════ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
textarea,
select {
  height: var(--input-height);
  border-radius: var(--input-radius) !important;
  padding: var(--input-padding) !important;
  font-size: 14px;
  border: 1.5px solid #e2e8f0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  width: 100%;
  font-family: inherit;
}

textarea {
  height: auto !important;
  padding: 12px 14px !important;
  resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none !important;
  border-color: #bd993a !important;
  box-shadow: 0 0 0 3px rgba(189,153,58,0.15) !important;
}

/* ═══════════════════════════════════════════════════════
   6. WHATSAPP FLOATING BUTTON
═══════════════════════════════════════════════════════ */
.wa-float {
  position: fixed !important;
  bottom: 20px !important;
  right: 15px !important;
  z-index: 900 !important;
  width: 54px !important;
  height: 54px !important;
  border-radius: 50% !important;
  background: #25d366 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.wa-float:hover {
  transform: translateY(-3px) scale(1.06) !important;
  box-shadow: 0 8px 24px rgba(37,211,102,0.5) !important;
}

[dir="rtl"] .wa-float {
  right: auto !important;
  left: 15px !important;
}

/* ═══════════════════════════════════════════════════════
   7. SECTION SPACING
═══════════════════════════════════════════════════════ */
.section {
  padding: 64px 0 !important;
}

@media (max-width: 768px) {
  .section {
    padding: 40px 0 !important;
  }

  .projects-grid {
    gap: 14px !important;
  }

  .sectors-grid {
    gap: 12px !important;
  }
}

/* ═══════════════════════════════════════════════════════
   8. BROKEN IMAGE FALLBACK — cards only (not logo/icons)
═══════════════════════════════════════════════════════ */
.project-card__media img,
.sector-card img {
  background-color: #f1f5f9;
}

/* ═══════════════════════════════════════════════════════
   9. ICON & ACTION BUTTONS ON CARDS
═══════════════════════════════════════════════════════ */
/* Standardize floating action buttons (phone/WhatsApp on project detail) */
.pd-btn-wa,
.pd-btn-call {
  border-radius: 10px !important;
  height: 46px !important;
  padding: 0 18px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  gap: var(--sp-1) !important;
  transition: transform 0.2s ease, background 0.2s ease !important;
}

.pd-btn-wa:hover {
  transform: translateY(-2px) !important;
}

.pd-btn-call:hover {
  transform: translateY(-2px) !important;
}

/* ═══════════════════════════════════════════════════════
   10. INQUIRY FORM CARD
═══════════════════════════════════════════════════════ */
.iqf-card,
.inquiry-card {
  border-radius: var(--card-radius) !important;
  box-shadow: var(--card-shadow) !important;
  padding: var(--card-padding) !important;
}

/* ═══════════════════════════════════════════════════════
   11. UNIFIED FILTER SYSTEM
═══════════════════════════════════════════════════════ */

/* ── Shared input height/radius for both filters ── */
.hs-input,
.filter-bar__input,
.filter-bar__select,
.filter-bar__price {
  height: 46px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  padding: 0 14px !important;
  border: 1.5px solid rgba(255,255,255,0.18) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Projects page inputs (light bg) */
.filter-bar__input,
.filter-bar__select,
.filter-bar__price {
  border: 1.5px solid #d1d5db !important;
  background: #fff !important;
  color: #111 !important;
}

.filter-bar__input:focus,
.filter-bar__select:focus,
.filter-bar__price:focus {
  outline: none !important;
  border-color: #bd993a !important;
  box-shadow: 0 0 0 3px rgba(189,153,58,0.15) !important;
}

/* Price inputs — slightly narrower */
.filter-bar__price {
  flex: 1 1 120px !important;
  max-width: 160px !important;
}

/* ── Home search button matches projects button ── */
.hs-submit,
.filter-bar__btn {
  height: 46px !important;
  border-radius: 10px !important;
  padding: 0 22px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
}

.filter-bar__btn:hover,
.hs-submit:hover {
  transform: translateY(-1px) !important;
}

/* ── Reset/Clear links ── */
.hs-reset,
.filter-bar__clear {
  font-size: 13px !important;
  color: rgba(255,255,255,0.7) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: color 0.2s ease !important;
}

.filter-bar__clear {
  color: #6b7280 !important;
}

.hs-reset:hover { color: #fff !important; }
.filter-bar__clear:hover { color: #dc2626 !important; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .filter-bar__price {
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }
  .filter-bar__selects {
    gap: 8px !important;
  }
}

/* ═══════════════════════════════════════════════════════
   12. HERO — TALL WITH FILTER
═══════════════════════════════════════════════════════ */

/* Hero height + flex layout */
.hero--tall {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

/* Stronger overlay for text readability */
.hero-overlay--strong {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.20) 40%,
    rgba(0,0,0,0.55) 100%
  ) !important;
}

/* ── Filter box — glass effect ── */
.hero-filter-box {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 22px;
  padding: 22px 24px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.25);
  max-width: 1100px;
  margin: 0 auto;
  transform: translateY(-10px);
}

/* ── Filter rows ── */
.hf-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.hf-row:last-child { margin-bottom: 0; }

/* ── Desktop row 2 (Min + Max + Search) ── */
.hf-desktop-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  align-items: flex-end;
  margin-top: 14px;
}

/* ── Desktop: hide mobile-only elements ── */
@media (min-width: 561px) {
  /* Hide mobile advanced panel (prices are in hf-desktop-row2) */
  .hf-advanced-panel { display: none !important; }
  /* Hide mobile-only search row */
  .hf-row--actions { display: none !important; }
  /* Hide mobile toggle button */
  .hf-advanced-toggle { display: none !important; }
}


/* ── Field ── */
.hf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hf-field--actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

/* ── Label ── */
.hf-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Input / Select — glass-compatible ── */
.hf-input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid #d9e0e7;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #0f1a2e;
  background: rgba(255,255,255,0.9);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
  transition: border-color .2s ease, box-shadow .2s ease;
  width: 100%;
}
.hf-input:focus {
  outline: none;
  border-color: #bd993a;
  box-shadow: 0 0 0 3px rgba(189,153,58,0.18);
}

/* ── Search button ── */
.hf-btn-search {
  height: 50px;
  padding: 0 26px;
  background: #bd993a;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(0,0,0,0.14);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
  flex-shrink: 0;
}
.hf-btn-search:hover {
  background: #a8832e;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.20);
}

/* ── Reset link ── */
.hf-btn-reset {
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}
.hf-btn-reset:hover { color: #dc2626; }

/* ── Advanced toggle (mobile only) ── */
.hf-advanced-toggle {
  display: none;
}

/* ── Advanced panel (min/max price) ── */
.hf-advanced-panel {
  overflow: hidden;
  transition: max-height .3s ease, opacity .3s ease;
  max-height: 0;
  opacity: 0;
}
.hf-advanced-panel.hf-open {
  max-height: 200px;
  opacity: 1;
}

/* ── Price row inside advanced panel ── */
.hf-row--prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
  margin-top: 10px;
}

/* ── RTL support ── */
[dir="rtl"] .hf-row { direction: rtl; }
[dir="rtl"] .hf-field--actions { flex-direction: row-reverse; }

/* ── Responsive — tablet ── */
@media (max-width: 900px) {
  .hf-row,
  .hf-row--actions {
    grid-template-columns: 1fr 1fr;
  }
  .hf-field--actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .hf-row--prices {
    grid-template-columns: 1fr 1fr;
  }
}

/* ═══════════════════════════════════════════════════════
   MOBILE FILTER — clean implementation
═══════════════════════════════════════════════════════ */
@media (max-width: 560px) {
  .hero--tall { min-height: 92vh; }

  .hero-filter-box {
    padding: 16px;
    border-radius: 16px;
    transform: translateY(-6px);
  }

  /* ① Show only Type + City in first row — stack vertically */
  .hf-row--basic {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* ② Hide Developer on mobile (inside hf-row--basic, 3rd field) */
  .hf-mob-hidden { display: none !important; }

  /* ③ Hide desktop-only row2 on mobile */
  .hf-desktop-row2 { display: none !important; }

  /* ③ Show Advanced toggle button */
  .hf-advanced-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15,56,90,0.06);
    border: 1px solid rgba(15,56,90,0.15);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #0f385a;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    margin: 10px 0;
    transition: background .2s ease;
  }
  .hf-advanced-toggle:hover {
    background: rgba(15,56,90,0.10);
  }
  .hf-toggle-chevron {
    transition: transform .25s ease;
    margin-left: auto;
  }
  [dir="rtl"] .hf-toggle-chevron { margin-left: 0; margin-right: auto; }
  .hf-advanced-toggle[aria-expanded="true"] .hf-toggle-chevron {
    transform: rotate(180deg);
  }

  /* ④ Advanced panel (prices) — hidden until expanded */
  .hf-advanced-panel { max-height: 0; opacity: 0; }
  .hf-advanced-panel.hf-open { max-height: 300px; opacity: 1; }
  .hf-row--prices {
    grid-template-columns: 1fr !important;
    margin-top: 0;
  }

  /* ⑤ Actions row — always visible, full width */
  .hf-row--actions {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
  }
  .hf-field--actions {
    flex-direction: column !important;
    gap: 8px;
    width: 100%;
  }
  .hf-btn-search {
    width: 100% !important;
    justify-content: center;
    height: 52px;
  }
  .hf-btn-reset {
    text-align: center;
    display: block;
  }
}


/* ═══════════════════════════════════════════════════════
   13. MOBILE FILTER — Bottom Sheet
═══════════════════════════════════════════════════════ */

/* ── Desktop: hide mobile elements ── */
.mob-filter-bar  { display: none; }
.mob-sheet       { display: none; }

/* ── Mobile only ── */
@media (max-width: 768px) {

  /* Hide desktop sticky bar */
  .filter-bar--desktop {
    display: none !important;
  }

  /* ── Mobile filter trigger bar ── */
  .mob-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 80;
  }

  .mob-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: #0f385a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    transition: background .2s ease;
  }
  .mob-filter-btn:hover { background: #0c2f4d; }

  .mob-filter-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #bd993a;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .mob-filter-clear {
    font-size: 13px;
    color: #dc2626;
    text-decoration: none;
    white-space: nowrap;
  }

  .mob-filter-count {
    font-size: 13px;
    color: #6b7280;
    margin-left: auto;
  }
  [dir="rtl"] .mob-filter-count { margin-left: 0; margin-right: auto; }

  /* ── Bottom Sheet ── */
  .mob-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    visibility: hidden;
  }

  .mob-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
  }

  .mob-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background .3s ease;
  }
  .mob-sheet.is-open .mob-sheet__backdrop {
    background: rgba(0,0,0,0.5);
  }

  .mob-sheet__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.32,.72,0,1);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  }
  .mob-sheet.is-open .mob-sheet__panel {
    transform: translateY(0);
  }

  .mob-sheet__handle {
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 12px auto 0;
    flex-shrink: 0;
  }

  .mob-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 10px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
  }

  .mob-sheet__title {
    font-size: 16px;
    font-weight: 800;
    color: #0f385a;
  }

  .mob-sheet__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background .15s ease, color .15s ease;
  }
  .mob-sheet__close:hover { background: #f3f4f6; color: #111; }

  .mob-sheet__body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
    min-height: 0; /* critical: allows flex child to shrink */
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .mob-sheet__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .mob-sheet__label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .mob-sheet__input {
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #0f1a2e;
    background: #fff;
    width: 100%;
    transition: border-color .2s ease;
  }
  .mob-sheet__input:focus {
    outline: none;
    border-color: #bd993a;
    box-shadow: 0 0 0 3px rgba(189,153,58,0.15);
  }

  .mob-sheet__row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mob-sheet__footer {
    padding: 14px 20px 28px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    background: #fff;
    position: sticky;
    bottom: 0;
  }

  .mob-sheet__apply {
    height: 50px;
    background: #bd993a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: background .2s ease;
  }
  .mob-sheet__apply:hover { background: #a8832e; }

  .mob-sheet__reset {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    padding: 6px;
  }
  .mob-sheet__reset:hover { color: #dc2626; }
}

/* ═══════════════════════════════════════════════════════
   14. MOBILE MENU — use page font (inherit)
═══════════════════════════════════════════════════════ */
.nav-mobile__links a,
.nav-mobile__langbtn,
.nav-mobile__hotline {
  font-family: inherit !important;
  font-weight: 500 !important;
}
