*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  font-family: var(--font-en);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--background-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}
html[dir="rtl"] body { font-family: var(--font-ar); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  color: var(--text-heading);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h1 { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2.125rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-primary); }
ul { margin: 0; padding: 0; list-style: none; }

.site-container,
.container {
  width: min(100% - 64px, 1440px);
  margin-inline: auto;
  max-width: 100%;
}
@media (max-width: 1199px) {
  .site-container, .container { width: min(100% - 48px, 1200px); }
}
@media (max-width: 767px) {
  .site-container, .container { width: calc(100% - 32px); }
}

.skip-link {
  position: absolute;
  inset-inline-start: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  border-radius: var(--radius-button);
}
.skip-link:focus { inset-inline-start: 16px; top: 16px; }

:focus-visible {
  outline: 3px solid rgba(34, 156, 144, 0.35);
  outline-offset: 2px;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}
#main-content {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding-block-end: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 24px);
}
@media (min-width: 768px) {
  #main-content { padding-block-end: 48px; }
}

/* Responsive card grids — never force wider than viewport */
.properties-grid,
.cards-grid,
.theme-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  width: 100%;
  max-width: 100%;
}
@media (max-width: 767px) {
  .properties-grid,
  .cards-grid,
  .theme-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.phone-ltr, .price-ltr, [dir="ltr"] { unicode-bidi: isolate; }

.section-block { padding-block: 96px; }
.section-block--sm { padding-block: 64px; }
.section-block--neutral { background: var(--background-page); }
.section-block--warm { background: var(--background-warm); }
.section-block--soft { background: var(--primary-surface); }
.section-block--white { background: var(--background-white); }
@media (max-width: 767px) {
  .section-block { padding-block: 56px; }
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-header h2 { margin: 0; }
.section-header p {
  margin: 10px 0 0;
  max-width: 620px;
  color: var(--text-secondary);
}
.view-all-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  pointer-events: none !important;
}
