/* =========================================================================
   safari-compat.css: fixes for older browsers (found on Safari 13.1).
   Loaded AFTER style.css and responsive.css. Each rule below is equivalent
   to a modern rule that old Safari ignores, so newer browsers are unaffected.
   To undo: remove the <link> to this file from templates/base.html.
   ========================================================================= */

/* 1. `inset` shorthand (Safari 14.1+) -> explicit offsets (every browser) */
.pattern-bg::before,
.newsletter::before,
.hero-slide,
.hero-slide::before,
.hero-slide::after,
.lightbox,
.choice-card input {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
@media (max-width: 900px) {
  .nav-menu {              /* mobile drawer: was inset: 0 0 0 auto */
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
  }
}

/* 2. `margin-inline: auto` (Safari 14.1+) -> centre the page container */
.container {
  margin-left: auto;
  margin-right: auto;
}

/* 3. `aspect-ratio` (Safari 15+): give image boxes a fixed height instead.
      object-fit: cover (already set) crops each photo neatly inside it. */
@supports not (aspect-ratio: 1 / 1) {
  .card-img,
  .card-img-empty { height: 210px; }
  .news-featured .card-img { height: 260px; }
  .gallery-item { height: 190px; }
  .video-frame { height: 360px; }
  .arch-visual { height: 340px; }
}
@supports not (aspect-ratio: 1 / 1) {
  @media (max-width: 640px) {
    .video-frame { height: 220px; }
  }
}

/* 4. :focus-visible (Safari 15.4+): visible keyboard focus everywhere,
      without showing outlines on mouse clicks where :focus-visible exists. */
:focus { outline: 3px solid var(--gold); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
