/* Homepage composition — First Hijrah redesign */
.fhf-home { overflow-x: hidden; }

.fhf-section {
  padding: 3rem 0;
}
.fhf-section--tight { padding: 2rem 0; }
.fhf-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
}
.fhf-section__head h2 {
  margin: 0;
  font-family: var(--fhf-display);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  color: var(--fhf-navy);
}
.fhf-section__head p {
  margin: 0.35rem 0 0;
  color: var(--fhf-muted);
  max-width: 36rem;
}
.fhf-section__link {
  color: var(--fhf-green);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
}
.fhf-section__link:hover { color: var(--fhf-green-dark); text-decoration: underline; }

.fhf-marker {
  display: inline-block;
  width: 36px; height: 3px;
  background: var(--fhf-gold);
  border-radius: 2px;
  margin-bottom: 0.65rem;
}

/* Hero */
.fhf-hero {
  position: relative;
  min-height: clamp(340px, 48vh, 520px);
  display: flex;
  align-items: center;
  color: #fff;
  isolation: isolate;
}
.fhf-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.fhf-hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.fhf-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,42,63,0.78) 0%, rgba(11,42,63,0.45) 48%, rgba(0,107,79,0.25) 100%),
    linear-gradient(180deg, rgba(11,42,63,0.25) 0%, rgba(11,42,63,0.55) 100%);
}
.fhf-hero__inner {
  width: min(100% - 2rem, var(--fhf-container));
  margin: 0 auto;
  padding: 2.5rem 0;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}
.fhf-hero__welcome {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--fhf-gold-soft);
}
.fhf-hero__eyebrow {
  display: none;
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--fhf-gold-soft);
}
.fhf-hero__title {
  margin: 0.35rem 0 0.55rem;
  font-family: var(--fhf-display);
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.12;
  font-weight: 700;
}
.fhf-hero__tagline {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
}
.fhf-hero__desc {
  margin: 0 0 1.25rem;
  max-width: 34rem;
  color: rgba(255,255,255,0.86);
  font-size: 1.02rem;
}
.fhf-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.fhf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
}
.fhf-btn--primary {
  background: var(--fhf-green);
  color: #fff;
  border-color: var(--fhf-green);
}
.fhf-btn--primary:hover { background: var(--fhf-green-dark); color: #fff; }
.fhf-btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.fhf-btn--ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.fhf-btn--navy {
  background: var(--fhf-navy);
  color: #fff;
}
.fhf-btn--outline {
  background: transparent;
  color: var(--fhf-green);
  border-color: var(--fhf-green);
}

.fhf-hero__quote {
  margin: 0;
  padding: 1.25rem 1.35rem;
  border-inline-start: 3px solid var(--fhf-gold);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
  border-radius: 0 12px 12px 0;
}
body.fhf-rtl .fhf-hero__quote {
  border-inline-start: 0;
  border-inline-end: 3px solid var(--fhf-gold);
  border-radius: 12px 0 0 12px;
}
.fhf-hero__quote p {
  margin: 0;
  font-family: var(--fhf-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.45;
}
.fhf-hero__quote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.85rem;
  opacity: 0.85;
  font-family: var(--fhf-font);
}

.fhf-hero__mobile-lines { display: none; }

/* Prayer section shell */
.fhf-prayer-section {
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
  padding-bottom: 0.5rem;
}

/* Quick actions */
.fhf-quick {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
}
.fhf-quick__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-align: center;
  text-decoration: none;
  color: var(--fhf-navy);
  padding: 1rem 0.5rem;
  border-radius: 14px;
  min-height: 110px;
  transition: background .15s ease, transform .15s ease;
}
.fhf-quick__item:hover {
  background: var(--fhf-green-soft);
  color: var(--fhf-green);
  transform: translateY(-2px);
}
.fhf-quick__icon {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--fhf-bg);
}
.fhf-quick__icon img { width: 30px; height: 30px; }
.fhf-quick__item span {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.25;
}

/* Events */
.fhf-events {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
.fhf-event {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid transparent;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fhf-event:hover {
  border-color: var(--fhf-border);
  box-shadow: var(--fhf-shadow);
}
.fhf-event__media {
  position: relative;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #0B2A3F, #006B4F);
  overflow: hidden;
}
.fhf-event__media img {
  width: 100%; height: 100%; object-fit: cover;
}
.fhf-event__date {
  position: absolute;
  top: 0.75rem; inset-inline-start: 0.75rem;
  background: #fff;
  color: var(--fhf-navy);
  border-radius: 10px;
  min-width: 52px;
  text-align: center;
  padding: 0.35rem 0.4rem;
  line-height: 1.1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.fhf-event__date strong { display: block; font-size: 1.15rem; }
.fhf-event__date span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--fhf-green);
}
.fhf-event__body { padding: 0.95rem 0.15rem 0.25rem; }
.fhf-event__cat {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fhf-gold);
  font-weight: 700;
}
.fhf-event__body h3 {
  margin: 0.25rem 0 0.4rem;
  font-size: 1.08rem;
  color: var(--fhf-navy);
  font-family: var(--fhf-display);
}
.fhf-event__meta {
  margin: 0;
  color: var(--fhf-muted);
  font-size: 0.88rem;
}

/* Programs */
.fhf-programs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.fhf-program {
  position: relative;
  min-height: 160px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  color: #fff;
}
.fhf-program img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.fhf-program::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,42,63,0.05) 15%, rgba(11,42,63,0.78) 100%);
  z-index: 1;
}
.fhf-program span {
  position: relative;
  z-index: 2;
  padding: 1rem 1.05rem;
  font-family: var(--fhf-display);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
  line-height: 1.25;
}

/* Split: programs + support */
.fhf-split {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.fhf-support {
  background: #fff;
  border-radius: 16px;
  padding: 1.4rem 1.35rem;
  border: 1px solid var(--fhf-border);
}
.fhf-support h2 {
  margin: 0 0 0.5rem;
  font-family: var(--fhf-display);
  font-size: 1.45rem;
  color: var(--fhf-navy);
}
.fhf-support > p {
  margin: 0 0 1.1rem;
  color: var(--fhf-muted);
}
.fhf-support__amount {
  font-family: var(--fhf-display);
  font-size: 2rem;
  color: var(--fhf-green);
  font-weight: 700;
  margin: 0 0 0.55rem;
}
.fhf-support__bar {
  height: 10px;
  background: #e8eee9;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.fhf-support__bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--fhf-green), var(--fhf-gold));
  border-radius: inherit;
}
.fhf-support__stats {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--fhf-muted);
  margin-bottom: 1.1rem;
}
.fhf-support__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.fhf-support__actions .fhf-btn { width: 100%; }

/* Services strip */
.fhf-services {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}
.fhf-service {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  text-decoration: none;
  color: var(--fhf-navy);
  padding: 1rem 0.5rem;
  border-radius: 12px;
  min-height: 110px;
}
.fhf-service:hover { background: var(--fhf-green-soft); color: var(--fhf-green); }
.fhf-service img { width: 36px; height: 36px; }
.fhf-service span { font-weight: 700; font-size: 0.86rem; line-height: 1.25; }

/* Visitor */
.fhf-visitor {
  background:
    radial-gradient(circle at top right, rgba(199,154,43,0.12), transparent 45%),
    linear-gradient(135deg, #0B2A3F 0%, #0a4d3a 100%);
  color: #fff;
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
}
.fhf-visitor h2 {
  margin: 0 0 0.4rem;
  font-family: var(--fhf-display);
  font-size: 1.6rem;
}
.fhf-visitor > p { margin: 0 0 1.1rem; color: rgba(255,255,255,0.88); max-width: 36rem; }
.fhf-visitor__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.fhf-visitor__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}
.fhf-visitor__links a:hover { background: rgba(255,255,255,0.12); }

/* Announcements — compact card between MD/DC and prayer table */
.fhf-announce { display: grid; gap: 0.55rem; }
.fhf-announce--inline { margin: 0 0 0.85rem; }
.fhf-announce__track { display: grid; }
.fhf-announce__card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 0.95rem;
  background: #fffef8;
  border: 1px solid rgba(199, 154, 43, 0.35);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  min-height: 64px;
  box-shadow: 0 4px 14px rgba(11, 42, 63, 0.05);
}
.fhf-announce__card[hidden] { display: none !important; }
.fhf-announce__card.is-emergency {
  background: #fff7f7;
  border-color: rgba(180, 35, 35, 0.35);
}
.fhf-announce__card.is-emergency .fhf-announce__badge {
  color: #b42323;
  background: rgba(180, 35, 35, 0.1);
}
.fhf-announce__card:hover { border-color: var(--fhf-green); }
.fhf-announce__icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(199, 154, 43, 0.14);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fhf-gold);
}
.fhf-announce__body { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
.fhf-announce__badge {
  display: inline-flex; align-self: flex-start;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em;
  color: var(--fhf-green); background: var(--fhf-green-soft);
  border-radius: 999px; padding: 0.12rem 0.45rem;
}
.fhf-announce__title {
  font-size: 0.98rem;
  color: var(--fhf-navy);
  line-height: 1.3;
}
.fhf-announce__desc {
  font-size: 0.88rem;
  color: var(--fhf-muted);
  line-height: 1.35;
}
.fhf-announce__chevron {
  font-size: 1.4rem;
  color: var(--fhf-muted);
  line-height: 1;
}
.fhf-announce__dots {
  display: flex; justify-content: center; gap: 0.35rem;
}
.fhf-announce__dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: 0; padding: 0; background: #cfd6de; cursor: pointer;
}
.fhf-announce__dot.is-active { background: var(--fhf-green); }
.fhf-announce__all {
  justify-self: end;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fhf-green);
  text-decoration: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.fhf-announce__all:hover { text-decoration: underline; }

.fhf-empty {
  color: var(--fhf-muted);
  font-size: 0.95rem;
  margin: 0;
  padding: 0.5rem 0;
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .fhf-hero__title { animation: fhfFadeUp .7s ease both; }
  .fhf-hero__cta { animation: fhfFadeUp .7s ease .12s both; }
  .fhf-prayer-section .fhf-prayer-exp { animation: fhfFadeUp .65s ease .08s both; }
  .fhf-quick__item { transition: background .15s ease, transform .2s ease; }
}
@keyframes fhfFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .fhf-hero__inner { grid-template-columns: 1fr; }
  .fhf-hero__quote { max-width: 36rem; }
  .fhf-quick { grid-template-columns: repeat(3, 1fr); }
  .fhf-events { grid-template-columns: 1fr 1fr; }
  .fhf-split { grid-template-columns: 1fr; }
  .fhf-services { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767.98px) {
  /* Compact overlay hero — prayer-first: keep first viewport lean */
  .fhf-hero {
    position: relative;
    display: block;
    min-height: 0;
    height: clamp(160px, 48vw, 220px);
    overflow: hidden;
    border-radius: 0;
    background: #0B2A3F;
  }
  .fhf-hero__media {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
  }
  .fhf-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    display: block;
  }
  .fhf-hero__shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background:
      linear-gradient(180deg, rgba(11,42,63,0.25) 0%, rgba(11,42,63,0.72) 55%, rgba(11,42,63,0.88) 100%);
  }
  .fhf-hero__inner {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    width: min(100% - 1.75rem, var(--fhf-container));
    margin: 0 auto;
    padding: 0.85rem 0 0.9rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .fhf-hero__copy {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 0;
  }
  .fhf-hero__eyebrow { display: block; }
  .fhf-hero__welcome,
  .fhf-hero__title,
  .fhf-hero__tagline,
  .fhf-hero__desc,
  .fhf-hero__quote { display: none; }
  .fhf-hero__mobile-lines {
    display: block;
    margin: 0 0 0.55rem;
    font-family: var(--fhf-display);
    font-size: clamp(1.35rem, 6.2vw, 1.75rem);
    line-height: 1.12;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0,0,0,0.35);
  }
  .fhf-hero__mobile-lines div { display: inline; }
  .fhf-hero__mobile-lines div + div::before { content: " "; }
  .fhf-hero__cta { gap: 0.4rem; }
  .fhf-hero__cta .fhf-btn {
    min-height: 36px;
    font-size: 0.82rem;
    padding: 0.35rem 0.85rem;
  }
  .fhf-hero__cta .fhf-btn--ghost {
    background: rgba(255,255,255,0.14);
    color: #fff;
    border-color: rgba(255,255,255,0.85);
  }
  .fhf-prayer-section { margin-top: 0.75rem; }
  .fhf-quick { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .fhf-quick__item {
    min-height: 104px;
    padding: 0.85rem 0.45rem;
  }
  .fhf-quick__item span { font-size: 0.86rem; }
  .fhf-quick__icon { width: 48px; height: 48px; }
  .fhf-events { grid-template-columns: 1fr; }
  .fhf-programs { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .fhf-program { min-height: 130px; aspect-ratio: 4 / 3; }
  .fhf-program span { font-size: 0.95rem; padding: 0.75rem; }
  .fhf-services { grid-template-columns: 1fr 1fr; }
  .fhf-service { min-height: 96px; padding: 0.85rem 0.4rem; }
  .fhf-service span { font-size: 0.82rem; }
  .fhf-section { padding: 2rem 0; }
  .fhf-section__head h2 { font-size: clamp(1.35rem, 5.5vw, 1.7rem); }
  .fhf-support { padding: 1.15rem 1rem; }
  .fhf-support h2 { font-size: 1.3rem; }
  .fhf-visitor { padding: 1.35rem 1.1rem; border-radius: 16px; }
  .fhf-visitor h2 { font-size: 1.35rem; }
  .fhf-visitor__links a { font-size: 0.88rem; min-height: 44px; }
}

@media (max-width: 360px) {
  .fhf-hero { height: 160px; }
  .fhf-programs { grid-template-columns: 1fr; }
  .fhf-quick__item span { font-size: 0.8rem; }
  .fhf-services { grid-template-columns: 1fr 1fr; }
}
