.home-stack {
  align-content: start;
  justify-content: center;
  padding-top: 72px;
  padding-bottom: 64px;
}

.home-program {
  min-height: 420px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.overlay {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: darken;
  background: rgba(0, 0, 0, 0.65);
  width: 100%;
  height: 100%;
  position: relative;
}

.text-justify {
  text-align: justify;
}

/* Banner CTA: a label without a link stays visible but is not clickable */
#banner-cta[aria-disabled="true"] {
  pointer-events: none;
  cursor: default;
}

#welcome-title,
#welcome-message,
#history-title,
#history-body {
  white-space: pre-line;
}

/* Tentang Kami: the carousel follows the history section with a 2rem gap */
#history .page-section {
  padding-bottom: 0;
}

#about-gallery .page-section {
  padding-top: 2rem;
}

/* Mobile: match the spacing of the history photos (mt-3 / pb-3) */
@media (max-width: 767.98px) {
  #about-gallery .page-section {
    margin-top: 1rem;
    padding-top: 0;
    padding-bottom: 1rem;
  }
}

/* The navbar dropdowns work without the caret, but Bootstrap's scrollspy
   requires the dropdown-toggle class to activate their links. */
#mainNav .dropdown-toggle::after {
  display: none;
}

.dropdown-menu {
  margin-top: 0.125rem;
  display: block;
  visibility: hidden;
  background-color: #fafafa;
  border: 0px;
  border-radius: 0px;
  -webkit-transition:
    transform 150ms,
    opacity 150ms,
    visibility 150ms;
  transition:
    transform 150ms,
    opacity 150ms,
    visibility 150ms;
  opacity: 0;
}

.show {
  opacity: 1;
}

.dropdown-item {
  padding-top: 16px;
  padding-bottom: 16px;
}

.dropdown:hover .dropdown-menu {
  visibility: visible;
  opacity: 1;
}

.nav-item {
  margin-top: 4px;
  margin-bottom: 4px;
}

iframe {
  width: 100%;
  height: 480px;
  display: block;
  aspect-ratio: 1/1;
}

.contact-subheader {
  font-weight: normal;
}

@media (min-width: 991px) {
  .service-container {
    max-width: 100%;
  }
}

@media only screen and (max-width: 991px) {
  .home-stack {
    align-content: center;
    justify-content: center;
  }

  .dropdown-menu {
    display: none;
    visibility: visible;
    opacity: 1;
  }

  .dropdown-menu.show {
    display: block;
  }
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Page loading overlay (shown until the CMS content has been fetched) */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1e293b;
  transition: opacity 0.4s ease;
}

.page-loader--hidden {
  opacity: 0;
  pointer-events: none;
}

.page-loader__spinner {
  width: 3rem;
  height: 3rem;
  border: 0.35rem solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: page-loader-spin 0.8s linear infinite;
}

@keyframes page-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Artikel: keep the footer at the bottom of short pages */
body.article-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.article-page > section {
  flex: 1 0 auto;
}

body.article-page > footer {
  flex-shrink: 0;
}

/* Artikel detail: rich text content (matches the CMS editor output) */
.article-subtitle {
  margin: 0 0 1rem;
  color: #212529;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.article-body-rich.ql-editor {
  height: auto;
  padding: 0;
  overflow: visible;
  color: #212529;
  font-family: inherit;
  font-size: 1rem;
}

.article-body-rich.ql-editor h2 {
  font-size: 1.5em;
}

.article-body-rich.ql-editor h3 {
  font-size: 1.17em;
}

.article-body-rich.ql-editor h4 {
  font-size: 1em;
}

.article-body-rich.ql-editor a {
  color: #06c;
  text-decoration: underline;
}

.article-body-rich.ql-editor blockquote {
  margin: 5px 0;
  padding: 0 0 0 16px;
  border-left: 4px solid #ccc;
}

/* Artikel list */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.article-list__empty {
  color: #6c757d;
  text-align: center;
}

.article-card__link {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background-color: #fff;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 150ms ease;
}

.article-card__link:hover {
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.14);
}

.article-card__thumb {
  flex: 0 0 160px;
  width: 160px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #e9ecef;
}

.article-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.article-card__title,
.article-card__desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-card__title {
  margin: 0;
  color: #212529;
  font-size: 16px;
}

.article-card__desc {
  margin: 0.25rem 0 0;
  color: #6c757d;
  font-size: 12px;
}

.article-card__meta {
  margin: auto 0 0;
  padding-top: 0.5rem;
  color: #6c757d;
  font-size: 10px;
}

@media (max-width: 575.98px) {
  .article-card__link {
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .article-card__thumb {
    flex-basis: 96px;
    width: 96px;
  }
}
