/* ── Panchang page styles ─────────────────────────────────────────────────── */

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.hero-nav-link {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 5px 14px;
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 999px;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .hero-nav { gap: 6px; }
  .hero-nav-link { font-size: 11px; padding: 4px 10px; }
  .hero-logo { width: 100px; height: 100px; }
}

.hero-nav-link:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}

.hero-nav-link.active {
  background: #fff;
  color: #7c2d12;
  border-color: #fff;
  font-weight: 700;
}

/* Sunrise row */
.pan-sunrise-row {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0 20px;
}

.pan-sunrise-row strong { color: var(--text); }

/* Section titles */
.pan-section-title {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 28px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

/* Pancha Anga grid */
.pan-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.pan-element {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
}

.pan-element-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand);
  margin-bottom: 6px;
}

.pan-element-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.pan-element-sub {
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

/* Intra-day transition elements */
.pan-element-transition {
  border-color: rgba(180, 83, 9, 0.3);
  background: linear-gradient(180deg, var(--soft) 0%, #fffbeb 100%);
}

.pan-transition-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #b45309;
  margin-top: 3px;
}

.pan-transition-divider {
  border-top: 1px dashed rgba(180,83,9,0.35);
  margin: 8px 0 6px;
}

/* Timing cards */
.pan-timing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.pan-timing {
  border-radius: 12px;
  padding: 16px;
  border: 1px solid transparent;
}

.pan-timing.good {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.pan-timing.bad {
  background: #fff1f2;
  border-color: #fecdd3;
}

.pan-timing-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.pan-timing-desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.pan-timing-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}

.time-range { white-space: nowrap; }

/* Badges */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge-excellent { background: #d1fae5; color: #065f46; }
.badge-good      { background: #dcfce7; color: #166534; }
.badge-neutral   { background: #fef3c7; color: #92400e; }
.badge-bad       { background: #ffe4e6; color: #9f1239; }

/* Choghadiya table row colours */
.cho-row-excellent td, .cho-row-good td { background: #f0fdf4; }
.cho-row-neutral td  { background: #fffbeb; }
.cho-row-bad td      { background: #fff1f2; }

.cho-meaning {
  font-size: 12px;
  color: var(--muted);
}

.cho-table { margin-top: 8px; }

/* Responsive */
@media (max-width: 980px) {
  .pan-grid         { grid-template-columns: repeat(3, 1fr); }
  .pan-timing-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .pan-grid         { grid-template-columns: repeat(2, 1fr); }
  .pan-sunrise-row  { flex-direction: column; gap: 6px; }
}

/* ── Tithi Calendar top form ─────────────────────────────────────────────── */

.cal-top-form {
  margin-bottom: 18px;
}

.cal-form-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.cal-label-month  { flex: 0 0 140px; }
.cal-label-year   { flex: 0 0 100px; }
.cal-label-loc    { flex: 1 1 260px; }
.cal-label-submit { flex: 0 0 auto; display: flex; flex-direction: column; }

.cal-submit-spacer { display: block; height: 20px; }

.cal-coords-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 780px) {
  .cal-form-row      { flex-direction: column; align-items: stretch; }
  .cal-label-month,
  .cal-label-year,
  .cal-label-loc,
  .cal-label-submit  { flex: none; }
  .cal-submit-spacer { display: none; }
  .cal-coords-row    { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tithi Calendar ──────────────────────────────────────────────────────── */

.cal-section {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cal-form-card h2 {
  margin-bottom: 6px;
}

.cal-intro {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px;
}

.cal-card {
  padding: 24px;
}

.cal-heading {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 12px;
}

/* Legend */
.cal-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.cal-leg-shukla   { color: #b45309; }
.cal-leg-krishna  { color: #475569; }
.cal-leg-purnima  { color: #92400e; background: #fef08a; padding: 1px 7px; border-radius: 999px; }
.cal-leg-amavasya { color: #f1f5f9; background: #1e293b; padding: 1px 7px; border-radius: 999px; }

/* 7-column calendar grid */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-hdr {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  text-align: center;
  padding: 4px 0 8px;
}

.cal-day {
  border-radius: 10px;
  padding: 8px 7px 7px;
  min-height: 80px;
  border: 1px solid transparent;
  position: relative;
}

.cal-empty { border: none; }

.cal-shukla {
  background: #fffbeb;
  border-color: #fde68a;
}

.cal-krishna {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.cal-purnima {
  background: #fef08a;
  border-color: #f59e0b;
}

.cal-amavasya {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.cal-day-num {
  font-size: 12px;
  font-weight: 700;
  color: inherit;
  opacity: 0.55;
  margin-bottom: 4px;
}

.cal-amavasya .cal-day-num { opacity: 0.7; }

.cal-tithi-main {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.cal-amavasya .cal-tithi-main { color: #f1f5f9; }

.cal-tithi-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.cal-amavasya .cal-tithi-sub { color: #94a3b8; }

.cal-tithi2 {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed rgba(0,0,0,0.12);
}

.cal-amavasya .cal-tithi2 { border-top-color: rgba(255,255,255,0.15); }


@media (max-width: 700px) {
  .cal-tithi-sub { display: none; }
  .cal-day       { min-height: 56px; padding: 6px 4px; }
  .cal-tithi-main { font-size: 10px; }
}

@media (max-width: 440px) {
  .cal-grid { gap: 3px; }
  .cal-day  { padding: 4px 3px; min-height: 48px; }
  .cal-tithi-main { font-size: 9px; }
  .cal-day-num    { font-size: 10px; }
}
