/* Darwaza Portal — homepage styles
 * huna.rooted.om visual language, Darwaza palette
 */

/* ============ HEADER ============ */
.site-header {
  background: var(--bg-header);
  color: var(--fg-on-navy);
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--space-7);
  gap: var(--space-7);
  /*border-bottom: 1px solid var(--border-on-navy);*/
  border-bottom: 3px solid #008b37;

}
.site-header .wordmark {
  font-weight: var(--fw-extra);
  font-size: 26px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.site-header .wordmark .accent { color: var(--brand-orange); }
.site-header .wordmark .accent-blue { color: var(--brand-blue-soft); }

.nav-primary {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-left: var(--space-6);
}
.nav-primary > .nav-item {
  position: relative;
}
.nav-primary .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  color: var(--fg-on-navy);
  font-weight: var(--fw-semibold);
  font-size: 14px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: background var(--transition-fast);
}
.nav-primary .nav-link:hover,
.nav-primary .nav-link[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
}
.nav-primary .nav-link .chev {
  width: 14px; height: 14px;
  transition: transform var(--transition-fast);
}
.nav-primary .nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* dropdown menu */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: var(--bg-card);
  color: var(--fg-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-default);
  padding: var(--space-3);
  display: none;
  flex-direction: column;
  gap: 2px;
}
.dropdown.open { display: flex; }
.dropdown a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--fg-1);
  font-weight: var(--fw-medium);
  font-size: 14px;
  transition: background var(--transition-fast);
}
.dropdown a:hover { background: var(--bg-section-1); }
.dropdown a .icon-chip {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--info-soft-bg);
  color: var(--brand-blue-mid);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.dropdown a .icon-chip svg { width: 18px; height: 18px; }
.dropdown a .meta {
  display: block;
  font-size: 12px;
  color: var(--fg-3);
  font-weight: var(--fw-regular);
}

.header-spacer { flex: 1; }

/* small header pills */
.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-on-navy);
  border-radius: var(--radius-pill);
  color: var(--fg-on-navy);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.header-pill:hover { background: rgba(255, 255, 255, 0.14); }
.header-pill svg { width: 16px; height: 16px; }

/* follow toggle */
.follow-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-on-navy);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.follow-toggle .dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
  transition: background var(--transition-fast);
}
.follow-toggle .dot::after {
  content: '';
  position: absolute; inset: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
}
.follow-toggle.off .dot { background: var(--fg-4); }
.follow-toggle .label { font-size: 13px; font-weight: var(--fw-semibold); color: var(--fg-on-navy); }

/* social icons */
.socials { display: inline-flex; gap: 6px; }
.socials a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: var(--fg-on-navy);
  background: rgba(255, 255, 255, 0.06);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.socials a:hover { background: var(--brand-orange); color: white; }
.socials svg { width: 17px; height: 17px; }

/* corporate lockup */
.corporate-lockup {
  height: 50px;
  margin-left: var(--space-3);
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

/* ============ HERO SLIDESHOW ============ */
.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #000;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 800ms ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,42,67,0.30) 0%, rgba(16,42,67,0.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--space-10);
  max-width: 720px;
  color: white;
}
.hero-content .eyebrow {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--brand-orange-soft);
  margin-bottom: 12px;
}
.hero-content h1 {
  font-size: 52px;
  font-weight: var(--fw-extra);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-content p {
  font-size: 18px;
  font-weight: var(--fw-medium);
  opacity: 0.92;
  max-width: 540px;
}
.hero-cta-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.btn-primary {
  background: var(--brand-orange);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-bold);
  font-size: 15px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { background: var(--brand-orange-deep); }
.btn-primary svg { width: 16px; height: 16px; }
.btn-ghost {
  background: rgba(255,255,255,0.14);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  font-size: 15px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.22); }

/* hero pagination dots */
.hero-dots {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.hero-dots button {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.hero-dots button.active {
  background: white;
  transform: scale(1.2);
}

/* curved hero divider */
.hero-divider {
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 110px;
}

/* ============ SECTION SCAFFOLD ============ */
.section { padding: var(--space-10) 0; position: relative; }
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  gap: var(--space-6);
}
.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 28px;
  font-weight: var(--fw-extra);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.section-title::before {
  content: '';
  width: 6px;
  height: 32px;
  background: var(--brand-orange);
  border-radius: 3px;
}
.section.on-navy { background: var(--bg-section-2); color: var(--fg-on-navy); }
.section.on-navy .section-title { color: white; }
.section.on-light { background: var(--bg-section-1); color: var(--fg-on-section-1); }
.section.on-textured {
  background-color: var(--bg-textured);
  background-image:
    radial-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 12px 12px, 24px 24px;
  background-position: 0 0, 6px 6px;
}
.section .view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: var(--brand-orange);
  color: white;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-bold);
  font-size: 14px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast);
}
.section .view-all:hover { background: var(--brand-orange-deep); }

/* curved divider svg block */
.curve { display: block; width: 100%; }

/* ============ QUICK SERVICES ROW ============ */
.qsrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-9);
  padding: var(--space-9) var(--space-9);
}
.qsrow .arrow-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border-default);
  background: var(--bg-page);
  color: var(--fg-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.qsrow .arrow-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}
.qsrow .arrow-btn svg { width: 18px; height: 18px; }

/* ============ CIRCLE SERVICE BUTTON ============ */
.svc-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}
.svc-circle .circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--service-circle-bg);
  color: var(--service-circle-fg);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 4px var(--bg-page), 0 0 0 5px var(--service-circle-bg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.section.on-navy .svc-circle .circle {
  box-shadow: 0 0 0 4px var(--bg-section-2), 0 0 0 5px white;
}
.section.on-light .svc-circle .circle {
  box-shadow: 0 0 0 4px var(--bg-section-1), 0 0 0 5px var(--service-circle-bg);
}
.svc-circle .circle svg { width: 44px; height: 44px; stroke-width: 2; }
.svc-circle:hover .circle { transform: translateY(-4px); }
.svc-circle .label {
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
}

/* services grid */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-9) var(--space-6);
  justify-items: center;
  margin-bottom: var(--space-8);
}

/* ============ NEWS CARD ============ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}
.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition-base);
}
.news-card:hover { transform: translateY(-4px); }
.news-card .thumb {
  aspect-ratio: 1.05;
  background-size: cover;
  background-position: center;
  background-color: var(--brand-blue);
}
.news-card .footer {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  color: var(--fg-2);
}
.news-card .footer .actions { display: flex; gap: 10px; align-items: center; }
.news-card .footer svg { width: 18px; height: 18px; }
.news-card .body {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
}
.news-card .body .title { font-size: 14px; font-weight: var(--fw-bold); margin-bottom: 4px; color: var(--fg-1); }
.news-card .body .meta { font-size: 12px; color: var(--fg-3); }

/* ============ EVENTS / TIPS ============ */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: var(--space-9);
  align-items: stretch;
}
.split-2 .divider {
  background: var(--border-default);
  width: 2px;
}
.list-block h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: var(--fw-extra);
  text-transform: uppercase;
  margin-bottom: var(--space-6);
  color: var(--brand-blue);
  letter-spacing: 0.02em;
}
.list-block h3::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--brand-orange);
  border-radius: 2px;
}
.list-block ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.list-block li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  color: var(--fg-1);
}
.list-block li::before {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand-orange);
  flex-shrink: 0;
}

/* ============ EMPLOYEES CORNER ============ */
.emp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  padding-top: 80px;
}
.emp-card {
  position: relative;
  background: var(--brand-blue);
  color: white;
  border-radius: var(--radius-md);
  padding: 80px 24px 28px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.emp-card .avatar {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-section-1);
  border: 6px solid var(--bg-page);
  background-size: cover;
  background-position: center;
}
.emp-card .name {
  font-size: 18px;
  font-weight: var(--fw-bold);
  margin-bottom: 4px;
}
.emp-card .role {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 16px;
}
.emp-card .hr {
  width: 60px;
  height: 2px;
  background: rgba(255,255,255,0.4);
  margin: 0 auto 16px;
}
.emp-card .msg {
  font-size: 14px;
  opacity: 0.95;
}

.section-eyebrow {
  text-align: center;
  font-size: 32px;
  font-weight: var(--fw-extra);
  color: var(--brand-blue);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.section.on-navy .section-eyebrow { color: white; }
.section-rule {
  width: 60px;
  height: 3px;
  background: var(--brand-orange);
  margin: 0 auto var(--space-8);
  border-radius: 2px;
}

/* ============ MEDIA GALLERY CAROUSEL ============ */
.media-rail {
  display: flex;
  gap: var(--space-5);
  overflow: hidden;
  padding: var(--space-3) 0 var(--space-7);
}
.media-card {
  flex: 0 0 calc((100% - 60px) / 4);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.media-card .img {
  aspect-ratio: 1.4;
  background-size: cover;
  background-position: center;
  background-color: var(--brand-blue);
}
.media-card .cap {
  text-align: center;
  padding: 14px 12px;
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg-1);
}
.media-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-5);
}
.media-dots button {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--fg-4);
  cursor: pointer;
  padding: 0;
}
.media-dots button.active { background: var(--brand-orange); }

/* ============ CONTACT / CERT / FOOTER ============ */
.contact-block {
  text-align: center;
  padding: var(--space-9) 0;
}
.contact-block .cu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--brand-orange);
  color: white;
  padding: 16px 38px;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-bold);
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  margin-bottom: var(--space-6);
}
.contact-block .cu-btn:hover { background: var(--brand-orange-deep); }
.contact-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  font-size: 16px;
  font-weight: var(--fw-medium);
  color: white;
}
.contact-info .sep {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.3);
}
.cert-divider {
  width: 90%;
  margin: var(--space-7) auto var(--space-8);
  border: 0;
  border-top: 2px dashed rgba(255,255,255,0.3);
}
.cert-row {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding-bottom: var(--space-7);
}
.cert-badge {
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  color: white;
  text-align: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 11px;
  font-weight: var(--fw-bold);
  padding: 12px;
  line-height: 1.2;
}
.cert-badge .check {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand-orange);
  display: grid; place-items: center;
  margin-bottom: 6px;
}
.cert-badge .check svg { width: 22px; height: 22px; color: white; }

.copyright-row {
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  padding-bottom: var(--space-5);
}

.bottom-strip {
  background: var(--brand-orange);
  color: white;
  text-align: center;
  padding: 18px;
  font-weight: var(--fw-extra);
  letter-spacing: 0.15em;
  font-size: 18px;
}

/* ============ PRAYER TIMES STRIP ============ */
.prayer-strip {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-default);
  padding: 12px 0;
}
.prayer-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.prayer-strip .left {
  display: flex; align-items: center; gap: var(--space-4);
  color: var(--fg-2);
  font-size: 13px;
}
.prayer-strip .left .city {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: var(--fw-bold);
  color: var(--fg-1);
}
.prayer-strip .left .city svg { width: 14px; height: 14px; color: var(--brand-orange); }
.prayer-times {
  display: flex;
  gap: var(--space-5);
  font-size: 13px;
}
.prayer-times .pt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
}
.prayer-times .pt.next {
  background: var(--info-soft-bg);
  color: var(--brand-blue);
  font-weight: var(--fw-bold);
}
.prayer-times .pt .name {
  color: var(--fg-3);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.prayer-times .pt.next .name { color: var(--brand-blue); }
.prayer-times .pt .time { font-weight: var(--fw-bold); color: var(--fg-1); }
.prayer-times .pt.next .time { color: var(--brand-blue); }

.theme-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-on-navy);
  color: var(--fg-on-navy);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.theme-toggle:hover { background: rgba(255,255,255,0.18); }
.theme-toggle svg { width: 18px; height: 18px; }

.calendar-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-card);
  color: var(--fg-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-default);
  padding: var(--space-5);
  width: 320px;
  display: none;
  z-index: 60;
}
.calendar-popover.open { display: block; }
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-4);
}
.cal-head .month-label { font-weight: var(--fw-bold); font-size: 16px; }
.cal-head button {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-section-1);
  border: none;
  color: var(--fg-1);
  cursor: pointer;
  display: grid; place-items: center;
}
.cal-head button:hover { background: var(--bg-elevated); }
.cal-head svg { width: 14px; height: 14px; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: 13px;
}
.cal-grid .dow { text-align: center; padding: 6px; color: var(--fg-3); font-weight: var(--fw-bold); font-size: 11px; }
.cal-grid .day {
  text-align: center;
  padding: 8px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--fg-2);
  font-weight: var(--fw-medium);
}
.cal-grid .day:hover { background: var(--bg-section-1); color: var(--fg-1); }
.cal-grid .day.today {
  background: var(--brand-orange);
  color: white;
  font-weight: var(--fw-bold);
}
.cal-grid .day.muted { color: var(--fg-4); opacity: 0.5; }
.cal-grid .day.event {
  position: relative;
}
.cal-grid .day.event::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--brand-blue-mid);
}

/* relative wrapper used for popover positioning */
.has-popover { position: relative; }

@media (max-width: 1100px) {
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .emp-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content h1 { font-size: 36px; }
  .nav-primary { display: none; }
}
