/* Rahukalam — daily Rahu Kaal / Gulika / Yamaghanta pages */

.rk-page {
    --rk-maroon: #7a1f1f;
    --rk-indigo: #24306b;
    --rk-text: #2c1810;
    --rk-muted: #6b5344;
    --rk-border: #ecdfd4;
    --rk-surface: #fffaf6;
    padding: 1.5rem 0 3rem;
    color: var(--rk-text);
}

.rk-container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.rk-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Breadcrumb + header ───────────────────────────────── */
.rk-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--rk-muted);
    margin-bottom: 1rem;
}

.rk-breadcrumb a {
    color: var(--rk-maroon);
    text-decoration: none;
}

.rk-breadcrumb a:hover {
    text-decoration: underline;
}

.rk-header {
    margin-bottom: 1.25rem;
}

.rk-header h1 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.2;
    color: var(--rk-maroon);
}

.rk-header-date {
    margin: 0 0 0.6rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--rk-indigo);
}

.rk-header-lead {
    margin: 0;
    max-width: 62ch;
    color: var(--rk-muted);
    line-height: 1.6;
}

.rk-header-lead a {
    color: var(--rk-maroon);
}

/* ── Date navigation ───────────────────────────────────── */
.rk-datenav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--rk-border);
    border-radius: 14px;
    background: var(--rk-surface);
}

.rk-datenav-btn,
.rk-datenav-today {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--rk-maroon);
    border: 1px solid transparent;
    white-space: nowrap;
}

.rk-datenav-btn:hover,
.rk-datenav-today:hover {
    background: rgba(122, 31, 31, 0.07);
}

.rk-datenav-today {
    border-color: var(--rk-border);
    background: #fff;
}

.rk-datenav-today.is-active {
    background: var(--rk-maroon);
    color: #fff;
    border-color: var(--rk-maroon);
}

.rk-notice {
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    border: 1px solid #f0d9a8;
    background: #fdf6e6;
    color: #7a5a10;
    font-size: 0.92rem;
}

/* ── Primary timing cards ──────────────────────────────── */
.rk-primary {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rk-secondary {
    display: grid;
    gap: 1rem;
}

.rk-card {
    border: 1px solid var(--rk-border);
    border-radius: 18px;
    padding: 1.15rem 1.25rem;
    background: #fff;
}

.rk-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: var(--rk-maroon);
}

.rk-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.rk-card-head h3 {
    margin: 0;
    font-size: 1.25rem;
}

.rk-card-tag {
    order: 2;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(122, 31, 31, 0.08);
    color: var(--rk-maroon);
}

.rk-card-rahu {
    background: linear-gradient(135deg, #fff 0%, #fdf3ee 100%);
    border-color: rgba(122, 31, 31, 0.22);
}

.rk-card-time {
    margin: 0.65rem 0 0.25rem;
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--rk-indigo);
    font-variant-numeric: tabular-nums;
}

.rk-card-gulika .rk-card-time,
.rk-card-yama .rk-card-time {
    font-size: clamp(1.15rem, 2.6vw, 1.4rem);
}

.rk-card-empty {
    color: var(--rk-muted);
    font-weight: 600;
}

.rk-card-meta {
    margin: 0 0 0.6rem;
    font-size: 0.88rem;
    color: var(--rk-muted);
}

.rk-card-note {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--rk-muted);
}

.rk-sunline {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: var(--rk-surface);
    border: 1px solid var(--rk-border);
    font-size: 0.9rem;
    color: var(--rk-muted);
}

.rk-sunline strong {
    color: var(--rk-text);
    margin-right: 0.3rem;
}

.rk-sunline-note {
    color: var(--rk-muted);
}

/* ── Quick nav ─────────────────────────────────────────── */
.rk-quicknav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
}

.rk-quicknav-label {
    font-weight: 600;
    color: var(--rk-muted);
}

.rk-quicknav a {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--rk-border);
    background: #fff;
    color: var(--rk-maroon);
    text-decoration: none;
}

.rk-quicknav a:hover {
    background: rgba(122, 31, 31, 0.06);
}

/* ── City tables ───────────────────────────────────────── */
.rk-cities h2,
.rk-explainer h2,
.rk-faq h2,
.rk-upcoming h2,
.rk-related h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.35rem, 3vw, 1.7rem);
    color: var(--rk-maroon);
}

.rk-section-lead {
    margin: 0 0 1.25rem;
    max-width: 68ch;
    color: var(--rk-muted);
    line-height: 1.6;
}

.rk-group {
    margin-bottom: 2rem;
    scroll-margin-top: 90px;
}

.rk-group h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: var(--rk-indigo);
}

.rk-group-lead {
    margin: 0 0 0.85rem;
    max-width: 70ch;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--rk-muted);
}

.rk-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--rk-border);
    border-radius: 14px;
    background: #fff;
}

.rk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 560px;
}

.rk-table thead th {
    text-align: left;
    padding: 0.7rem 0.9rem;
    background: var(--rk-surface);
    border-bottom: 1px solid var(--rk-border);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--rk-muted);
    white-space: nowrap;
}

.rk-table tbody th,
.rk-table tbody td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #f4ece5;
    text-align: left;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rk-table tbody tr:last-child th,
.rk-table tbody tr:last-child td {
    border-bottom: none;
}

.rk-table tbody tr:hover {
    background: #fffaf6;
}

.rk-city-name {
    display: block;
    font-weight: 600;
    color: var(--rk-text);
}

.rk-city-region {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--rk-muted);
}

.rk-cell-rahu {
    font-weight: 600;
    color: var(--rk-maroon);
}

.rk-cell-empty {
    color: #b9a99c;
}

.rk-table-compact {
    min-width: 420px;
}

.rk-table-compact tbody tr.is-current {
    background: rgba(122, 31, 31, 0.06);
}

.rk-table-compact tbody tr.is-current th {
    color: var(--rk-maroon);
    font-weight: 700;
}

.rk-table-note {
    margin: 0.5rem 0 1.25rem;
    font-size: 0.85rem;
    color: var(--rk-muted);
}

/* ── Explainer ─────────────────────────────────────────── */
.rk-explainer {
    margin: 2.5rem 0;
}

.rk-explainer-media {
    margin-bottom: 1.5rem;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--rk-border);
}

.rk-explainer-media img {
    display: block;
    width: 100%;
    height: auto;
}

.rk-explainer-body h3 {
    margin: 1.75rem 0 0.5rem;
    font-size: 1.2rem;
    color: var(--rk-indigo);
}

.rk-explainer-body p {
    margin: 0 0 0.9rem;
    max-width: 72ch;
    line-height: 1.75;
    color: #43342b;
}

/* ── FAQ ───────────────────────────────────────────────── */
.rk-faq {
    margin: 2.5rem 0;
}

.rk-faq-item {
    border: 1px solid var(--rk-border);
    border-radius: 12px;
    background: #fff;
    margin-bottom: 0.6rem;
    padding: 0.85rem 1rem;
}

.rk-faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--rk-text);
    list-style: none;
}

.rk-faq-item summary::-webkit-details-marker {
    display: none;
}

.rk-faq-item summary::after {
    content: '+';
    float: right;
    color: var(--rk-maroon);
    font-weight: 700;
}

.rk-faq-item[open] summary::after {
    content: '–';
}

.rk-faq-item p {
    margin: 0.7rem 0 0;
    max-width: 72ch;
    line-height: 1.7;
    color: var(--rk-muted);
}

/* ── Upcoming + related ────────────────────────────────── */
.rk-upcoming {
    margin: 2.5rem 0;
}

.rk-upcoming-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.rk-upcoming-list a {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--rk-border);
    background: #fff;
    color: var(--rk-maroon);
    font-size: 0.9rem;
    text-decoration: none;
}

.rk-upcoming-list a:hover {
    background: rgba(122, 31, 31, 0.06);
}

.rk-upcoming-list a.is-active {
    background: var(--rk-maroon);
    border-color: var(--rk-maroon);
    color: #fff;
}

.rk-related {
    margin: 2.5rem 0;
}

.rk-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.rk-related-card {
    display: block;
    padding: 1rem 1.1rem;
    border: 1px solid var(--rk-border);
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: var(--rk-text);
}

.rk-related-card:hover {
    border-color: rgba(122, 31, 31, 0.3);
    background: var(--rk-surface);
}

.rk-related-card strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--rk-maroon);
}

.rk-related-card span {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--rk-muted);
}

.rk-disclaimer {
    margin: 2rem 0 0;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    background: var(--rk-surface);
    border: 1px solid var(--rk-border);
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--rk-muted);
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 860px) {
    .rk-primary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .rk-datenav {
        justify-content: center;
    }

    .rk-datenav-btn,
    .rk-datenav-today {
        font-size: 0.85rem;
        padding: 0.4rem 0.7rem;
    }
}

/* ── Dark theme ────────────────────────────────────────── */
body.dark-theme .rk-page {
    --rk-text: #f0e6de;
    --rk-muted: #b9a99c;
    --rk-border: #3a2c25;
    --rk-surface: #241b17;
    --rk-maroon: #e2a09a;
    --rk-indigo: #a9b7ef;
}

body.dark-theme .rk-card,
body.dark-theme .rk-table-wrap,
body.dark-theme .rk-quicknav a,
body.dark-theme .rk-faq-item,
body.dark-theme .rk-related-card,
body.dark-theme .rk-datenav-today,
body.dark-theme .rk-upcoming-list a {
    background: #1e1714;
    color: var(--rk-text);
}

body.dark-theme .rk-card-rahu {
    background: linear-gradient(135deg, #241b17 0%, #2c1f1c 100%);
}

body.dark-theme .rk-table thead th {
    background: #241b17;
}

body.dark-theme .rk-table tbody th,
body.dark-theme .rk-table tbody td {
    border-bottom-color: #322520;
}

body.dark-theme .rk-table tbody tr:hover {
    background: #251c18;
}

body.dark-theme .rk-explainer-body p {
    color: #ded2c8;
}
