/*
 * Uttar Khanishail Indarparaa Mosque — small custom stylesheet.
 * Complements Tailwind CSS (Play CDN). Keep this file light.
 */

/* Smooth scrolling only for people who have not asked for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid #c9a34a;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip-to-content link: hidden until focused */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: #052b20;
  color: #f8f4e8;
  padding: 0.6rem 1.1rem;
  border-radius: 0.375rem;
  transition: top 150ms ease;
}
.skip-link:focus {
  top: 0.75rem;
}

/* Thin gold divider */
.gold-divider {
  height: 1px;
  border: 0;
  background: linear-gradient(to right, transparent, #c9a34a 20%, #c9a34a 80%, transparent);
}
.gold-divider--short {
  width: 6rem;
  margin-left: auto;
  margin-right: auto;
  height: 2px;
}

/* Arched image frame */
.arch-frame {
  border-radius: 12rem 12rem 1rem 1rem;
  overflow: hidden;
}

/* Restrained geometric pattern (pure CSS, very low contrast) */
.pattern-emerald {
  background-color: #073b2a;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(201, 163, 74, 0.14) 1px, transparent 0);
  background-size: 26px 26px;
}
.pattern-ivory {
  background-color: #f8f4e8;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(7, 59, 42, 0.07) 1px, transparent 0);
  background-size: 26px 26px;
}

/* Cards */
.soft-card {
  background: #fffdf7;
  border: 1px solid rgba(201, 163, 74, 0.35);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px -12px rgba(5, 43, 32, 0.18);
}

/* Announcement bar text should never wrap awkwardly on tiny screens */
.announcement-item {
  white-space: nowrap;
}

/* Responsive 16:9 media */
.media-16x9 {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.media-16x9 > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Rebuilding section feature image with a mosque-inspired arched crown */
.mosque-top-feature {
  position: relative;
}

.mosque-top-feature__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 5.6;
  border: 1px solid rgba(201, 163, 74, 0.45);
  border-radius: 14rem 14rem 1.5rem 1.5rem;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.5);
}

.mosque-top-feature__frame::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(201, 163, 74, 0.4);
  border-radius: 12rem 12rem 1rem 1rem;
  pointer-events: none;
  z-index: 1;
}

.mosque-top-feature__frame::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 1rem;
  width: 7rem;
  height: 7rem;
  transform: translateX(-50%);
  border: 1px solid rgba(201, 163, 74, 0.5);
  border-radius: 999px 999px 0 0;
  border-bottom: 0;
  opacity: 0.8;
  pointer-events: none;
  z-index: 1;
}

.mosque-top-feature__heading {
  position: relative;
  z-index: 2;
  width: fit-content;
  max-width: min(100%, 32rem);
  margin: -3.5rem auto 0;
  padding: 1.25rem 2rem 0;
  background: #073b2a;
}

@media (max-width: 640px) {
  .mosque-top-feature__frame {
    aspect-ratio: 4 / 3;
    border-radius: 6rem 6rem 1rem 1rem;
  }

  .mosque-top-feature__frame::before {
    inset: 0.75rem;
    border-radius: 5.5rem 5.5rem 0.75rem 0.75rem;
  }

  .mosque-top-feature__frame::after {
    width: 4.5rem;
    height: 4.5rem;
    top: 0.75rem;
  }

  .mosque-top-feature__heading {
    margin-top: -2rem;
    padding: 1rem 1rem 0;
  }
}

/* Home hero should fill the remaining viewport under the top bars */
.hero-screen {
  min-height: calc(100dvh - var(--hero-offset, 0px));
}

.hero-screen__inner {
  min-height: calc(100dvh - var(--hero-offset, 0px));
}

/* Home page summary: keep copy visually aligned with the video until expanded */
.about-summary-content {
  position: relative;
}

@media (min-width: 1024px) {
  .about-summary-content.is-collapsed {
    max-height: 18.5rem;
    overflow: hidden;
  }

  .about-summary-content.is-collapsed::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 6rem;
    background: linear-gradient(to bottom, rgba(248, 244, 232, 0), #f8f4e8 78%);
    pointer-events: none;
  }
}

[data-expand-toggle][aria-expanded="true"] [data-expand-icon] {
  transform: rotate(180deg);
}

/* PDF embed */
.pdf-frame {
  width: 100%;
  height: min(75vh, 40rem);
  border: 1px solid rgba(201, 163, 74, 0.4);
  border-radius: 0.5rem;
  background: #fff;
}

/* Gallery lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 43, 32, 0.92);
  padding: 1rem;
}
.lightbox.is-open {
  display: flex;
}
.lightbox img {
  max-width: min(90vw, 64rem);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 0.5rem;
  background: #fff;
}

/* Back-to-top button hidden until scrolled */
#back-to-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
#back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Print: keep only the main content (used on prayer times page) */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #fff !important;
    padding-bottom: 0 !important;
  }
  main {
    padding-top: 0 !important;
  }
}

/* Avoid any accidental horizontal overflow on small screens */
html,
body {
  overflow-x: hidden;
}
