/**
 * Unified Panchang tool pages — same look as panchang.php (slate + blue accent).
 * Loaded from head.php when URL contains "panchang/".
 */

/* --- Core page (matches panchang.php) --- */
.panchang-page {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
  min-height: 100vh;
}

.panchang-header {
  background: #fff;
  padding: 2rem;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}
.panchang-title {
  color: #0f172a;
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}
.panchang-date h4 {
  color: #1e293b;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}
.panchang-description p {
  color: #475569;
  line-height: 1.8;
  margin: 0;
}

.panchang-flow {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.1rem;
}
.flow-head h5 {
  margin: 0 0 0.8rem;
  color: #0f172a;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.flow-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}
.flow-step {
  min-width: 145px;
  text-align: center;
}
.flow-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-bottom: 0.3rem;
}
.sunrise-dot {
  background: #f59e0b;
}
.tithi-dot {
  background: #3b82f6;
}
.moon-dot {
  background: #8b5cf6;
}
.sunset-dot {
  background: #ef4444;
}
.flow-label {
  font-size: 0.8rem;
  color: #64748b;
}
.flow-time {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.92rem;
}
.flow-line {
  height: 2px;
  min-width: 26px;
  background: linear-gradient(90deg, #cbd5e1, #94a3b8);
}

.panchang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.05rem;
  margin-bottom: 2rem;
}
.panchang-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease;
}
.panchang-card:hover {
  transform: translateY(-2px);
}
.card-header {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  color: #fff;
  padding: 0.9rem 1.15rem;
}
.card-header h5 {
  margin: 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}
.card-header h5 i {
  color: #dbeafe;
}
.card-content {
  padding: 1.1rem;
}

.time-item,
.rashi-item,
.tithi-item,
.nakshatra-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.45rem;
}
.time-section {
  margin-bottom: 1rem;
}
.time-section:last-child {
  margin-bottom: 0;
}
.time-range {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
}

.sun-moon-heading {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.sun-moon-row {
  display: flex;
  gap: 0.8rem;
}
.sun-moon-val {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  text-align: center;
}
.sm-label {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
}
.sm-time {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
}

.panchang-calculator,
.panchang-description-section {
  background: #fff;
  padding: 1.5rem;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
}
.calculator-header h5,
.panchang-description-section h2 {
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.calculator-header p,
.panchang-description-section p {
  color: #64748b;
}
.panchang-description-section h3 {
  color: #1e293b;
  font-size: 1.08rem;
  font-weight: 700;
  margin: 1.2rem 0 0.6rem;
}

.panchang-page .form-control {
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.85rem;
}
.panchang-page .form-control:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.panchang-page .btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  font-weight: 700;
}

.choghadiya-grid,
.hora-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
}
.choghadiya-item,
.hora-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem;
  background: #f8fafc;
  border-radius: 8px;
}
.choghadiya-name,
.hora-planet {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.choghadiya-time,
.hora-time {
  font-size: 0.83rem;
  color: #475569;
}

.disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 0.9rem;
  color: #92400e;
}

/* --- Subpages: headers & cards (tithi, nakshatra, muhurat, rahu, karan, yog) --- */
.panchang-page .page-header {
  background: #fff;
  padding: 2rem;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}
.panchang-page .page-header h1 {
  color: #0f172a;
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}
.panchang-page .page-header .lead {
  color: #1e293b;
  font-size: 1.2rem;
  margin-bottom: 0;
}
.panchang-page .rk-kicker,
.panchang-page .kr-kicker {
  display: inline-block;
  background: #eff6ff;
  color: #1e40af;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
  border: 1px solid #bfdbfe;
}

.panchang-page .info-card {
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
  color: #334155;
}
.panchang-page .info-card h1 {
  color: #0f172a;
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}
.panchang-page .info-card .lead {
  color: #1e293b;
  font-size: 1.1rem;
}

.panchang-page .data-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1.05rem;
  color: #334155;
}
.panchang-page .data-card > h5 {
  color: #0f172a;
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #2563eb;
}
.panchang-page .data-card > h5.text-danger {
  border-bottom-color: #dc2626;
  color: #991b1b;
}

.panchang-page .time-box {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.panchang-page .tithi-info,
.panchang-page .nakshatra-info,
.panchang-page .yoga-info,
.panchang-page .karan-info {
  text-align: center;
}
.panchang-page .nakshatra-info a,
.panchang-page .yoga-info a,
.panchang-page .karan-info a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.3s ease;
}
.panchang-page .nakshatra-info a:hover,
.panchang-page .yoga-info a:hover,
.panchang-page .karan-info a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Center badges in subpage cards only (main panchang cards keep space-between) */
.panchang-page .data-card .time-range {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.panchang-page .data-card .time-range .badge {
  margin: 0 0.25rem;
}
.panchang-page .time-chip {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}
.panchang-page .start-chip {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}
.panchang-page .end-chip {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.panchang-page .danger-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  height: 100%;
}
.panchang-page .danger-box h6 {
  color: #b91c1c;
  font-weight: 600;
  margin-bottom: 1rem;
}
.panchang-page .time-display {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.panchang-page .start-time,
.panchang-page .end-time {
  background: #fff;
  color: #9a3412;
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid #fed7aa;
  font-weight: 700;
}

/* FAQ / Q&A */
.panchang-page .faq-item {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 3px solid #2563eb;
  margin-bottom: 1rem;
}
.panchang-page .faq-item h6 {
  color: #0f172a;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.panchang-page .faq-item p {
  color: #475569;
  margin-bottom: 0;
  line-height: 1.6;
}
.panchang-page .qa-content {
  max-height: 400px;
  overflow-y: auto;
}
.panchang-page .qa-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.panchang-page .qa-item h6 {
  color: #0f172a;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.panchang-page .qa-item:last-child {
  border-bottom: none;
}

@media (max-width: 768px) {
  .panchang-title {
    font-size: 1.45rem;
  }
  .panchang-header,
  .panchang-calculator,
  .panchang-description-section {
    padding: 1.1rem;
  }
  .panchang-grid {
    grid-template-columns: 1fr;
  }
  .time-range {
    flex-direction: column;
    gap: 0.35rem;
  }
  .sun-moon-row {
    flex-direction: column;
  }
  .panchang-page .page-header,
  .panchang-page .info-card {
    padding: 1.1rem;
  }
  .panchang-page .page-header h1,
  .panchang-page .info-card h1 {
    font-size: 1.45rem;
  }
  .panchang-page .danger-box {
    margin-bottom: 1rem;
  }
}
