/* Root design tokens (easy pixel-parity tuning) */
:root {
  --nh-color-bg-deep: #0a1929;
  --nh-color-bg-panel: #132f4c;
  --nh-color-primary: #66b2ff; /* accent sky */
  --nh-color-primary-strong: #0072e5; /* solid action */
  --nh-radius-sm: 4px;
  --nh-radius-md: 8px;
  --nh-transition-fast: .2s ease;
  --nh-transition-base: .3s ease;
  --nh-header-height: 64px; /* adjust if Django header changes */
  --nh-footer-heading-border: 4px; /* rtl right border width */
  --nh-icon-circle: 36px; /* social icon size (footer) */
}

/* فونت وزیر از فایل محلی assets/fonts/Vazir.css بارگذاری می‌شود */
* { font-family: 'Vazir', sans-serif; }

.hidden { display: none !important; }

.nh-desktop-nav { display: none; }
.nh-desktop-nav-list { list-style: none; margin: 0; padding: 0; }
.nh-mobile-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 6px; transition: background-color var(--nh-transition-fast); }
.nh-mobile-toggle:hover { background: rgba(255,255,255,0.08); }

.nh-mobile-menu__overlay { position: absolute; inset: 0; background: linear-gradient(175deg, rgba(4, 15, 28, 0.55) 0%, rgba(7, 26, 46, 0.52) 55%, rgba(9, 34, 58, 0.48) 100%); backdrop-filter: blur(16px); opacity: 0; transition: opacity 0.25s ease; }
.nh-mobile-menu__panel { position: absolute; top: 0; right: 0; min-height: 100vh; width: 320px; max-width: 82vw; background: linear-gradient(190deg, rgba(7, 23, 40, 0.92) 0%, rgba(9, 32, 54, 0.9) 55%, rgba(4, 15, 28, 0.9) 100%); border-left: 1px solid rgba(102, 178, 255, 0.32); box-shadow: -18px 0 44px rgba(2, 9, 23, 0.6); backdrop-filter: blur(26px); transform: translateX(100%); transition: transform 0.26s cubic-bezier(0.33, 1, 0.68, 1.01); display: flex; flex-direction: column; }
.nh-mobile-menu__panel-inner { padding: 1.75rem; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2rem; overflow-y: auto; }
.nh-mobile-menu__panel.translate-x-full { transform: translateX(100%); }
#mobile-menu:not(.hidden) .nh-mobile-menu__overlay { opacity: 1; }
#mobile-menu:not(.hidden) .nh-mobile-menu__panel { transform: translateX(0); }
#mobile-menu .logo-container { width: 108px; height: 36px; display: block; }
#mobile-menu .logo-container img { width: 100%; height: 100%; object-fit: contain; }
#mobile-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
#mobile-menu li a { display: block; border-radius: 16px; padding: 1rem 1.15rem; color: #e2e8f0; background: rgba(12, 26, 45, 0.48); border: 1px solid rgba(148, 163, 184, 0.16); box-shadow: 0 12px 26px rgba(2, 6, 23, 0.28); transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease; }
#mobile-menu li a:hover,
#mobile-menu li a:focus-visible { background: rgba(102, 178, 255, 0.22); border-color: rgba(102, 178, 255, 0.4); color: #ffffff; transform: translateX(-8px); box-shadow: 0 16px 32px rgba(3, 11, 27, 0.32); }

@media (min-width: 768px) {
  .nh-desktop-nav { display: block; margin: 0 1.5rem; }
  .nh-desktop-nav-list { display: flex; direction: rtl; align-items: center; gap: 1.5rem; font-size: 14px; justify-content: center; }
  .nh-desktop-nav-list li { display: flex; align-items: center; }
  .nh-mobile-toggle { display: none; }
  .md\:hidden { display: none !important; }
  .md\:block { display: block !important; }
  #mobile-menu { display: none !important; }
}

/* پس‌زمینه و رنگ‌بندی بدنه مشابه templates/2.html و templates/them.html */
body {
  background-color: var(--nh-color-bg-deep);
  background-image:
    radial-gradient(circle at 20% 30%, var(--nh-color-bg-panel) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, var(--nh-color-bg-panel) 0%, transparent 20%);
  color: #e2e8f0;
  overflow-x: hidden;
}

.prayer-time-card {
  background: linear-gradient(135deg, #0a1929 0%, #1a3c61 100%);
  box-shadow: 0 10px 25px rgba(0,0,0,.3);
  position: relative; overflow: hidden;
}
.calendar-card {
  background: #132f4c;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  position: relative; overflow: hidden;
}
.crescent-bg { position: absolute; opacity: .07; z-index: 0; }

.nav-link { position: relative; }
/* Header nav (simplified – no underline for closer parity) */
.nav-link:after { display:none; }
.nav-link { color:#ffffff; font-size:14px; }
.nav-link.is-active { color: var(--nh-color-primary); }

/* Beta badge refinement */
.nh-badge-beta { background: transparent; border-radius: 2px; line-height:1; position:relative; top:1px; }

.calendar-day { transition: all .2s ease; }
.calendar-day:hover:not(.inactive) { background-color: var(--nh-color-primary-strong); color: #fff; transform: scale(1.05); }
.today { background-color: #0072e5; color: #fff; font-weight: bold; }
.selected-day { outline: 2px solid #66b2ff; outline-offset: -2px; }

.tab-button { transition: all .3s ease; }
.tab-button.active { background-color: var(--nh-color-primary-strong); color: #fff; }

.location-selector { background-color: rgba(19,47,76,.8); backdrop-filter: blur(5px); }

.star { position: absolute; background-color: #fff; border-radius: 50%; animation: twinkle 4s infinite; }
@keyframes twinkle { 0%,100%{opacity:.2; transform:scale(.8)} 50%{opacity:.8; transform:scale(1.2)} }

.shooting-star { position: absolute; height: 2px; background: linear-gradient(to right, rgba(255,255,255,0), #fff); transform: rotate(-45deg); animation: shooting 5s linear infinite; }
@keyframes shooting {
  0% { transform: translateX(-100px) translateY(-100px) rotate(-45deg); opacity: 1; }
  20% { opacity: 1; }
  30% { opacity: 0; }
  100% { transform: translateX(300px) translateY(300px) rotate(-45deg); opacity: 0; }
}

.glow { filter: drop-shadow(0 0 8px rgba(102,178,255,.6)); }

.prayer-time-item {
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,.1);
  transition: all .3s ease;
}
.prayer-time-item:hover { transform: translateY(-5px); box-shadow: 0 10px 15px rgba(0,0,0,.2); background: rgba(255,255,255,.1); }

.moon-phases {
  display: flex; justify-content: space-between; margin-top: 1rem; padding: .5rem;
  background: rgba(19,47,76,.5); border-radius: .5rem;
}
.moon-phase { text-align: center; padding: .5rem; transition: all .3s ease; }
.moon-phase:hover { transform: scale(1.1); }
.moon-phase.active { background: rgba(0,114,229,.3); border-radius: .5rem; }

.calendar-day-content { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.calendar-day-shamsi { font-size: 1rem; font-weight: bold; }
.calendar-day-other { font-size: .65rem; color: #94a3b8; }

.astro-info {
  background: linear-gradient(135deg, #0a1929 0%, #1a3c61 100%);
  border-radius: .75rem; box-shadow: 0 4px 15px rgba(0,0,0,.2);
}
.astro-info-item { border-bottom: 1px solid rgba(255,255,255,.1); padding: .75rem 0; }
.astro-info-item:last-child { border-bottom: none; }

.compact-hero { padding: 1rem; border-radius: .75rem; margin-bottom: 1rem; }
.btn-primary { background-color: var(--nh-color-primary-strong); }
.btn-primary:hover { background-color: #0059b2; }

.bg-primary { background-color: var(--nh-color-primary-strong); }
.bg-secondary { background-color: var(--nh-color-bg-panel); }
.bg-accent { background-color: var(--nh-color-primary); }

.text-primary { color: var(--nh-color-primary); }
.border-primary { border-color: var(--nh-color-primary-strong); }

header { background-color: #071a2e; }
footer { background-color: #071a2e; }

.nh-header { background-color: rgba(7, 26, 46, 0.98); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
.nh-header__inner { gap: 1.5rem; }
.nh-header__logo {
  width: 110px;
  height: 36px;
  min-width: 110px;
  display: block;
}
.nh-header__logo img { width: 100%; height: 100%; object-fit: contain; }
.nh-header__logo--panel {
  width: 96px;
  height: 30px;
}
.nh-header__badge {
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  background: rgba(19, 47, 76, 0.4);
}



/* Normalize list spacing inside footer (avoid prose overrides) */
footer ul { margin: 0; padding: 0; list-style: none; }
footer li { margin: 0; }

/* Mobile menu panel stronger backdrop layering */
#mobile-menu-panel { backdrop-filter: blur(14px); }

/* Improve icon button focus states */
.icon-btn:focus-visible { outline: 2px solid var(--nh-color-primary); outline-offset: 2px; }

/* Prevent prose plugin styles (if any) from altering footer typographic scale */
footer, footer * { font-size: inherit; line-height: 1.5; }


@media (max-width: 640px) {
  .prayer-time-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Fine‑tuning hooks (set numeric px adjustments if future diff shows offsets) */
.nh-adjust-header-padding { /* padding-top / padding-bottom overrides */ line-height: inherit; }
.nh-adjust-footer-heading { /* letter-spacing or border thickness overrides */ letter-spacing: inherit; }
.nh-adjust-logo-shift { /* could apply translateY if vertical centering off by 1px */ transform: translateY(0); }

.logo-container {
  position: relative;
  width: 110px;
  height: 36px;
  display: block;
}
.logo-container img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.nh-header__logo,
.nh-header__logo > a {
  width: 104px !important;
  height: 32px !important;
  min-width: 104px;
  display: block;
}

.nh-header__logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.nh-header__logo--panel,
.nh-header__logo--panel > a {
  width: 92px !important;
  height: 28px !important;
  min-width: 92px;
}

.nh-header__logo--panel img {
  width: 100% !important;
  height: 100% !important;
}

@media (min-width: 992px) {
  .nh-header__logo,
  .nh-header__logo > a {
    width: 110px !important;
    height: 34px !important;
    min-width: 110px;
  }
}

/* Footer layout refinement */
.nh-footer {
  position: relative;
  background: linear-gradient(140deg, #071a2e 0%, #0d2742 100%);
  color: #e2e8f0;
  padding: 2.75rem 0 1.75rem;
  overflow: hidden;
}

.nh-footer__glow {
  position: absolute;
  inset: -45% 5% auto 5%;
  height: 420px;
  background: radial-gradient(circle at center, rgba(102, 178, 255, 0.22), transparent 65%);
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}

.nh-footer__inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nh-footer__grid {
  display: grid;
  gap: 2.25rem;
}

.nh-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nh-footer__logo {
  width: 102px;
  height: 34px;
  display: block;
}

.nh-footer__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nh-footer__description {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.8;
  max-width: 420px;
}

.nh-footer__social {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.75rem;
}

.nh-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--nh-icon-circle);
  height: var(--nh-icon-circle);
  border-radius: 50%;
  background: rgba(19, 47, 76, 0.9);
  color: #fff;
  transition: background-color var(--nh-transition-fast), transform var(--nh-transition-fast);
}

.nh-footer__social-link:hover {
  background: var(--nh-color-primary-strong);
  transform: translateY(-2px);
}

.nh-footer__links,
.nh-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nh-footer__heading {
  font-size: 1rem;
  font-weight: 700;
  border-right: var(--nh-footer-heading-border) solid var(--nh-color-primary-strong);
  padding-right: 0.75rem;
  margin: 0;
}

.nh-footer__list,
.nh-footer__contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nh-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--nh-transition-fast), transform var(--nh-transition-fast);
}

.nh-footer__link i {
  font-size: 0.75rem;
  color: var(--nh-color-primary-strong);
}

.nh-footer__link:hover {
  color: #fff;
  transform: translateX(-4px);
}

.nh-footer__contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.nh-footer__contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--nh-color-primary-strong);
}

.nh-footer__meta {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
  font-size: 0.75rem;
}

@media (min-width: 640px) {
  .nh-footer__grid {
    gap: 2.5rem;
  }
}

@media (min-width: 768px) {
  .nh-footer {
    padding: 3.25rem 0 2rem;
  }

  .nh-footer__grid {
    grid-template-columns: 1.5fr 1fr;
  }

  .nh-footer__logo img {
    width: 116px;
  }
}

@media (min-width: 1024px) {
  .nh-footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr;
    align-items: flex-start;
  }

  .nh-footer__brand {
    padding-inline-end: 1rem;
  }
}

@media (max-width: 480px) {
  .nh-footer__logo img {
    width: 92px;
  }

  .nh-footer__link,
  .nh-footer__contact-item {
    font-size: 0.85rem;
  }

  .nh-footer__social-link {
    width: 32px;
    height: 32px;
  }
}

/* -------------------------------------------------- */
/* Content Tables (Elementor / WP Editor)             */
/* -------------------------------------------------- */
/* Base style for any table inside post/page content */
article table, .entry-content table, .elementor-widget-text-editor table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: .9rem;
  direction: rtl; /* برای محتوای فارسی */
}

article table th, article table td,
.entry-content table th, .entry-content table td,
.elementor-widget-text-editor table th, .elementor-widget-text-editor table td {
  border: 1px solid rgba(255,255,255,.18);
  padding: .55rem .75rem;
  vertical-align: middle;
}

article table th,
.entry-content table th,
.elementor-widget-text-editor table th {
  background: #132f4c;
  color: #fafafa;
  font-weight: 600;
  text-align: center;
}

/* Zebra rows */
article table tbody tr:nth-child(even),
.entry-content table tbody tr:nth-child(even),
.elementor-widget-text-editor table tbody tr:nth-child(even) {
  background: rgba(255,255,255,.04);
}

/* Hover */
article table tbody tr:hover,
.entry-content table tbody tr:hover,
.elementor-widget-text-editor table tbody tr:hover {
  background: rgba(102,178,255,.12);
}

/* Utility classes for custom border color control */
.nh-table-border-primary th, .nh-table-border-primary td { border-color: var(--nh-color-primary-strong) !important; }
.nh-table-border-accent  th, .nh-table-border-accent  td { border-color: var(--nh-color-primary) !important; }

/* Only vertical lines recolor (keep horizontal subtle) */
.nh-table-vert-primary td + td, .nh-table-vert-primary th + th { border-left-color: var(--nh-color-primary-strong) !important; }

/* Only horizontal lines recolor */
.nh-table-horiz-primary tr { border-bottom: 1px solid var(--nh-color-primary-strong); }
.nh-table-horiz-primary tr:last-child { border-bottom: none; }
.nh-table-horiz-primary th, .nh-table-horiz-primary td { border: none; }
.nh-table-horiz-primary th { border-bottom: 2px solid var(--nh-color-primary-strong); }

/* Tight version */
.nh-table-compact th, .nh-table-compact td { padding: .4rem .55rem; }

/* Scroll wrapper helper for small screens */
.nh-table-scroll { overflow-x: auto; }
.nh-table-scroll > table { min-width: 640px; }

/* Dark background context override (if Elementor injects its own) */
.elementor-widget-text-editor table { background: transparent; }

/* Example class for full border removal except vertical lines */
.nh-table-only-vert td, .nh-table-only-vert th { border-top: none; border-bottom: none; }
