/* Public + shared polish — cards, filters, detail, contact bar */

:root {
  --amlaki-callbar-h: 4.15rem;
}

.skip-link {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: -4rem;
  z-index: 4000;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  background: #0ea5e9;
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus {
  top: 0.75rem;
}

.amlaki-site :focus-visible,
.auth-page :focus-visible {
  outline: 2px solid color-mix(in srgb, var(--afram-accent, #38bdf8) 80%, #fff);
  outline-offset: 2px;
}

/* Listing cards */
.amlaki-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.amlaki-card__media {
  overflow: hidden;
}
.amlaki-card__media img {
  transition: transform .45s ease;
}
@media (hover: hover) {
  .amlaki-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(0, 0, 0, .22);
    border-color: color-mix(in srgb, var(--afram-accent, #38bdf8) 42%, transparent);
  }
  html[data-theme="light"] .amlaki-card:hover {
    box-shadow: 0 16px 36px rgba(15, 23, 42, .1);
  }
  .amlaki-card:hover .amlaki-card__media img {
    transform: scale(1.06);
  }
}
.amlaki-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.amlaki-card__price strong {
  color: var(--afram-accent, #38bdf8);
}

/* Public filters */
.amlaki-filter .form-control,
.amlaki-filter .form-select,
.amlaki-hero-search .form-control,
.amlaki-hero-search .form-select,
.amlaki-hero-search .btn {
  min-height: 44px;
  font-size: 16px;
}
.amlaki-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.amlaki-quick a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--home-line, rgba(255,255,255,.12));
  color: inherit;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--home-surface, #0c1422) 70%, transparent);
}
.amlaki-quick a.is-active,
.amlaki-quick a:hover {
  border-color: transparent;
  background: linear-gradient(145deg, #38bdf8, #0284c7);
  color: #fff;
}

/* Gallery */
.amlaki-gallery > img {
  cursor: default;
}
.amlaki-gallery__thumbs img {
  cursor: pointer;
  opacity: .78;
  border: 2px solid transparent;
  transition: opacity .15s ease, border-color .15s ease;
}
.amlaki-gallery__thumbs img.is-active,
.amlaki-gallery__thumbs img:hover {
  opacity: 1;
  border-color: var(--afram-accent, #38bdf8);
}

.amlaki-detail-hero > aside.amlaki-side {
  position: sticky;
  top: 5.4rem;
  align-self: start;
}

.amlaki-cta-stack .btn + .btn {
  margin-top: 0.5rem;
}

/* Sticky call bar on phones */
.amlaki-callbar {
  display: none;
}
@media (max-width: 991.98px) {
  .amlaki-callbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 0.45rem;
    position: fixed;
    inset-inline: 0.7rem;
    bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    z-index: 1070;
    padding: 0.45rem;
    border-radius: 16px;
    background: color-mix(in srgb, #0b1220 88%, transparent);
    border: 1px solid rgba(255,255,255,.1);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 40px rgba(0,0,0,.35);
  }
  html[data-theme="light"] .amlaki-callbar {
    background: rgba(255,255,255,.94);
    border-color: rgba(15,23,42,.1);
  }
  .amlaki-callbar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 42px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
  }
  .amlaki-callbar.has-3 a {
    font-size: 0.72rem;
    padding-inline: 0.2rem;
  }
  .amlaki-callbar a.is-primary {
    background: linear-gradient(145deg, #38bdf8, #0284c7);
    color: #fff;
  }
  .amlaki-callbar a.is-ghost {
    background: transparent;
    border: 1px solid rgba(148,163,184,.35);
    color: inherit;
  }
  .amlaki-site.has-callbar {
    padding-bottom: calc(var(--amlaki-callbar-h) + env(safe-area-inset-bottom, 0px) + 0.5rem);
  }
  .amlaki-detail-hero > aside.amlaki-side {
    position: static;
  }
  .amlaki-page {
    padding-top: 5rem;
  }
}

@media (max-width: 575.98px) {
  .home-chips {
    justify-content: center;
  }
  .amlaki-page-head {
    flex-direction: column;
    align-items: stretch;
  }
  .amlaki-page-head .btn {
    width: 100%;
    justify-content: center;
  }
  .amlaki-gallery > img {
    height: 220px;
  }
  .amlaki-gallery__thumbs img {
    width: 64px;
    height: 50px;
    flex: 0 0 64px;
    object-fit: cover;
  }
}

/* Empty listings */
.amlaki-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.4rem 1rem;
  border: 1px dashed var(--home-line, rgba(255,255,255,.12));
  border-radius: 1.1rem;
  color: var(--home-muted, #94a3b8);
}
.amlaki-empty i {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--afram-accent, #38bdf8);
}

html[data-theme="light"] .amlaki-quick a {
  background: #fff;
  border-color: #e2e8f0;
}
html[data-theme="light"] .amlaki-quick a.is-active {
  color: #fff;
}

.amlaki-public-map__canvas.amlaki-map--tall {
  height: min(62vh, 560px);
  min-height: 320px;
}
.amlaki-public-map__results {
  max-height: min(42vh, 380px);
  overflow: auto;
}
.amlaki-public-map .amlaki-map-item a {
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}
.amlaki-public-map .amlaki-map-item a:hover {
  color: var(--afram-accent, #38bdf8);
}
@media (max-width: 991.98px) {
  .amlaki-public-map__canvas.amlaki-map--tall {
    height: 42vh;
    min-height: 260px;
  }
}

html[data-theme="light"] .amlaki-public-map .amlaki-page-head h1,
html[data-theme="light"] .amlaki-public-map .amlaki-side h2 {
  color: #0f172a;
}
html[data-theme="light"] .amlaki-public-map .amlaki-page-head p,
html[data-theme="light"] .amlaki-public-map .amlaki-side .text-muted {
  color: #64748b;
}
html[data-theme="light"] .amlaki-public-map .amlaki-filter,
html[data-theme="light"] .amlaki-public-map .amlaki-side {
  background: #fff;
  border-color: #e2e8f0;
  color: #0f172a;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
html[data-theme="light"] .amlaki-public-map .amlaki-public-map__canvas {
  border-color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
