/* ==========================================================================
   Aonus-Sunnah Islamic Da'wah Academy - Advanced Styles
   Features: Bilingual Arabic Typography, Prayer & Jumu'ah Countdowns,
   Daily Hadith, Interactive Map, Apply & Chat, Quran Reader
   ========================================================================== */

/* Bilingual typography system: English sentence first, Arabic directly below */
.ar-sub, .ar-p, .ar-text, .ar-heading, .ar-note, [lang="ar"].sub-ar {
  display: block;
  font-family: 'Amiri', 'Scheherazade New', 'Traditional Arabic', 'Noto Naskh Arabic', Georgia, serif;
  direction: rtl;
  text-align: inherit;
  font-size: 1.05em;
  line-height: 1.6;
  color: inherit;
  opacity: 0.94;
  margin-top: 4px;
  font-weight: 500;
}
.btn .ar-sub {
  font-size: 0.86em;
  margin-top: 2px;
  line-height: 1.3;
  display: block;
  opacity: 0.92;
}
.kicker .ar-sub {
  font-size: 0.9em;
  text-transform: none;
  letter-spacing: normal;
  display: block;
}
.brand small .ar-sub {
  font-size: 0.85em;
  letter-spacing: normal;
}

/* Prayer Times & Live Countdowns */
.prayer-live-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: linear-gradient(135deg, #073a22, #0b4d2e);
  color: #fff;
  border: 1px solid var(--gold);
  border-radius: 18px;
  padding: 18px 24px;
  margin: 20px 0 25px;
  box-shadow: 0 8px 24px rgba(11, 77, 46, 0.15);
}
.prayer-live-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pulse-dot {
  width: 14px;
  height: 14px;
  background: #38ef7d;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(56, 239, 125, 0.7);
  animation: pulseGreen 1.8s infinite;
  flex-shrink: 0;
}
@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 239, 125, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(56, 239, 125, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 239, 125, 0); }
}
.prayer-live-title {
  font-size: 1.05rem;
  font-weight: 750;
  margin: 0;
}
.prayer-countdown-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.02em;
  font-family: monospace, sans-serif;
}

/* Jumu'ah Countdown Box */
.jumuah-countdown-card {
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 24px;
  margin: 25px 0;
  text-align: center;
  box-shadow: 0 10px 30px rgba(16, 48, 31, 0.08);
}
.jumuah-countdown-card h3 {
  color: var(--green);
  margin: 0 0 8px;
  font-size: 1.35rem;
}
.countdown-timer-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 18px 0;
  flex-wrap: wrap;
}
.countdown-timer-unit {
  background: #f7faf7;
  border: 1px solid #dce8dd;
  border-radius: 14px;
  min-width: 80px;
  padding: 12px 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.countdown-timer-unit .timer-num {
  display: block;
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--green);
  line-height: 1.1;
}
.countdown-timer-unit .timer-lbl {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Daily Hadith Section */
.hadith-section {
  background: #f4f8f4;
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid var(--line);
  padding: 60px 0;
}
.hadith-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: 18px;
  padding: 32px 36px;
  box-shadow: 0 12px 35px rgba(16, 48, 31, 0.07);
  position: relative;
}
.hadith-tag {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hadith-arabic {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 1.55rem;
  line-height: 2.1;
  color: #123d27;
  direction: rtl;
  margin: 15px 0 20px;
  font-weight: 600;
}
.hadith-english {
  font-size: 1.12rem;
  line-height: 1.7;
  color: #2c3e32;
  margin: 0 0 16px;
}
.hadith-source {
  font-size: 0.92rem;
  color: #8c7322;
  font-weight: 750;
  border-top: 1px solid #edf1ee;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Sheikh Featured Card */
.sheikh-feature-box {
  background: linear-gradient(135deg, #073a22, #0b4d2e);
  color: #fff;
  border-radius: 24px;
  padding: 40px;
  border: 1px solid var(--gold);
  box-shadow: 0 18px 45px rgba(0,0,0,0.18);
  margin: 40px 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}
@media (max-width: 850px) {
  .sheikh-feature-box {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 28px 22px;
  }
}
.sheikh-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--green);
  font-size: 2.4rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255,255,255,0.4);
  margin: 0 auto;
}
.sheikh-copy h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1.55rem;
}
.sheikh-copy .role {
  color: var(--gold);
  font-weight: 750;
  font-size: 1rem;
}
.sheikh-copy p {
  color: #dbebe0;
  margin: 12px 0 0;
  font-size: 1.02rem;
}

/* Program Cards */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin: 32px 0;
}
@media (max-width: 800px) {
  .programs-grid {
    grid-template-columns: 1fr;
  }
}
.program-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(16, 48, 31, 0.06);
  display: flex;
  flex-direction: column;
}
.program-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #eef2ed;
}
.program-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.program-card:hover .program-img-wrap img {
  transform: scale(1.03);
}
.program-content {
  padding: 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.program-content h3 {
  color: var(--green);
  font-size: 1.35rem;
  margin: 0 0 12px;
  line-height: 1.3;
}
.program-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8faf8;
  border: 1px solid #e7ede7;
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0 16px;
  font-size: 0.92rem;
}
.program-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.program-meta-item strong {
  color: var(--green);
  min-width: 75px;
}
.program-desc {
  color: #3b4e42;
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 16px;
}

/* Forms & Portal Panels */
.portal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: 22px;
  padding: 34px;
  box-shadow: 0 12px 40px rgba(16, 48, 31, 0.08);
  margin-bottom: 30px;
}
.portal-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 26px;
  flex-wrap: wrap;
  border-bottom: 2px solid #e9eee9;
  padding-bottom: 12px;
}
.portal-tab-btn {
  background: #f1f5f2;
  border: 1px solid #dbe3dc;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 750;
  color: #2b4c35;
  cursor: pointer;
  transition: all 0.2s;
}
.portal-tab-btn.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(11, 77, 46, 0.25);
}
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-weight: 750;
  color: var(--green);
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #cbd5cc;
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 77, 46, 0.15);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 650px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
.alert-box {
  padding: 16px 20px;
  border-radius: 14px;
  margin: 18px 0;
  font-size: 0.96rem;
  line-height: 1.5;
}
.alert-success {
  background: #eef9f1;
  border: 1px solid #a8e2ba;
  color: #12542a;
}
.alert-warning {
  background: #fef9eb;
  border: 1px solid #f6deb0;
  color: #7d5b0b;
}

/* Chat Room for Approved Members */
.chat-board {
  border: 1px solid #e0e7e1;
  border-radius: 18px;
  overflow: hidden;
  background: #fbfdfb;
}
.chat-board-head {
  background: var(--green);
  color: #fff;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-messages-container {
  height: 380px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-msg-bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.chat-msg-bubble.mine {
  align-self: flex-end;
  background: #e2f0df;
  border-bottom-right-radius: 4px;
}
.chat-msg-bubble.other {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2eae3;
  border-bottom-left-radius: 4px;
}
.chat-msg-author {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 4px;
}
.chat-msg-time {
  font-size: 0.72rem;
  color: #7b8e81;
  margin-top: 4px;
  text-align: right;
}
.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border-top: 1px solid #e7ede8;
}

/* Advance Interactive Map */
.map-advanced-wrap {
  border: 2px solid var(--green);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(16, 48, 31, 0.12);
  background: #fff;
  margin: 28px 0;
}
.map-toolbar {
  background: #f4f8f4;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid #e0eae2;
}
.map-view-switch {
  display: inline-flex;
  background: #e3ebe4;
  border-radius: 999px;
  padding: 3px;
}
.map-view-btn {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 750;
  color: #2b4834;
  cursor: pointer;
  transition: all 0.2s;
}
.map-view-btn.active {
  background: var(--green);
  color: #fff;
}
.map-frame-container {
  height: 480px;
  position: relative;
  background: #e9ecef;
}
.map-frame-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.map-location-badge {
  background: var(--cream);
  padding: 20px 24px;
  border-top: 1px solid #e5eee6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.plus-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #edf5ee;
  border: 1px solid #cbdccf;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 750;
  color: var(--green);
  font-family: monospace;
  font-size: 0.92rem;
}
.directions-step-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0;
}
@media (max-width: 850px) {
  .directions-step-cards {
    grid-template-columns: 1fr;
  }
}
.direction-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}
.direction-card h4 {
  color: var(--green);
  font-size: 1.15rem;
  margin: 0 0 12px;
}
.direction-card ol {
  padding-left: 20px;
  margin: 0;
  color: #3b4e41;
  font-size: 0.94rem;
  line-height: 1.6;
}
.direction-card ol li {
  margin-bottom: 10px;
}

/* Qur'an Reader Styles */
.quran-reader-container {
  margin-top: 35px;
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 45px rgba(16, 48, 31, 0.09);
}
.reader-header {
  background: linear-gradient(135deg, #073a22, #0b4d2e);
  color: #fff;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.reader-header h2 {
  color: #fff;
  margin: 0;
  font-size: 1.5rem;
}
.reader-header h2 .ar-sub {
  color: var(--gold);
}
.reader-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ayah-list {
  padding: 24px;
  max-height: 680px;
  overflow-y: auto;
}
.ayah-card {
  border-bottom: 1px solid #edf1ee;
  padding: 22px 0;
  transition: background 0.2s;
}
.ayah-card:hover {
  background: #fcfdfc;
}
.ayah-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.ayah-badge {
  background: var(--cream);
  border: 1px solid var(--gold);
  color: var(--green);
  font-weight: 850;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
}
.ayah-arabic {
  font-family: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;
  font-size: 1.7rem;
  line-height: 2.2;
  color: #123d27;
  direction: rtl;
  text-align: right;
  margin-bottom: 14px;
  font-weight: 600;
}
.ayah-translation {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #2b3d32;
  margin-bottom: 8px;
}
.bookmark-btn {
  background: #f2f6f3;
  border: 1px solid #c9d8cc;
  color: var(--green);
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}
.bookmark-btn:hover, .bookmark-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a321e;
}
.bismillah-box {
  text-align: center;
  font-family: 'Amiri', serif;
  font-size: 1.9rem;
  color: var(--green);
  padding: 20px 0 10px;
  direction: rtl;
}

/* Modals */
.custom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 20px;
}
.custom-modal[hidden] {
  display: none;
}
.modal-box {
  background: #fff;
  border-radius: 20px;
  border-top: 5px solid var(--gold);
  max-width: 520px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: 0;
  font-size: 1.4rem;
  cursor: pointer;
  color: #5d6f63;
}
