/* ================================================================
   UAIA PERTH — NAVBAR & FOOTER
   Option B: Sage & White
================================================================ */

/* ── NAVBAR ── */
#navbar {
  position: sticky;
  top: 56px; left: 0; right: 0;
  z-index: 1000;
  background: #edf3ed;
  border-bottom: 2px solid rgba(93,200,90,0.25);
  padding: 0.85rem 0;
  transition: box-shadow var(--t-base) var(--ease), padding var(--t-base) var(--ease);
}
#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(26,46,26,0.08);
  padding: 0.6rem 0;
  border-bottom-color: rgba(93,200,90,0.35);
}
#navbar.solid { padding: 0.6rem 0; }

.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

/* Logo */
.nav-logo { display: flex; align-items: center; gap: 0.8rem; flex-shrink: 0; text-decoration: none; }
.logo-emblem { width: 72px; height: 72px; position: relative; flex-shrink: 0; border-radius: 50%; overflow: hidden; }
.logo-emblem-inner { width: 100%; height: 100%; position: relative; }
.logo-emblem-inner::after {
  content: ''; position: absolute; top: -50%; left: -75%;
  width: 55%; height: 200%;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
  animation: logoSpotlight 3s ease-in-out infinite; pointer-events: none;
}
@keyframes logoSpotlight {
  0%        { left: -75%; opacity: 0; }
  8%        { opacity: 1; }
  55%       { left: 130%; opacity: 1; }
  56%, 100% { left: 130%; opacity: 0; }
}
.logo-emblem svg { width: 100%; height: 100%; display: block; }
.nav-logo-text { display: flex; flex-direction: column; gap: 0.06rem; }
.nav-logo-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: #1a2e1a; line-height: 1.12; letter-spacing: -0.01em; }
.nav-logo-sub  { font-family: var(--font-body); font-size: 0.65rem; font-weight: 500; letter-spacing: 0.1em; color: #5a7a5a; text-transform: uppercase; }

/* Nav links */
.nav-links { display: flex; align-items: center; gap: 0.15rem; margin: 0 auto; }
.nav-links a {
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  white-space: nowrap; color: #2a2a2a;
  padding: 0.42rem 0.9rem; border-radius: var(--radius-pill);
  transition: color var(--t-fast), background var(--t-fast); letter-spacing: 0.01em;
}
.nav-links a:hover { color: #1a2e1a; background: rgba(93,200,90,0.1); }
.nav-links a.active { color: #5DC85A; font-weight: 600; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: ' ▾'; font-size: 0.65rem; opacity: 0.5; }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 220px; background: #ffffff;
  border: 1px solid rgba(93,200,90,0.25);
  border-radius: var(--radius-md); padding: 0.75rem 0 0.5rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 8px 32px rgba(26,46,26,0.12);
}
/* Invisible bridge fills the gap between trigger and menu */
.nav-dropdown-menu::before {
  content: ''; position: absolute; top: -0.75rem; left: 0; right: 0; height: 0.75rem;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.nav-dropdown-menu a {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1.2rem; font-size: 0.845rem;
  color: #2a2a2a; transition: color 0.15s, background 0.15s;
}
.nav-dropdown-menu a:hover { color: #5DC85A; background: #f0f7f0; }
.nav-dropdown-menu a .dot { width: 5px; height: 5px; border-radius: 50%; background: #5DC85A; flex-shrink: 0; }

/* Actions */
.nav-actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.nav-actions .btn-green,
.nav-mobile-ctas .btn-green {
  background: linear-gradient(135deg, #5DC85A 0%, #44a641 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.7rem 1.6rem;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 16px rgba(93,200,90,0.35), 0 1px 3px rgba(26,46,26,0.15);
  border: 1.5px solid rgba(255,255,255,0.15);
  transition: all 0.25s cubic-bezier(0.22,1,0.36,1);
}
.nav-actions .btn-green:hover,
.nav-mobile-ctas .btn-green:hover {
  background: linear-gradient(135deg, #6ed46b 0%, #5DC85A 100%);
  box-shadow: 0 6px 24px rgba(93,200,90,0.45), 0 2px 6px rgba(26,46,26,0.12);
  transform: translateY(-2px);
}

/* Hamburger */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 0.45rem; cursor: pointer; background: none; border: none; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: #1a2e1a; border-radius: 2px; transition: all 0.28s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: none; flex-direction: column;
  background: #f5f8f5; border-top: 1px solid rgba(93,200,90,0.2);
  padding: 0.5rem 0 1.25rem; max-height: 0; overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.nav-mobile.open { display: flex; max-height: 600px; }
.nav-mobile a {
  font-size: 0.95rem; font-weight: 500; color: #2a2a2a;
  padding: 0.72rem 1.5rem; transition: color 0.2s, background 0.2s;
  border-left: 2px solid transparent;
}
.nav-mobile a:hover { color: #5DC85A; background: rgba(93,200,90,0.06); border-left-color: #5DC85A; }
.nav-mobile a.active { color: #5DC85A; border-left-color: #5DC85A; }
.nav-mobile-ctas { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.75rem 1.5rem 0; }
.nav-mobile-ctas .btn { width: 100%; }
.nav-mobile-group-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: #5a7a5a; padding: 0.85rem 1.5rem 0.25rem;
}

/* ── JUMU'AH BANNER ── */
#jumuah-banner {
  background: #1a3d1a;
  border-bottom: 2px solid rgba(93,200,90,0.25);
  overflow: hidden; position: sticky; top: 0; z-index: 1001; width: 100%;
}
.jumuah-banner-inner { display: flex; align-items: stretch; min-height: 56px; }
.jumuah-banner-label {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1.5rem; background: #5DC85A;
  flex-shrink: 0; white-space: nowrap;
}
.jumuah-banner-label svg { width: 16px; height: 16px; color: #1a2e1a; }
.jumuah-banner-label span {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: #1a2e1a;
}
.jumuah-banner-scroll { flex: 1; overflow: hidden; display: flex; align-items: center; }
.jumuah-ticker {
  display: flex; gap: 0;
  animation: tickerScroll 36s linear infinite; white-space: nowrap;
}
.jumuah-ticker:hover { animation-play-state: paused; }
.jumuah-ticker-inner { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.jumuah-item {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0 2rem; border-right: 1px solid rgba(93,200,90,0.2);
}
.jumuah-item-mosque { font-size: 0.8rem; font-weight: 700; color: #5DC85A; letter-spacing: 0.04em; }
.jumuah-item-detail { font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.jumuah-item-time {
  font-size: 0.8rem; font-weight: 600; color: #ffffff;
  background: rgba(93,200,90,0.2); border: 1px solid rgba(93,200,90,0.35);
  padding: 0.15rem 0.55rem; border-radius: var(--radius-pill);
}
.jumuah-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(93,200,90,0.4); flex-shrink: 0; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── FOOTER ── */
#footer {
  background: #163318;
  padding: 4.5rem 0 0;
  border-top: 3px solid #5DC85A;
}
.footer-top {
  display: grid; grid-template-columns: 1.8fr 1fr 1.2fr 1fr;
  gap: clamp(2.5rem, 4vw, 5rem); padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1); align-items: start;
}
.footer-brand { display: flex; flex-direction: column; gap: 0; }
.footer-logo { margin-bottom: 1.25rem; display: inline-flex; }
.footer-logo .nav-logo-name { color: #ffffff; }
.footer-logo .nav-logo-sub { color: rgba(255,255,255,0.5); }
.footer-brand-desc { font-size: 0.85rem; line-height: 1.8; color: rgba(255,255,255,0.7); max-width: 300px; margin-bottom: 1.25rem; }
.footer-social { display: flex; gap: 0.5rem; }
.social-btn {
  width: 36px; height: 36px; border-radius: 4px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  color: rgba(255,255,255,0.6);
}
.social-btn:hover { background: #5DC85A; border-color: #5DC85A; color: #ffffff; transform: translateY(-2px); }
.social-btn svg { width: 14px; height: 14px; }
.footer-col h4 {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: #ffffff; margin-bottom: 1.1rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid rgba(93,200,90,0.2);
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul a { font-size: 0.84rem; color: rgba(255,255,255,0.7); transition: color 0.2s, padding-left 0.2s; display: inline-block; }
.footer-col ul a:hover { color: #5DC85A; padding-left: 4px; }
.footer-mosques-list { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-mosque-item { display: flex; flex-direction: column; gap: 0.1rem; }
.footer-mosque-name { font-size: 0.84rem; font-weight: 600; color: rgba(255,255,255,0.82); text-decoration: none; transition: color 0.2s; }
a.footer-mosque-name:hover { color: #5DC85A; }
.footer-mosque-area { font-size: 0.72rem; color: rgba(255,255,255,0.5); }
.footer-acnc { display: flex; align-items: center; gap: 0.85rem; margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-acnc-img { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.footer-acnc-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #5DC85A; margin-bottom: 0.2rem; }
.footer-acnc-abn { font-size: 0.75rem; color: rgba(255,255,255,0.55); font-weight: 500; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem; padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-copyright { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.footer-tagline { font-size: 0.74rem; color: rgba(255,255,255,0.45); }
.footer-tagline a { color: #5DC85A; text-decoration: none; transition: color 0.2s; }
.footer-tagline a:hover { color: #ffffff; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .nav-links { gap: 0; }
  .nav-links a { padding: 0.42rem 0.65rem; font-size: 0.8rem; }
}
@media (max-width: 820px) {
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  /* Jumuah banner: shrink label, smaller text */
  .jumuah-banner-label { padding: 0.5rem 0.9rem; }
  .jumuah-banner-label span { font-size: 0.62rem; letter-spacing: 0.12em; }
  .jumuah-item { padding: 0 1.25rem; gap: 0.45rem; }
  .jumuah-item-mosque, .jumuah-item-detail, .jumuah-item-time { font-size: 0.72rem; }
  /* Navbar: tighter logo on small screens */
  .logo-emblem { width: 58px; height: 58px; }
  .nav-logo-name { font-size: 0.95rem; }
  .nav-logo-sub { font-size: 0.58rem; }
  /* Mobile nav: bigger tap targets */
  .nav-mobile a { padding: 0.85rem 1.25rem; font-size: 0.9rem; }
  .nav-mobile-ctas { padding: 0.65rem 1.25rem 0; }
  /* Hamburger: larger touch target */
  .nav-hamburger { padding: 0.6rem 0.5rem; }
  .nav-hamburger span { width: 24px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-brand-desc { max-width: 100%; }
  .footer-social { gap: 0.4rem; }
  .social-btn { width: 40px; height: 40px; } /* bigger touch target */
}
@media (max-width: 380px) {
  .logo-emblem { width: 48px; height: 48px; }
  .nav-logo-name { font-size: 0.85rem; }
  .jumuah-banner-label { padding: 0.4rem 0.7rem; }
  .jumuah-banner-label span { display: none; } /* icon only on very small screens */
  .jumuah-item-detail { display: none; } /* mosque name + time only */
}
