.appear,
.appear-active {
  opacity: 1 !important;
  transform: none !important;
}

.gallery-card-ready {
  animation: local-gallery-in 520ms cubic-bezier(.22, .8, .2, 1) both;
}

.gallery-card-ready { position: relative; }
.gallery-card-ready::after { background: rgb(0 0 0 / 78%); bottom: 0; color: #fff; content: attr(data-local-gallery-title); font: 700 12px/1.35 sans-serif; left: 0; opacity: 0; padding: 8px; pointer-events: none; position: absolute; transition: opacity 160ms ease; width: 100%; z-index: 2; }
.gallery-card-ready:hover::after, .gallery-card-ready:focus-visible::after { opacity: 1; }

@keyframes local-gallery-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.local-gallery-modal {
  align-items: center;
  background: rgb(0 0 0 / 80%);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 28px;
  position: fixed;
  transition: opacity 220ms ease;
  visibility: hidden;
  z-index: 1000;
}

.local-gallery-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.local-gallery-modal__panel {
  align-items: flex-start;
  background: #fff;
  border-radius: 10px;
  display: flex;
  gap: 24px;
  max-height: min(84vh, 780px);
  max-width: min(90vw, 1120px);
  overflow: auto;
  padding: 30px;
  position: relative;
  transform: translateY(12px) scale(.97);
  transition: transform 220ms ease;
}

.is-open .local-gallery-modal__panel { transform: translateY(0) scale(1); }

.local-gallery-modal__media {
  align-items: center;
  display: flex;
  flex: 1 1 56%;
  justify-content: center;
  min-height: 220px;
}

.local-gallery-modal img {
  display: block;
  max-height: calc(min(84vh, 780px) - 60px);
  max-width: min(52vw, 640px);
  object-fit: contain;
}

.local-work-meta {
  color: #222;
  flex: 0 1 360px;
  font-family: sans-serif;
  padding-right: 6px;
}

.local-work-meta__eyebrow {
  color: #777;
  font-size: 12px;
  letter-spacing: .08em;
  margin: 2px 0 10px;
}

.local-work-meta h2 {
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1.35;
  margin: 0;
}

.local-work-meta__lead {
  font-size: 14px;
  line-height: 1.8;
  margin: 15px 0 18px;
}

.local-work-meta dl { border-top: 1px solid #ddd; margin: 0; }
.local-work-meta dl > div { border-bottom: 1px solid #ddd; padding: 9px 0; }
.local-work-meta dt { color: #777; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.local-work-meta dd { font-size: 13px; line-height: 1.65; margin: 3px 0 0; }

.local-gallery-modal__close {
  align-items: center;
  background: #111;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  font: 24px/1 sans-serif;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: -14px;
  top: -14px;
  width: 36px;
}

body.local-modal-open { overflow: hidden; }

.local-category-layer { inset: 0; pointer-events: none; position: fixed; z-index: 900; }

.local-category-hitarea { display: block; pointer-events: auto; position: fixed; }

.local-youtube-link {
  align-items: center;
  background: #111 center / cover no-repeat;
  box-shadow: inset 0 0 0 999px rgb(0 0 0 / 28%);
  color: #fff !important;
  display: flex !important;
  font-family: sans-serif;
  font-size: clamp(15px, 2vw, 24px);
  font-weight: 700;
  height: 100%;
  justify-content: center;
  text-decoration: none;
  width: 100%;
}

.local-youtube-link::before {
  background: #f03;
  border-radius: 14%;
  content: "▶";
  font-size: 1.4em;
  line-height: 1;
  margin-right: .55em;
  padding: .26em .42em .26em .5em;
}

.local-seo-section { background: #fff200; color: #111; font-family: sans-serif; margin: 80px auto; max-width: 1040px; padding: 48px; position: relative; width: calc(100% - 40px); }
.local-seo-section h2 { font-size: clamp(25px, 3vw, 40px); line-height: 1.35; margin: 0 0 18px; }
.local-seo-section > p { font-size: 16px; line-height: 1.8; margin: 0; max-width: 850px; }
.local-seo-section__grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); margin-top: 28px; }
.local-seo-section__grid > div { background: #fff; border: 2px solid #111; padding: 18px; }
.local-seo-section h3 { font-size: 16px; margin: 0 0 9px; }
.local-seo-section__grid p { font-size: 14px; line-height: 1.7; margin: 0; }
.local-seo-section__contact { background: #111; color: #fff; display: inline-block; font-weight: 700; margin-top: 28px; padding: 14px 22px; text-decoration: none; }

.local-responsive-gallery { display: none; }

@media (min-width: 901px) and (max-width: 1200px) {
  .local-gallery-source-group { display: none !important; }

  .local-responsive-gallery {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin: 36px auto 56px;
    max-width: 1100px;
    padding: 0 24px;
    width: 100%;
  }

  .local-responsive-gallery__card,
  .local-responsive-gallery > iframe {
    aspect-ratio: 1;
    background: #fff;
    border: 0;
    border-radius: 16px;
    display: block;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    width: 100%;
  }

  .local-responsive-gallery__card {
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .local-responsive-gallery__card:hover,
  .local-responsive-gallery__card:focus-visible {
    box-shadow: 0 8px 20px rgb(0 0 0 / 20%);
    outline: 3px solid #111;
    outline-offset: 2px;
    transform: translateY(-3px);
  }

  .local-responsive-gallery__card img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  .local-responsive-gallery__video {
    align-items: center;
    background-position: center;
    background-size: cover;
    box-shadow: inset 0 0 0 999px rgb(0 0 0 / 24%);
    color: #fff;
    display: flex;
    justify-content: center;
  }

  .local-responsive-gallery__video span {
    background: #f03;
    border-radius: 14%;
    font: 700 32px/1 sans-serif;
    padding: 12px 15px 12px 19px;
  }
}

@media (max-width: 900px) {
  #header {
    align-items: center !important;
    display: grid !important;
    grid-template-columns: minmax(116px, 1fr) minmax(172px, 1.45fr) minmax(74px, .7fr) !important;
    height: 80px !important;
    justify-content: stretch !important;
    padding: 0 10px !important;
  }

  #header > a {
    align-self: center !important;
    height: auto !important;
    margin: 0 !important;
    max-width: 100% !important;
    position: relative !important;
    width: 100% !important;
  }

  #header > a:nth-child(1) { aspect-ratio: 2.33; }
  #header > a:nth-child(2) { aspect-ratio: 3.84; }
  #header > a:nth-child(3) { aspect-ratio: 5.84; }

  .local-gallery-source-group { display: none !important; }

  .local-responsive-gallery {
    display: grid;
    gap: clamp(8px, 1.8vw, 16px);
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    margin: 28px auto 48px;
    max-width: 840px;
    padding: 0 16px;
    width: 100%;
  }

  .local-responsive-gallery__card,
  .local-responsive-gallery > iframe {
    aspect-ratio: 1;
    background: #fff;
    border: 0;
    border-radius: 16px;
    display: block;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    width: 100%;
  }

  .local-responsive-gallery__card {
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .local-responsive-gallery__card:hover,
  .local-responsive-gallery__card:focus-visible {
    box-shadow: 0 8px 20px rgb(0 0 0 / 20%);
    outline: 3px solid #111;
    outline-offset: 2px;
    transform: translateY(-3px);
  }

  .local-responsive-gallery__card img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  .local-responsive-gallery__video {
    align-items: center;
    background-position: center;
    background-size: cover;
    box-shadow: inset 0 0 0 999px rgb(0 0 0 / 24%);
    color: #fff;
    display: flex;
    justify-content: center;
  }

  .local-responsive-gallery__video span {
    background: #f03;
    border-radius: 14%;
    font: 700 32px/1 sans-serif;
    padding: 12px 15px 12px 19px;
  }
}

@media (max-width: 540px) {
  #header {
    grid-template-columns: minmax(94px, 1fr) minmax(148px, 1.55fr) minmax(56px, .62fr) !important;
    height: 64px !important;
    padding: 0 6px !important;
  }

  .local-responsive-gallery {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px auto 34px;
    padding: 0 12px;
  }

  .local-gallery-modal { padding: 18px; }
  .local-gallery-modal__panel { flex-direction: column; gap: 16px; max-height: 88vh; max-width: 92vw; padding: 18px; }
  .local-gallery-modal__media { min-height: 0; width: 100%; }
  .local-gallery-modal img { max-height: 46vh; max-width: calc(92vw - 36px); }
  .local-work-meta { flex-basis: auto; padding: 0; }
  .local-seo-section { margin: 45px auto; padding: 28px 22px; width: calc(100% - 28px); }
  .local-seo-section__grid { grid-template-columns: 1fr; }
}
