.fic-khutbah-archive {
  background: var(--fic-surface);
  color: var(--fic-text-dark);
}

.khutbah-hero {
  position: relative;
  overflow: hidden;
  background: var(--fic-teal-deep);
  padding-inline: 0;
}

.khutbah-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.khutbah-hero__copy {
  max-width: 560px;
}

.khutbah-hero__copy h1 {
  margin: 0 0 16px;
  color: var(--fic-white);
  font-family: var(--fic-font-heading);
  font-size: var(--fic-type-hero-size);
  font-weight: var(--fic-type-hero-weight);
  letter-spacing: var(--fic-type-hero-tracking);
  line-height: var(--fic-type-hero-leading);
}


.khutbah-hero__crumbs {
  color: var(--fic-text-on-dark-muted);
  font-size: var(--fic-type-small-size);
}

.khutbah-hero__crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 var(--fic-space-md);
  list-style: none;
}

.khutbah-hero__crumbs a {
  color: inherit;
  text-decoration: none;
}

.khutbah-hero__crumbs a:hover {
  color: var(--fic-gold-light);
  text-decoration: underline;
}

.khutbah-hero__crumbs li + li::before {
  content: '/';
  margin-right: 8px;
  color: var(--fic-gold);
}

.khutbah-hero__crumbs [aria-current] {
  color: var(--fic-white);
}

.khutbah-hero__copy h1 span {
  color: var(--fic-gold);
}

.khutbah-hero__copy p {
  max-width: 480px;
  margin: 0;
  color: var(--fic-text-on-dark-mid);
  font-size: var(--fic-type-lead-size);
  font-weight: var(--fic-type-lead-weight);
  letter-spacing: var(--fic-type-tracking);
  line-height: var(--fic-type-lead-leading);
}


.khutbah-hero__stats {
  display: flex;
  gap: 30px;
  padding: 22px 28px;
  border: 1px solid var(--fic-edge-gold);
  border-radius: var(--fic-radius-card);
  background: var(--fic-teal-mid);
  box-shadow: var(--fic-shadow-card-dark);
}

.khutbah-hero__stats div {
  min-width: 88px;
  text-align: center;
}

.khutbah-hero__stats strong,
.khutbah-hero__stats span {
  display: block;
}

.khutbah-hero__stats strong {
  margin: 0 0 6px;
  color: var(--fic-gold);
  font-family: var(--fic-font-heading);
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}

/* text-on-dark-muted meets AA contrast on teal-mid. */
.khutbah-hero__stats span {
  color: var(--fic-text-on-dark-muted);
  font-family: var(--fic-font-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: var(--fic-type-tracking);
  text-transform: uppercase;
}

.khutbah-featured {
  padding: 68px 0 40px;
}

.khutbah-featured .fic-eyebrow {
  margin-bottom: 20px;
  border-color: rgba(201, 168, 76, .5);
  background: var(--fic-gold-pale);
  color: #7a5c00;
}

.khutbah-featured__card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.khutbah-featured__media { min-height: 340px; aspect-ratio: auto; }
.khutbah-featured__media .fic-khutbah-card__image { position: absolute; inset: 0; }

.khutbah-featured__actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.khutbah-filters {
  padding: 20px 0 0;
}

.khutbah-filters__form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.khutbah-filters__form.is-loading {
  cursor: progress;
}

.khutbah-filters__form.is-loading .fic-button-primary {
  background: var(--fic-gold-light);
  cursor: progress;
}

.khutbah-filters__search {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 240px;
}

.khutbah-filters__search svg {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--fic-text-light);
  transform: translateY(-50%);
}

.khutbah-filters input,
.khutbah-filters select {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid var(--fic-surface-alt);
  border-radius: var(--fic-radius-sm);
  background: var(--fic-white);
  color: var(--fic-teal-deep);
}

/* 16px controls prevent iOS zoom on focus. */
.khutbah-filters input {
  padding: 12px 14px 12px 40px;
  font-size: 16px;
}

.khutbah-filters select {
  min-width: 150px;
  padding: 12px 36px 12px 16px;
  font-family: var(--fic-font-heading);
  font-size: 16px;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
}

.khutbah-filters input:focus,
.khutbah-filters select:focus {
  border-color: var(--fic-gold);
}

.khutbah-filters__selects {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.khutbah-filters__selects label {
  position: relative;
}

.khutbah-filters__selects label::after {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--fic-teal-mid);
  border-bottom: 2px solid var(--fic-teal-mid);
  content: "";
  pointer-events: none;
  transform: translateY(-35%) rotate(45deg);
}

.khutbah-filters__selects .fic-button-primary {
  min-height: 48px;
  border: 0;
  cursor: pointer;
}

.khutbah-filters__reset {
  color: var(--fic-teal-deep);
  font-family: var(--fic-font-heading);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--fic-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-transform: uppercase;
}

/* Hidden until a filter is applied; display above must not override [hidden]. */
.khutbah-filters__reset[hidden] {
  display: none;
}

.khutbah-library {
  padding: var(--fic-space-lg) 0 var(--fic-section-pad-y);
}

.khutbah-library__count {
  margin: 0 0 20px;
  color: var(--fic-text-light);
  font-size: 14px;
  font-weight: 700;
}

.khutbah-library__count strong {
  color: var(--fic-teal-deep);
  font-weight: 800;
}

.khutbah-library__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--fic-grid-gap);
}

/* No container opacity (3): the busy grid stops input; the Filter button shows progress. */
.khutbah-library__grid.is-loading {
  cursor: progress;
  pointer-events: none;
}


.khutbah-library__error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0 0 20px;
  border: 1px solid var(--fic-danger);
  border-radius: var(--fic-radius-sm);
  background: var(--fic-danger-surface);
  color: var(--fic-text-dark);
  padding: 14px 20px;
}

.khutbah-library__error[hidden] {
  display: none;
}

.khutbah-library__error .fic-icon {
  flex-shrink: 0;
  color: var(--fic-danger);
}

.khutbah-library__error p {
  flex: 1 1 240px;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.khutbah-library__retry {
  min-height: 44px;
}

.fic-khutbah-archive .navigation.pagination {
  margin-top: var(--fic-space-lg);
}

.khutbah-library__empty {
  grid-column: 1 / -1;
  padding: 44px;
  border: 1px solid var(--fic-line-on-light);
  box-shadow: var(--fic-shadow-rest);
  border-radius: var(--fic-radius-card);
  background: var(--fic-white);
  text-align: center;
}

[data-fic-khutbah-pagination].is-loading {
  cursor: progress;
  pointer-events: none;
}

.khutbah-library__empty h2 {
  margin: 0 0 8px;
  color: var(--fic-teal-deep);
  font-family: var(--fic-font-heading);
  font-size: var(--fic-type-panel-size);
  font-weight: var(--fic-type-panel-weight);
  letter-spacing: var(--fic-type-tracking);
  line-height: var(--fic-type-panel-leading);
}

.khutbah-library__empty p {
  margin: 0;
  color: var(--fic-text-mid);
}

.fic-khutbah-archive + .site-footer {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .khutbah-hero__inner,
  .khutbah-filters__form {
    align-items: flex-start;
    flex-direction: column;
  }

  .khutbah-featured__card {
    grid-template-columns: 1fr;
  }

  .khutbah-featured__media {
    min-height: 260px;
  }

  .khutbah-library__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .khutbah-library__grid > .fic-khutbah-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .khutbah-hero__stats {
    justify-content: space-around;
    width: 100%;
    gap: 14px;
    padding: 20px;
  }

  .khutbah-featured {
    padding: 52px 0 30px;
  }

  .khutbah-featured__actions,
  .khutbah-filters__selects {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .khutbah-featured__actions .fic-button-primary,
  .khutbah-featured__actions .fic-button-ghost,
  .khutbah-filters__selects .fic-button-primary,
  .khutbah-filters__selects label,
  .khutbah-filters__search {
    width: 100%;
    max-width: none;
  }

  .khutbah-library__grid {
    grid-template-columns: 1fr;
  }

  .khutbah-library__grid > .fic-khutbah-card:last-child:nth-child(odd) {
    grid-column: auto;
  }
}


.khutbah-library--launch { padding-top: var(--fic-section-pad-y); }
.khutbah-library__launch { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px); gap: var(--fic-space-md); align-items: center; }
.khutbah-library__launch-note { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 48px; border: 1px solid var(--fic-line-on-light); border-radius: var(--fic-radius-card); background: var(--fic-white); box-shadow: var(--fic-shadow-rest); }
.khutbah-library__launch-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: var(--fic-space-md); border: 1px solid var(--fic-surface-alt); border-radius: var(--fic-radius-sm); background: var(--fic-surface); color: var(--fic-teal-bright); }
.khutbah-library__launch-note h2 { margin: 0 0 12px; color: var(--fic-text-dark); font-family: var(--fic-font-heading); font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; }
.khutbah-library__launch-note p { max-width: 52ch; margin: 0; color: var(--fic-text-mid); font-family: var(--fic-font-body); font-size: 17px; line-height: 1.65; }
.khutbah-library__launch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fic-space-sm) var(--fic-space-md); margin-top: var(--fic-space-lg); }
.khutbah-library__launch-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1.5px solid var(--fic-teal-deep); border-radius: var(--fic-radius-sm); background: transparent; color: var(--fic-teal-deep); font-family: var(--fic-font-heading); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; transition: background-color .15s ease-out, color .15s ease-out; }
.khutbah-library__launch-btn:hover { background: var(--fic-teal-deep); color: var(--fic-white); }
.khutbah-library__launch-link { color: var(--fic-teal-bright); font-family: var(--fic-font-heading); font-size: 14px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--fic-gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.khutbah-library__launch-link:hover { text-decoration-thickness: 3px; }
.khutbah-library__launch-btn:focus-visible,
.khutbah-library__launch-link:focus-visible { outline: 2px solid var(--fic-focus-light); outline-offset: 3px; }

@media (max-width: 1024px) {
  .khutbah-library__launch { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .khutbah-library__launch-note { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .khutbah-library__launch-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .khutbah-library__launch-btn { transition: none; }
}
