/* Gallery filters, lightbox, video embeds, share, forms — Phase 7 */

.ann-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.ann-gallery-filters .ann-btn.is-active {
  background: var(--accent, #081840);
  color: #fff;
  border-color: var(--accent, #081840);
}

.ann-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.ann-gallery-item {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--card, #fafbfc);
}

.ann-gallery-item.is-hidden {
  display: none;
}

.ann-gallery-item__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ann-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ann-gallery-item figcaption {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.ann-lightbox[hidden] {
  display: none !important;
}

.ann-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ann-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 64, 0.85);
}

.ann-lightbox__dialog {
  position: relative;
  z-index: 1;
  max-width: min(960px, 92vw);
  max-height: 90vh;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ann-lightbox__figure {
  margin: 0;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  max-height: 90vh;
}

.ann-lightbox__img {
  display: block;
  max-width: 85vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}

.ann-lightbox__caption {
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  text-align: center;
}

.ann-lightbox__close,
.ann-lightbox__nav {
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  cursor: pointer;
}

.ann-lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
}

.ann-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.ann-video-item.is-hidden {
  display: none;
}

.ann-video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.ann-video-embed iframe,
.ann-video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ann-video-embed--short {
  aspect-ratio: 9 / 16;
  max-width: 320px;
  margin-inline: auto;
}

.ann-video-facade__btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000;
}

.ann-video-facade__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ann-video-facade__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: rgba(8, 24, 64, 0.85);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.ann-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(8, 24, 64, 0.12);
}

.ann-share__label {
  font-weight: 600;
  margin-right: 0.25rem;
}

.ann-share__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(8, 24, 64, 0.2);
  border-radius: 6px;
  background: #fff;
  color: var(--accent, #081840);
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
}

.ann-share__btn:hover,
.ann-share__btn:focus-visible {
  border-color: var(--secondary, #38b8d8);
  outline: none;
}

.ann-share__note {
  flex-basis: 100%;
  font-size: 0.8rem;
  opacity: 0.8;
}

.ann-form .ann-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.ann-form .ann-input,
.ann-form .ann-select,
.ann-form .ann-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ann-form--compact {
  padding: 1rem;
}

.ann-alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.ann-alert--success {
  background: #e8f7ef;
  color: #0d5c2e;
}

.ann-alert--error {
  background: #fdeceb;
  color: #8a1f11;
}

.ann-alert--info {
  background: #e8f4fb;
  color: #0b4a6e;
}

.ann-testimonial-card.is-placeholder {
  border: 1px dashed rgba(8, 24, 64, 0.25);
}

.ann-search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 640px;
  margin: 0 auto 2rem;
}

.ann-search-form input[type="search"] {
  flex: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  .ann-lightbox__nav {
    display: none;
  }
  .ann-search-form {
    flex-direction: column;
  }
}
