/* AJYAL — gallery + video pages (design-system aligned) */

/* Galleries index — artistic photo collage in page-hero */
.page-hero--with-collage {
  min-height: 22rem;
}

@media (width >= 900px) {
  .page-hero--with-collage {
    min-height: 28rem;
  }

  .page-hero-inner--with-collage {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(17rem, 0.95fr);
    align-items: center;
    gap: 1.5rem 2.25rem;
  }

  .page-hero-inner--with-collage .page-hero-copy {
    max-width: 36rem;
  }
}

.page-hero-collage {
  display: none;
  position: relative;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

@media (width >= 900px) {
  .page-hero-collage {
    display: block;
  }
}

.page-hero-collage-stage {
  position: relative;
  width: min(100%, 28rem);
  height: 19.5rem;
  margin-inline: auto;
}

.page-hero-collage-stage::after {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: 12;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 65% at 50% 48%, transparent 42%, rgb(6 20 41 / 0.42) 100%),
    linear-gradient(to left, rgb(6 20 41 / 0.55) 0%, transparent 28%);
}

[dir="ltr"] .page-hero-collage-stage::after {
  background:
    radial-gradient(ellipse 70% 65% at 50% 48%, transparent 42%, rgb(6 20 41 / 0.42) 100%),
    linear-gradient(to right, rgb(6 20 41 / 0.55) 0%, transparent 28%);
}

.page-hero-collage-card {
  position: absolute;
  overflow: hidden;
  border-radius: 0.7rem;
  border: 1.5px solid rgb(255 255 255 / 0.22);
  background: var(--color-navy-800, #0f2a42);
  box-shadow:
    0 14px 34px rgb(2 8 16 / 0.48),
    0 4px 12px rgb(2 8 16 / 0.28);
  transform-origin: center center;
}

.page-hero-collage-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.page-hero-collage-card--1 {
  width: 34%;
  aspect-ratio: 3 / 4;
  top: 10%;
  left: 2%;
  z-index: 4;
  transform: rotate(-11deg);
}

.page-hero-collage-card--2 {
  width: 40%;
  aspect-ratio: 4 / 3;
  top: -2%;
  left: 28%;
  z-index: 6;
  transform: rotate(6deg);
}

.page-hero-collage-card--3 {
  width: 30%;
  aspect-ratio: 1 / 1;
  top: 6%;
  left: 66%;
  z-index: 3;
  transform: rotate(-4deg);
}

.page-hero-collage-card--4 {
  width: 36%;
  aspect-ratio: 5 / 4;
  top: 42%;
  left: -2%;
  z-index: 5;
  transform: rotate(8deg);
}

.page-hero-collage-card--5 {
  width: 38%;
  aspect-ratio: 3 / 4;
  top: 36%;
  left: 32%;
  z-index: 7;
  transform: rotate(-3deg);
}

.page-hero-collage-card--6 {
  width: 32%;
  aspect-ratio: 4 / 5;
  top: 40%;
  left: 68%;
  z-index: 4;
  transform: rotate(10deg);
}

.page-hero-collage-card--7 {
  width: 28%;
  aspect-ratio: 1 / 1;
  top: 68%;
  left: 14%;
  z-index: 8;
  transform: rotate(-7deg);
}

.page-hero-collage-card--8 {
  width: 34%;
  aspect-ratio: 5 / 4;
  top: 66%;
  left: 42%;
  z-index: 5;
  transform: rotate(4deg);
}

.page-hero-collage-card--9 {
  width: 26%;
  aspect-ratio: 3 / 4;
  top: 72%;
  left: 74%;
  z-index: 6;
  transform: rotate(-9deg);
}

@media (prefers-reduced-motion: no-preference) {
  .page-hero-collage-card--2 {
    animation: page-hero-collage-float 7.5s ease-in-out infinite alternate;
  }

  .page-hero-collage-card--5 {
    animation: page-hero-collage-float 9s ease-in-out infinite alternate-reverse;
  }

  .page-hero-collage-card--7 {
    animation: page-hero-collage-float 8.2s ease-in-out infinite alternate;
  }
}

@keyframes page-hero-collage-float {
  from {
    translate: 0 0;
  }

  to {
    translate: 0 -6px;
  }
}

.ajyal-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.ajyal-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-navy-800);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ajyal-filter-btn:hover {
  background: var(--color-primary-50);
  border-color: var(--color-primary-100);
}

.ajyal-filter-btn.is-active {
  background: var(--color-navy-800);
  border-color: var(--color-navy-800);
  color: #fff;
}

.ajyal-filter-empty {
  display: none;
  margin-top: 1.5rem;
  color: #525252;
}

.ajyal-filter-empty.is-visible {
  display: block;
}

.ajyal-video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (width >= 768px) {
  .ajyal-video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width >= 1100px) {
  .ajyal-video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ajyal-video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out-expo, ease), box-shadow 0.25s ease;
}

.ajyal-video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ajyal-video-card.is-hidden {
  display: none;
}

.ajyal-video-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(145deg, #1e3a5f 0%, #0b1f36 55%, #16324f 100%);
  aspect-ratio: 16 / 10;
}

.ajyal-video-thumb.is-empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgb(255 255 255 / 0.08), transparent 45%),
    linear-gradient(145deg, #1e3a5f 0%, #0b1f36 55%, #16324f 100%);
  pointer-events: none;
}

.ajyal-video-thumb.is-empty.is-facebook::after {
  background:
    radial-gradient(circle at 70% 20%, rgb(24 119 242 / 0.28), transparent 42%),
    radial-gradient(circle at 30% 30%, rgb(255 255 255 / 0.08), transparent 45%),
    linear-gradient(145deg, #1e3a5f 0%, #0b1f36 55%, #16324f 100%);
}

.ajyal-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out-expo, ease);
}

.ajyal-video-card:hover .ajyal-video-thumb img {
  transform: scale(1.04);
}

.ajyal-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(transparent 40%, rgb(6 20 41 / 0.35));
  pointer-events: none;
}

.ajyal-video-play-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  background: var(--color-primary-500);
  color: #fff;
  box-shadow: var(--shadow-brand);
  transition: transform 0.25s ease, background 0.25s ease;
}

.ajyal-video-play-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
  margin-inline-start: 2px;
}

.ajyal-video-card:hover .ajyal-video-play-icon {
  transform: scale(1.08);
}

.ajyal-video-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.15rem 1.25rem 1.35rem;
}

.ajyal-video-cat {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 0.55rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary-50);
  color: var(--color-primary-700, var(--color-primary-500));
  font-size: 0.75rem;
  font-weight: 700;
}

.ajyal-video-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-navy-800);
}

.ajyal-video-body p {
  margin: 0.65rem 0 0;
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #525252;
}

.ajyal-video-frame {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 9;
}

.ajyal-video-frame iframe,
.ajyal-video-frame video,
.ajyal-video-frame img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.ajyal-video-detail-meta {
  margin-top: 1.5rem;
}

.ajyal-video-detail-meta .ajyal-video-cat {
  margin-bottom: 0.75rem;
}

.ajyal-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (width >= 640px) {
  .ajyal-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width >= 1024px) {
  .ajyal-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.ajyal-gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-navy-200, #c5cdd8);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
}

.ajyal-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out-expo, ease);
}

.ajyal-gallery-item:hover img {
  transform: scale(1.04);
}

.ajyal-gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 55%, rgb(6 20 41 / 0.45));
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.ajyal-gallery-item:hover::after {
  opacity: 1;
}

.ajyal-album-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* page-hero-meta / page-hero-meta-chip: shared in page-hero-meta.css (always loaded) */

.ajyal-album-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}

.ajyal-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgb(6 20 41 / 0.92);
}

.ajyal-media-lightbox.is-open {
  display: flex;
}

.ajyal-media-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  border-radius: var(--radius-md);
  object-fit: contain;
  box-shadow: var(--shadow-xl, 0 25px 50px rgb(0 0 0 / 0.35));
}

.ajyal-media-lightbox-close,
.ajyal-media-lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--color-navy-800);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.ajyal-media-lightbox-close {
  top: 1rem;
  inset-inline-end: 1rem;
}

.ajyal-media-lightbox-prev {
  inset-inline-start: 1rem;
}

.ajyal-media-lightbox-next {
  inset-inline-end: 1rem;
}

.ajyal-media-lightbox-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.ajyal-video-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgb(6 20 41 / 0.88);
}

.ajyal-video-modal.is-open {
  display: flex;
}

.ajyal-video-modal-dialog {
  position: relative;
  width: min(100%, 56rem);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-xl, 0 25px 50px rgb(0 0 0 / 0.35));
}

.ajyal-video-modal-close {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 0.75rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--color-navy-800);
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.ajyal-video-modal-frame {
  aspect-ratio: 16 / 9;
  background: #0b1f36;
}

.ajyal-video-modal-frame iframe,
.ajyal-video-modal-frame video,
.ajyal-video-modal-frame img,
.ajyal-video-modal-frame .ajyal-fb-video-wrap,
.ajyal-video-modal-frame .fb-video,
.ajyal-video-modal-frame .fb-video > span {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.ajyal-video-modal-frame .ajyal-fb-video-wrap {
  overflow: hidden;
  background: #0b1f36;
}

.ajyal-video-modal-frame .fb-video iframe {
  width: 100% !important;
  height: 100% !important;
  min-width: 100%;
}

.ajyal-video-external {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
}

.ajyal-video-external a {
  color: var(--color-primary-600, #0d9488);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ajyal-video-fallback {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b1f36;
}

.ajyal-video-fallback > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: saturate(0.85);
}

.ajyal-video-fallback-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  max-width: 28rem;
  margin: 0 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md, 0.75rem);
  background: rgb(255 255 255 / 0.94);
  text-align: center;
  box-shadow: var(--shadow-md, 0 10px 24px rgb(0 0 0 / 0.18));
}

.ajyal-video-fallback-panel p {
  margin: 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.6;
}

.ajyal-video-fallback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: var(--color-primary-500, #0ea5a0);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.ajyal-video-fallback-link:hover {
  filter: brightness(1.05);
}

.ajyal-video-modal-body {
  padding: 1.15rem 1.35rem 1.4rem;
}

.ajyal-video-modal-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-navy-800);
}

.ajyal-video-modal-body p {
  margin: 0.5rem 0 0;
  color: #525252;
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (width <= 640px) {
  .ajyal-media-lightbox-nav {
    width: 2.35rem;
    height: 2.35rem;
  }

  .ajyal-media-lightbox-prev {
    inset-inline-start: 0.5rem;
  }

  .ajyal-media-lightbox-next {
    inset-inline-end: 0.5rem;
  }
}
