/*
 * Masjid Baiturrahim Jakasetia — multi-page additions: dropdown menu, inner page head, service
 * pages, pengurus, events, laporan keuangan, footer site map. Same tokens as style.css.
 */

/* ------------------------------------------------------------------ menu */
.menu {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu__item {
  position: relative;
}
button.menu__top {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
}
.menu__top svg {
  transition: transform 0.2s;
}
.menu__top[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
/* "Hubungi kami" closes the row as the bar's one button. */
.nav .menu__top.menu__cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 10px;
  background: var(--wall);
  color: var(--teal-deep);
  text-decoration: none;
}
.nav .menu__top.menu__cta:hover {
  background: var(--white);
}
.nav.is-solid .menu__top.menu__cta {
  background: var(--teal);
  color: var(--white);
}
.nav.is-solid .menu__top.menu__cta:hover {
  background: var(--teal-deep);
}

/* The panel's top padding bridges the gap under the button, so hover survives the trip down. */
.menu__panel {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  z-index: 10;
  padding-top: 12px;
}
.menu__top[aria-expanded="true"] + .menu__panel {
  display: block;
}
@media (hover: hover) {
  .menu__item:hover > .menu__panel {
    display: block;
  }
}
.menu__panel > ul {
  min-width: 270px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--wall-3);
  border-radius: var(--radius);
  background: var(--wall);
  box-shadow: 0 22px 44px -22px rgb(28 25 21 / 0.55);
}
.menu__panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--teal-deep);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.menu__panel a:hover {
  background: var(--wall-2);
}
.menu__panel a[aria-current] {
  background: var(--wall-2);
  box-shadow: inset 3px 0 0 var(--tile);
}
.menu__sub {
  margin: -2px 0 4px;
  padding: 0 0 0 12px;
  list-style: none;
}
.menu__panel .menu__sub a {
  padding-block: 6px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 500;
}

/* Phone menu: every page visible at once, grouped as in the site map. */
.sheet {
  max-height: calc(100svh - 72px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet .sheet__group {
  margin: 18px 0 2px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}
.sheet__list,
.sheet__list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sheet__list a {
  display: block;
}
.sheet__list ul a {
  padding: 9px 0 9px 18px;
  color: var(--ink-soft);
  font-weight: 500;
}
.sheet a[aria-current] {
  color: var(--tile);
}

/* ------------------------------------------------------------------ inner page head */
.page-head {
  position: relative;
  overflow: hidden;
  padding: calc(72px + clamp(36px, 6vw, 72px)) 0 clamp(40px, 5vw, 64px);
  background: var(--marble);
  color: var(--white);
}
/* The mihrab arch, drawn once in a hairline behind the title. */
.page-head::after {
  content: "";
  position: absolute;
  right: max(4%, calc((100% - var(--wrap)) / 2));
  top: 104px; /* starts below the menu bar */
  bottom: -2px;
  width: clamp(180px, 26vw, 340px);
  border: 1px solid rgb(244 238 221 / 0.1);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}
.page-head__inner {
  position: relative;
  z-index: 1;
}
.page-head h1 {
  max-width: 22ch;
  color: var(--wall);
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 1.4rem + 3.2vw, 3.7rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.page-head__summary {
  max-width: 58ch;
  margin: 16px 0 0;
  color: rgb(255 255 255 / 0.76);
  font-size: 1.08rem;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: rgb(255 255 255 / 0.6);
  font-size: 0.86rem;
}
.crumbs li + li::before {
  content: "/";
  margin: 0 10px;
  opacity: 0.5;
}
.crumbs a {
  color: var(--teal-soft);
}

/* ------------------------------------------------------------------ prayer rail variants */
.prayer__more {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0 10px 24px;
  border-left: 1px solid rgb(255 255 255 / 0.14);
  color: var(--teal-soft);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
}
.prayer__more:hover {
  color: var(--white);
}
.prayer--page {
  margin-top: 36px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: var(--radius);
  overflow: hidden;
}
.prayer--page .prayer__inner {
  padding-inline: 20px;
}
@media (max-width: 1000px) {
  .prayer__more {
    justify-content: center;
    padding: 11px 0 13px;
    border-left: 0;
    border-top: 1px solid rgb(255 255 255 / 0.14);
  }
  .prayer__br {
    display: none;
  }
}
@media (max-width: 640px) {
  /* Eight times: two rows of four. */
  .prayer__list--full {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .prayer--page .prayer__inner {
    padding-inline: 12px;
  }

  /* Home hero: the rail floats as a card at the photo's foot instead of a full-width band.
     Its 12px bottom margin is why the caption and scrim in style.css sit on --rail + 46px. */
  .hero .prayer {
    margin: 0 12px 12px;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 18px;
    background: rgb(28 25 21 / 0.72);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    backdrop-filter: blur(14px) saturate(1.15);
    overflow: hidden;
  }
  .hero .prayer__inner {
    padding-inline: 14px;
  }
  .hero .prayer__next {
    align-items: center;
    padding: 12px 2px 10px;
  }
  /* Next prayer on top, hijri date under it; font-size 0 hides the " · " joining them. */
  .hero .prayer__next > span {
    display: grid;
    gap: 2px;
    font-size: 0;
  }
  .hero .prayer__next [data-next-label] {
    color: var(--teal-soft);
    font-size: 0.92rem;
    font-weight: 600;
  }
  .hero .prayer__next [data-hijri] {
    color: rgb(255 255 255 / 0.6);
    font-size: 0.76rem;
  }
  .hero .prayer__next strong {
    font-size: 1.7rem;
    line-height: 1;
  }
  .hero .prayer__list {
    gap: 4px;
    padding: 6px 0;
  }
  .hero .prayer__list li {
    padding: 8px 0 9px;
    border-radius: 12px;
  }
  .hero .prayer__list li.is-next::before {
    content: none;
  }
  .hero .prayer__list li.is-next {
    background: rgb(159 208 204 / 0.14);
  }
  .hero .prayer__more {
    padding: 10px 0 12px;
  }
}

/* ------------------------------------------------------------------ service / text pages */
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.service--photo {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.service--pair + .service--pair {
  border-top: 1px solid var(--wall-3);
}
.service h2 {
  margin-bottom: 10px;
}
.service__summary {
  color: var(--ink-soft);
  font-size: 1.08rem;
}
.service__photo {
  margin: 0;
}
.service__photo img {
  width: 100%;
  border-radius: var(--radius);
}
.service__credit {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.service__more {
  margin-top: 18px;
  color: var(--ink-soft);
}

/* Page photos with their own title and description: under the photo beside the text,
   or as gallery cards below the text when the admin picks "Galeri". */
.service__photo figcaption {
  margin-top: 12px;
}
/* Gallery mode: heading and grid sit in the .service grid as full-width rows under the text. */
.service .photos__heading {
  margin: 12px 0 calc(20px - clamp(28px, 5vw, 64px)); /* cancel the .service row gap above the grid */
  padding-top: 28px;
  border-top: 1px solid var(--wall-3);
  color: var(--teal-deep);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
}
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 36px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.photos figure {
  margin: 0;
}
.photos__photo {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--wall-2);
}
.photos__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.photos__photo:hover img {
  transform: scale(1.03);
}
.photos figcaption {
  margin-top: 14px;
}
.photos__title {
  margin: 0;
  color: var(--teal-deep);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.2;
}
.photos__text .prose {
  margin-top: 6px;
  font-size: 0.98rem;
}
.photos__text .prose > :first-child {
  margin-top: 0;
}

/* Admin text: generous size and leading, read by every age. */
.prose {
  max-width: 68ch;
  font-size: 1.06rem;
  line-height: 1.75;
}
.prose p {
  margin: 0 0 1.1em;
}
/* "## " subheadings break a long page into parts a parent can scan for. */
.prose h2,
.prose h3 {
  margin: 1.9em 0 0.45em;
  color: var(--teal-deep);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.2;
}
.prose h3 {
  font-size: 1.35rem;
}
.prose > :first-child {
  margin-top: 0;
}
.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}
.prose li + li {
  margin-top: 0.4em;
}
.prose li::marker {
  color: var(--tile);
}
.prose ol li::marker {
  font-family: var(--font-display);
  font-weight: 600;
}

.empty-note {
  max-width: 60ch;
  padding: 16px 18px;
  border-left: 3px solid var(--tile);
  border-radius: 0 10px 10px 0;
  background: var(--wall-2);
  color: var(--ink);
}

.ask {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* ------------------------------------------------------------------ pengurus */
.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.board li {
  display: grid;
  gap: 2px;
  padding: 16px 0;
  border-top: 1px solid var(--wall-3);
}
.board__role {
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.board__name {
  color: var(--teal-deep);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.25;
}
/* The first seat (the chair) heads the list on its own row. */
.board li:first-child {
  grid-column: 1 / -1;
  padding-bottom: 24px;
}
.board li:first-child .board__name {
  font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.2rem);
}

/* ------------------------------------------------------------------ events (PHBI, special event) */
.events h2 {
  margin-bottom: 28px;
}
/* Sections that continue the intro text (events, board) sit close under it. */
.events + .events,
.service:not(.service--pair) + .section {
  padding-top: 0;
}
.events__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
  gap: 40px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.event {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.event__poster img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 24px -14px rgb(28 25 21 / 0.6);
}
.event__date {
  margin: 0 0 4px;
  color: var(--tile);
  font-size: 0.9rem;
  font-weight: 600;
}
.event h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}
.event__speaker {
  margin: 4px 0 0;
  color: var(--ink-soft);
}
.event .prose {
  margin-top: 10px;
  font-size: 0.98rem;
}

/* ------------------------------------------------------------------ laporan keuangan */
.reports > .prose {
  margin-bottom: 32px;
}
.reports__year {
  border-top: 2px solid var(--teal-deep);
}
.reports__year + .reports__year {
  margin-top: 28px;
}
.reports__year summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
}
.reports__year summary::-webkit-details-marker {
  display: none;
}
.reports__year summary::after {
  content: "Buka";
  margin-left: auto;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 600;
}
.reports__year[open] summary::after {
  content: "Tutup";
}
.reports__year summary span {
  color: var(--ink-soft);
}
.reports__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.report {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 12px 32px;
  padding: 22px 0;
  border-top: 1px solid var(--wall-3);
}
.report h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}
.report__head p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}
.report__files {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px;
}
.report__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.report__photos a {
  display: grid;
  gap: 6px;
  width: 112px;
  color: var(--teal-deep);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.report__photos img {
  width: 112px;
  height: 148px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--wall-3);
  border-radius: 8px;
  background: var(--white);
}
.report__photos a:hover img {
  border-color: var(--tile);
}

/* ------------------------------------------------------------------ home: services strip, extra actions */
.layanan h2 {
  margin-bottom: 28px;
}
.layanan__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.layanan__list li {
  padding-top: 18px;
  border-top: 2px solid var(--tile);
}
.layanan__list h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
}
.layanan__list h3 a {
  color: var(--teal-deep);
  text-decoration-color: var(--wall-3);
}
.layanan__list h3 a:hover {
  text-decoration-color: var(--tile);
}
.layanan__list p {
  margin: 8px 0 0;
  color: var(--ink-soft);
}
.akad__actions,
.tk__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn--ghost-light {
  border-color: rgb(255 255 255 / 0.4);
  color: var(--white);
}
.btn--ghost-light:hover {
  border-color: var(--white);
}

/* ------------------------------------------------------------------ footer site map */
.footer__grid {
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 32px;
}
.footer__about p {
  margin: 0 0 6px;
  font-size: 0.9rem;
}
.footer__about .footer__name {
  margin-bottom: 10px;
  font-size: 1.3rem;
}
.footer__about a {
  color: var(--teal-soft);
}
.footer nav {
  display: block;
}
.footer__head {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
}
.footer nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer nav li + li {
  margin-top: 6px;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .service--photo,
  .report {
    grid-template-columns: minmax(0, 1fr);
  }
  .service__photo {
    order: -1;
    max-width: 640px;
  }
  .layanan__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer__about,
  .footer__legal {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .page-head::after {
    right: -40px;
  }
  /* Phones: the menu already says where you are; the trail only pushes the title down.
     BreadcrumbList JSON-LD stays for search engines. */
  .crumbs {
    display: none;
  }
  .page-head {
    padding-top: calc(72px + 28px);
  }
  .page-head__summary {
    font-size: 1rem;
  }
  .event {
    grid-template-columns: 104px minmax(0, 1fr);
  }
  .report__photos a,
  .report__photos img {
    width: 96px;
  }
  .report__photos img {
    height: 128px;
  }
}

@media print {
  .page-head::after {
    content: none;
  }
}
