/* ===== Site brand: logo + Encyclopedia below (same width) ===== */
.site-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  line-height: 1;
  text-decoration: none !important;
  width: fit-content;
}

.site-brand img {
  height: 34px;
  width: auto;
  display: block;
}

.site-brand-encyclopedia {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #b59061;
  letter-spacing: 0;
  word-spacing: 0;
  line-height: 1;
  padding: 3px 0 0 0;
  margin: 0;
  text-transform: uppercase;
  display: inline-block;
  box-sizing: border-box;
  text-align: left;
  white-space: nowrap;
  width: max-content;
  max-width: none;
  flex: 0 0 auto;
}

.sm-menu .site-brand img {
  height: 34px;
}

.sm-menu .site-brand-encyclopedia {
  font-size: 11px;
  padding-top: 3px;
}

/* ===== Language dropdown ===== */
.lang-dropdown {
  position: relative;
  display: inline-block;
  z-index: 10050;
  text-align: left;
}

.lang-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: linear-gradient(135deg, #1a2f47 0%, #142132 100%);
  color: #b59061;
  border-radius: 22px;
  border: 1.5px solid rgba(181, 144, 97, 0.45);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  user-select: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.lang-dropdown-toggle:hover,
.lang-dropdown.open .lang-dropdown-toggle {
  background: linear-gradient(135deg, #243f5e 0%, #1c2f47 100%);
  color: #d4af37;
  border-color: rgba(212, 175, 55, 0.75);
  box-shadow: 0 4px 16px rgba(181, 144, 97, 0.35);
}

.lang-dropdown-caret {
  font-size: 11px;
  opacity: 0.85;
}

.lang-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: #fff;
  border: 1px solid rgba(181, 144, 97, 0.35);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  padding: 6px 0;
}

.lang-dropdown.open .lang-dropdown-menu {
  display: block;
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  color: #333;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.lang-dropdown-item:hover {
  background: rgba(181, 144, 97, 0.1);
  color: #b59061;
}

.lang-dropdown-item.active {
  color: #b59061;
  background: rgba(181, 144, 97, 0.12);
}

.lang-dropdown-item.lang-arabic {
  font-family: 'Amiri', 'Noto Naskh Arabic', 'Traditional Arabic', serif;
  direction: rtl;
  text-align: right;
}
.lang-dropdown-item.urdu-label {
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  direction: rtl;
}

.lang-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #142132;
  color: #d4af37;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(181, 144, 97, 0.5);
  z-index: 100000;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lang-toast.show {
  opacity: 1;
}

/* ===== Social + download ===== */
.site-social-bar {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  gap: 12px;
  align-items: center;
  height: 36px;
}

.site-social-bar a {
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  margin: 0;
  padding: 0;
}

.site-social-bar .social-fb {
  color: #1877f2;
}

.site-social-bar .social-ig {
  color: #e4405f;
}

.site-download-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  margin: 0;
  padding: 0;
}

.site-download-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
}

.site-download-btn:hover {
  opacity: 0.9;
}

.play-badge-img {
  display: block;
  height: 28px;
  width: auto;
  max-width: 118px;
  object-fit: contain;
  vertical-align: middle;
  margin: 0;
}

.play-badge-lg {
  height: 48px;
  max-width: 180px;
  margin: 0 auto;
}

.play-badge-cta {
  height: 52px;
  max-width: 190px;
  margin: 0;
}

.btn-play-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  margin: 0;
  padding: 0;
}

/* Coming Soon on App Store — header chip */
.app-store-soon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  margin: 0;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid rgba(181, 144, 97, 0.55);
  background: linear-gradient(180deg, #1c2a3d 0%, #121c2a 100%);
  color: #d4af37;
  white-space: nowrap;
  user-select: none;
  cursor: default;
}

.app-store-soon-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  color: #f5f5f7;
}

.app-store-soon-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.app-store-soon-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #d4af37;
}

.app-store-soon-sub {
  font-size: 9px;
  font-weight: 600;
  color: #cfcfcf;
}

.site-download-panel {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 12px);
  width: 240px;
  background: #fff;
  border: 1px solid rgba(181, 144, 97, 0.35);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  padding: 14px;
  z-index: 10060;
  text-align: center;
}

.site-download-panel.open {
  display: block;
}

.site-download-panel h4 {
  margin: 0 0 10px;
  color: #b59061;
  font-size: 15px;
  font-weight: 700;
}

.site-download-panel img.qr {
  width: 160px;
  height: 160px;
  display: block;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: #fff;
}

.site-download-panel a.play-link {
  display: inline-block;
  margin-top: 4px;
  color: #142132;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.site-download-panel a.play-link:hover {
  color: #b59061;
}

.site-download-panel .ios-soon {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(181, 144, 97, 0.25);
  color: #666;
  font-size: 12px;
  font-weight: 600;
}

.site-download-panel .ios-soon strong {
  color: #b59061;
}

/* ===== App promo flash modal ===== */
.app-promo-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 28, 0.72);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-promo-overlay.show {
  display: flex;
}

.app-promo-modal {
  width: min(440px, 100%);
  background: linear-gradient(180deg, #ffffff 0%, #faf7f2 100%);
  border-radius: 16px;
  border: 1px solid rgba(181, 144, 97, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 28px 24px 24px;
  text-align: center;
  position: relative;
}

.app-promo-modal .close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  color: #888;
  cursor: pointer;
  line-height: 1;
}

.app-promo-modal h3 {
  margin: 0 0 14px;
  color: #142132;
  font-size: 22px;
  font-weight: 700;
}

.app-promo-modal .features-label {
  margin: 0 0 8px;
  color: #b59061;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  padding: 0 8px;
}

.app-promo-modal .features {
  list-style: none;
  text-align: left;
  margin: 0 0 14px;
  padding: 0 8px;
  color: #333;
  font-size: 14px;
  line-height: 1.55;
}

.app-promo-modal .features li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  padding-left: 0;
}

.app-promo-modal .features li .feature-bullet {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  object-fit: contain;
  display: block;
}

.app-promo-modal .app-promo-qr {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(181, 144, 97, 0.25);
}

.app-promo-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.app-promo-actions-top {
  margin: 0 0 18px;
  padding: 0;
}

.app-promo-actions .btn-play-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  margin: 0;
  padding: 0;
}

.app-promo-actions .btn-dismiss {
  background: transparent;
  border: none;
  color: #777;
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
}

.app-promo-actions .btn-dismiss:hover {
  color: #333;
}

/* ===== Hijri date card — size to content, stay inside hero ===== */
.banner .hijri-calendar,
.hijri-calendar {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center !important;
  height: auto !important;
  min-height: 0 !important;
  width: fit-content !important;
  max-width: 100%;
  min-width: unset !important;
  box-sizing: border-box;
  padding: 10px 16px !important;
  overflow: hidden;
  gap: 4px;
  flex: 0 0 auto;
}

.banner > div {
  height: auto !important;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  align-items: center;
}

.hijri-calendar h4 {
  font-family: 'Hillstone', cursive !important;
  font-style: normal !important;
  font-size: 16px !important;
  margin: 0 0 2px !important;
  white-space: nowrap;
}

#hijri-date,
#gregorian-date {
  width: max-content;
  max-width: min(280px, 100%);
  box-sizing: border-box;
  padding: 0 2px;
  line-height: 1.3;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: center;
}

#hijri-date {
  font-size: 14px !important;
}

#gregorian-date {
  font-size: 12px !important;
}

@media (max-width: 767px) {
  .site-social-bar {
    left: 10px;
    gap: 12px;
  }

  .site-download-panel {
    left: -10px;
    width: 220px;
  }

  .site-brand-encyclopedia {
    font-size: 11px;
  }

  .hijri-calendar h4 {
    font-size: 14px !important;
  }

  #hijri-date {
    font-size: 13px !important;
  }
}
