/* Rashifal dashboard — premium Vedic layout */
.page-rashifal {
  font-family: var(--font-body, "DM Sans", "Noto Sans Devanagari", sans-serif);
  background: #f6f1e8;
}
body.rashifal-lang-hi .page-rashifal,
body.lang-hi .page-rashifal,
body.lang-mr .page-rashifal {
  font-family: "Noto Sans Devanagari", var(--font-body, sans-serif);
}

.rashifal-hero { position: relative; overflow: hidden; }
.rashifal-hero-compact .page-hero-content { padding-top: 2.2rem; padding-bottom: 2.4rem; }
.rashifal-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(2px 2px at 12% 20%, rgba(245, 230, 168, 0.7), transparent),
    radial-gradient(1px 1px at 72% 30%, rgba(212, 175, 55, 0.65), transparent);
}
.rashifal-hero .page-hero-content { position: relative; z-index: 2; }
.rf-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.rf-hero-deity {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 18px;
  border: 2px solid rgba(212, 175, 55, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.rashifal-period-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}
.rashifal-period-btns .btn {
  min-height: 44px;
  padding: 0.65rem 1.1rem;
}

/* Zodiac strip */
.zodiac-nav-scroll {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 1rem;
  margin-bottom: 1.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.zodiac-nav-scroll::-webkit-scrollbar { height: 6px; }
.zodiac-nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(201, 162, 39, 0.45);
  border-radius: 99px;
}

.zodiac-chip {
  flex: 0 0 104px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 128px;
  padding: 0.7rem 0.4rem 0.75rem;
  border-radius: 12px;
  border: 1px solid #ebe4d8;
  background: #fff;
  color: #2a1810;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(224, 122, 31, 0.2);
  box-shadow: 0 2px 8px rgba(61, 7, 7, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.zodiac-chip .zodiac-chip-img,
.zodiac-chip .zodiac-icon-box,
.zodiac-chip .zodiac-hi-label,
.zodiac-chip .zodiac-en-label {
  pointer-events: none;
}
.zodiac-chip:hover,
.zodiac-chip:focus-visible {
  transform: translateY(-2px);
  border-color: #e07a1f;
  box-shadow: 0 8px 18px rgba(61, 7, 7, 0.08);
  outline: none;
}
.zodiac-chip.is-active {
  background: #fff;
  color: #2a1810;
  border-color: #e07a1f;
  box-shadow: 0 6px 16px rgba(224, 122, 31, 0.22);
}
.zodiac-icon-box {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  overflow: hidden;
  background: #f7f3ea;
  display: grid;
  place-items: center;
}
.zodiac-chip.is-active .zodiac-icon-box {
  background: #e07a1f;
}
.zodiac-chip-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 4px;
}
.zodiac-chip.is-active .zodiac-chip-img {
  /* keep colorful icon visible on orange tile */
  opacity: 1;
}
.zodiac-hi-label {
  font-family: 'Noto Sans Devanagari', var(--font-body, sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
  text-align: center;
  color: #2a1810;
}
.zodiac-chip.is-active .zodiac-hi-label {
  color: #e07a1f;
}
.zodiac-en-label {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  color: #5a4a3a;
}
.zodiac-chip.is-active .zodiac-en-label {
  color: #3d2a1a;
}

/* legacy class hooks kept for other cards */
.zodiac-primary { font-weight: 700; font-size: 0.95rem; text-align: center; line-height: 1.15; }
.zodiac-secondary { font-size: 0.72rem; opacity: 0.78; text-align: center; color: #8a6a3a; }

.rf-fest-item.is-today {
  background: rgba(224, 122, 31, 0.08);
  border-radius: 12px;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  margin: 0.15rem -0.35rem;
}
.rf-fest-badge {
  display: inline-block;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #e07a1f;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  margin-bottom: 0.25rem;
}

/* Dashboard grid */
.rf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 1.25rem;
  align-items: start;
}
.rf-main, .rf-side { min-width: 0; }

.rf-sign-head {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 20px;
  background: linear-gradient(145deg, #3d0707, #1a0404 70%);
  color: #fbf6eb;
  border: 1px solid rgba(212, 175, 55, 0.4);
}
.rashi-glyph {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 3.2rem;
  color: #f5e6a8;
  background: rgba(0, 0, 0, 0.22);
  border: 2px solid rgba(212, 175, 55, 0.5);
  overflow: hidden;
}
.rashi-glyph-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rf-sign-head h2 { color: #fff; margin: 0.15rem 0 0.35rem; font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.rashi-period-title { margin: 0; color: #f5e6a8; font-size: 0.98rem; }
.rf-title-deity,
.rf-title-img,
.rf-inline-deity,
.rf-fest-img,
.rf-other-thumb {
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: #fff8ec;
  flex-shrink: 0;
}
.rf-title-deity { width: 88px; height: 88px; }

/* Date tabs */
.rf-date-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
}
.rf-date-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.3);
  background: #fff;
  color: #5a3a3a;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.rf-date-tab.is-active {
  background: #e07a1f;
  border-color: #e07a1f;
  color: #fff;
}

/* Scores */
.rf-score-card,
.rf-lucky-panel,
.rf-pred-card,
.rf-fest-card,
.rf-side-cta,
.other-zodiac-card,
.type-card {
  background: #fff;
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(61, 7, 7, 0.04);
}
.rf-score-card { padding: 1.1rem 1.15rem; margin-bottom: 1rem; }
.rf-score-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.rf-score-head h3 { margin: 0; font-size: 1.15rem; color: #3d0707; }
.rf-score-row { margin-bottom: 0.7rem; }
.rf-score-row:last-child { margin-bottom: 0; }
.rf-score-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.28rem;
  color: #5a3a3a;
}
.rf-score-track {
  height: 8px;
  border-radius: 99px;
  background: #f3e8d8;
  overflow: hidden;
}
.rf-score-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e07a1f, #d4af37);
  transition: width 0.35s ease;
}
.rf-score-fill.rf-score-pulse {
  animation: rfScorePulse 0.45s ease;
}
@keyframes rfScorePulse {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.15); }
  100% { filter: brightness(1); }
}

.rf-lucky-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.85rem;
  margin-bottom: 1rem;
}
.rf-lucky-box {
  padding: 0.75rem 0.65rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8, #fbf6eb);
  border: 1px solid rgba(201, 162, 39, 0.25);
  text-align: center;
}
.rf-lucky-box span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8b1a1a;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.rf-lucky-box strong {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.05rem;
  color: #3d0707;
}
.rf-color-line {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
}
.rf-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: inline-block;
}
.rf-total-luck .rf-total-ring strong {
  color: #e07a1f;
  font-size: 1.25rem;
}

/* Prediction cards with deity on title right */
.rf-pred-list {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.rf-pred-card { padding: 1rem 1.1rem; margin-bottom: 0.85rem; }
.rf-pred-list .rf-pred-card { margin-bottom: 0; }
.rf-pred-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.rf-pred-title-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-wrap: wrap;
}
.rf-pred-title h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #3d0707;
}
.rf-pred-title-left i { color: #e07a1f; }
.rf-title-img { width: 56px; height: 56px; }
.rf-mini-pct {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  color: #e07a1f;
  background: rgba(224, 122, 31, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.rf-pred-card p {
  margin: 0;
  color: #5a3a3a;
  font-size: 0.95rem;
  line-height: 1.55;
}

.rf-advice {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.85rem;
  margin-bottom: 0;
}
.rf-advice article {
  padding: 1.1rem;
  border-radius: 18px;
  background: #fffdf8;
  border: 1px solid rgba(201, 162, 39, 0.28);
}
.remedy-card {
  background: linear-gradient(160deg, rgba(224, 122, 31, 0.14), #fffdf8) !important;
}

/* Festivals sidebar */
.rf-fest-card { padding: 1.1rem; margin-bottom: 1rem; }
.rf-fest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.rf-fest-head h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #3d0707;
}
.rf-fest-head a {
  color: #e07a1f;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}
.rf-fest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rf-fest-item {
  display: grid;
  grid-template-columns: 52px 1fr 64px;
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(139, 26, 26, 0.08);
}
.rf-fest-item:last-child { border-bottom: 0; }
.rf-fest-date {
  text-align: center;
  color: #e07a1f;
  line-height: 1.1;
}
.rf-fest-date strong {
  display: block;
  font-size: 1.25rem;
  font-family: var(--font-display, Georgia, serif);
}
.rf-fest-date span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.rf-fest-name {
  display: block;
  color: #3d0707;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.rf-fest-body small {
  color: #7a5a5a;
  font-size: 0.78rem;
}
.rf-fest-img { width: 64px; height: 64px; border-radius: 12px; }
.rf-fest-cta { margin-top: 0.85rem; }

.rf-side-cta {
  padding: 1.2rem;
  text-align: center;
}
.rf-side-cta img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 0.65rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
}
.rf-side-cta h3 {
  font-size: 1.15rem;
  color: #3d0707;
  margin-bottom: 0.4rem;
}
.rf-side-cta p {
  font-size: 0.9rem;
  color: #5a3a3a;
  margin-bottom: 0.85rem;
}

.rf-section-title-row {
  width: 100%;
  margin-bottom: 0;
}
.rf-section-title-row h2 { margin: 0; }

.other-zodiac-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.other-zodiac-card {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.other-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.other-top > div { flex: 1; min-width: 0; }
.other-top small { display: block; opacity: 0.7; font-size: 0.78rem; }
.other-zodiac-card p {
  font-size: 0.9rem;
  color: #5a3a3a;
  min-height: 2.6em;
  margin: 0;
  flex: 1;
}
.other-zodiac-card .btn-link {
  background: none;
  border: none;
  padding: 0.35rem 0;
  min-height: 40px;
  color: #8b1a1a;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.type-card {
  display: block;
  height: 100%;
  padding: 1.25rem 1.1rem;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.type-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(61, 7, 7, 0.08);
  color: inherit;
}
.type-card.is-current { border-color: #e07a1f; background: #fffdf8; }
.type-card span { color: #8b1a1a; font-weight: 600; }

.rashifal-empty {
  padding: 2rem;
  text-align: center;
  border-radius: 16px;
  border: 1px dashed rgba(139, 26, 26, 0.3);
  background: #fff8f4;
  margin-bottom: 1.5rem;
}
.rashi-panel.is-loading,
.rf-layout.is-loading {
  opacity: 0.72;
  transition: opacity 0.18s ease;
}

@media (max-width: 1199.98px) {
  .rf-layout { grid-template-columns: 1fr; }
  .rf-lucky-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .other-zodiac-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .rf-advice { grid-template-columns: 1fr; }
  .other-zodiac-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .rf-hero-row { flex-direction: column; }
  .rf-hero-deity { width: 88px; height: 88px; align-self: flex-end; }
  .rashifal-period-btns .btn {
    flex: 1 1 calc(50% - 0.4rem);
    text-align: center;
    font-size: 0.86rem;
  }
  .rf-sign-head {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .rf-lucky-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rf-fest-item { grid-template-columns: 48px 1fr 56px; }
  .rf-fest-img { width: 56px; height: 56px; }
  .other-zodiac-grid { grid-template-columns: 1fr; }
  .rf-title-img { width: 48px; height: 48px; }
}

@media (max-width: 420px) {
  .rashifal-period-btns .btn { flex-basis: 100%; }
  .zodiac-chip { flex-basis: calc(50% - 0.35rem); }
  .rf-lucky-panel { grid-template-columns: 1fr 1fr; }
  .rf-fest-item { grid-template-columns: 44px 1fr 48px; gap: 0.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .zodiac-chip, .type-card, .rf-score-fill { transition: none; }
}
