/* ALTAHANY_PERF_V10_53C1 — scroll, backdrop-filter, spacing, image stability */

/* ── 1. Disable backdrop-filter on mobile (GPU-intensive, not essential) ── */
@media (max-width: 768px) {
  *  { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

/* ── 2. Disable parallax / background-attachment fixed on mobile ─────── */
@media (max-width: 1024px) {
  * { background-attachment: scroll !important; }
}

/* ── 3. Respect reduced-motion for transitions ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 4. Compact vertical spacing — remove excessive padding ───────────── */
.ath-section { padding: 3rem 0; }
@media (max-width: 768px) {
  .ath-section { padding: 2rem 0; }
  .ath-page-hero { padding: 2.5rem 0 1.5rem; }
}

/* ── 5. Image stability — prevent layout shift ────────────────────────── */
img {
  height: auto;
  display: block;
}
img[width][height] {
  aspect-ratio: attr(width) / attr(height);
}

/* Gallery and card images: explicit aspect-ratio so space reserved before load */
.ath-gallery-item img,
.ath-media-card img,
.work-thumb img,
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Prevent hero from reflowing as images load — use explicit dimensions not contain:size */
.hero-slider,
.ath-hero-slider {
  min-height: 480px;
  overflow: hidden;
}
@media (max-width: 768px) {
  .hero-slider,
  .ath-hero-slider { min-height: 360px; }
}

/* ── 6. Breadcrumbs ──────────────────────────────────────────────────── */
.ath-breadcrumbs {
  padding: .5rem 0;
  font-size: .875rem;
  color: var(--muted, #9B7A60);
}
.ath-breadcrumbs__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
}
.ath-breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.ath-breadcrumbs__link {
  color: var(--muted, #9B7A60);
  text-decoration: none;
  transition: color .15s;
}
.ath-breadcrumbs__link:hover,
.ath-breadcrumbs__link:focus {
  color: var(--gold, #C9A96E);
  text-decoration: underline;
  outline-offset: 2px;
}
.ath-breadcrumbs__current {
  color: var(--dark, #2D1B0E);
  font-weight: 600;
}
.ath-breadcrumbs__sep {
  color: var(--gold-lt, #E8D5A9);
  font-size: .75rem;
  user-select: none;
}

/* ── 7. Admin sidebar scroll — smooth but contained ──────────────────── */
.ath-smart-admin-nav {
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (prefers-reduced-motion: no-preference) {
  .ath-smart-admin-nav { scroll-behavior: smooth; }
}
