/* ── Yoruba Calendar Page ─────────────────────────────────────────────── */

.calendar-hero {
    background: linear-gradient(135deg, #1a0a00 0%, #3b1f00 60%, #2C5F2D 100%);
    color: #fff;
    padding: 3.5rem 0 2rem;
    text-align: center;
}
.calendar-hero h1 { font-family: var(--font-heading); font-size: 2.6rem; margin-bottom: 0.4rem; }
.calendar-hero .hero-sub { font-size: 1.1rem; opacity: 0.8; margin-bottom: 0.3rem; }
.calendar-hero .hero-year { font-size: 0.9rem; opacity: 0.6; }

/* ── Today Banner ─────────────────────────────────────────────────────── */
.today-card {
    display: flex; gap: 2rem; flex-wrap: wrap;
    background: var(--bg-card, #fff);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.09);
    padding: 2rem;
    margin: 2rem 0;
}
.today-left { flex: 1; min-width: 240px; }
.today-left h2 { font-family: var(--font-heading); font-size: 2rem; color: var(--primary-color); margin: 0.3rem 0; }
.today-day-num { font-size: 2.4rem; font-weight: 700; }
.today-sub { color: var(--text-secondary,#888); margin: 0 0 0.8rem; font-style: italic; }
.today-detail-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 0.8rem 0; font-size: 0.88rem; color: var(--text-secondary,#666); }
.today-detail-row strong { color: var(--text-dark, #222); }
.today-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--primary-color); font-weight: 600; }
.greg-today { font-size: 0.83rem; color: #aaa; margin-top: 0.6rem; }

.today-right { flex: 1; min-width: 240px; }
.orisha-today { border-radius: 12px; padding: 1.4rem; color: #fff; }
.orisha-today h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.8; margin: 0 0 0.3rem; }
.orisha-day-name { font-family: var(--font-heading); font-size: 1.2rem; margin: 0 0 0.7rem; }
.orisha-names { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.orisha-chip { background: rgba(255,255,255,0.2); border-radius: 20px; padding: 0.2rem 0.7rem; font-size: 0.78rem; }
.orisha-chip.small { background: rgba(0,0,0,0.07); color: var(--text-dark,#222); font-size: 0.75rem; }
.orisha-desc { font-size: 0.84rem; opacity: 0.9; line-height: 1.5; margin: 0; }

.today-bridge { display: flex; align-items: center; gap: 1.5rem; background: #1a0a00; color: #f0c060; border-radius: 16px; padding: 2rem; }
.today-bridge i { font-size: 2.5rem; }
.today-bridge h2 { font-family: var(--font-heading); font-size: 1.6rem; margin: 0 0 0.4rem; }

/* ── Orisha colour backgrounds ────────────────────────────────────────── */
.dot-ifa-bg      { background: linear-gradient(135deg, #c8860a, #e8a020); }
.dot-ogun-bg     { background: linear-gradient(135deg, #1a5276, #2e7db5); }
.dot-sango-bg    { background: linear-gradient(135deg, #8B0000, #c0392b); }
.dot-egungun-bg  { background: linear-gradient(135deg, #2C5F2D, #4a8a50); }

/* dots */
.dot-ifa,    .dot-ifa-text    { color: #d4a017; }
.dot-ogun,   .dot-ogun-text   { color: #2a7ab5; }
.dot-sango,  .dot-sango-text  { color: #c0392b; }
.dot-egungun,.dot-egungun-text{ color: #2C5F2D; }

.cal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.cal-dot.dot-ifa     { background: #d4a017; }
.cal-dot.dot-ogun    { background: #2a7ab5; }
.cal-dot.dot-sango   { background: #c0392b; }
.cal-dot.dot-egungun { background: #2C5F2D; }

/* ── Year Strip ──────────────────────────────────────────────────────── */
.year-strip-wrap {
    overflow-x: auto; padding: 1rem 0;
    scrollbar-width: thin;
}
.year-strip { display: flex; gap: 0.4rem; width: max-content; padding: 0 1rem; }
.year-strip-btn {
    background: var(--bg-card,#fff);
    border: 1.5px solid transparent;
    border-radius: 10px;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
    transition: all 0.15s ease;
    min-width: 60px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.year-strip-btn:hover { border-color: var(--primary-color); }
.year-strip-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.year-strip-btn.current { border-color: var(--primary-color); }
.strip-num { font-size: 0.7rem; opacity: 0.7; }
.strip-name { font-weight: 600; font-size: 0.82rem; }

/* ── Month Grid ──────────────────────────────────────────────────────── */
.cal-section {
    background: var(--bg-card,#fff);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.cal-month-nav {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem;
}
.cal-nav-btn {
    background: none; border: 1.5px solid var(--border-color,#e0d8cc);
    border-radius: 8px; padding: 0.45rem 0.8rem; cursor: pointer;
    color: var(--text-dark,#333); transition: all 0.15s;
}
.cal-nav-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.cal-month-title { text-align: center; }
.cal-month-name { font-family: var(--font-heading); font-size: 1.8rem; color: var(--primary-color); display: block; }
.cal-month-sub  { display: block; font-style: italic; color: var(--text-secondary,#888); font-size: 0.9rem; }
.cal-month-meta { display: block; font-size: 0.76rem; color: #bbb; margin-top: 0.2rem; }

.cal-month-orisha { text-align: center; font-size: 0.85rem; color: var(--text-secondary,#888); margin-bottom: 1rem; }
.cal-month-orisha strong { color: var(--primary-color); }

.cal-headers { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; margin-bottom: 4px; }
.cal-day-header { text-align: center; font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; padding: 0.4rem; text-transform: uppercase; }

.cal-weeks { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; }
.cal-cell {
    border: 1.5px solid var(--border-color,#f0ece4);
    border-radius: 8px;
    padding: 0.55rem 0.4rem 0.4rem;
    cursor: default;
    transition: background 0.12s;
    position: relative;
    min-height: 60px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.cal-cell:hover { background: #fdf8f0; }
.cal-today { background: #fdf3e0 !important; border-color: var(--primary-color) !important; border-width: 2px; }
.cal-today .cal-cell-num { color: var(--primary-color); font-weight: 700; }
.cal-cell-num { font-size: 1.1rem; font-weight: 600; color: var(--text-dark,#333); }
.cal-greg-date { font-size: 0.66rem; color: #bbb; }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }

.cal-bridge-row { margin-top: 0.8rem; }
.cal-bridge-cell {
    background: linear-gradient(135deg, #1a0a00, #3b1f00);
    color: #f0c060;
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    display: flex; align-items: center; gap: 0.8rem;
    font-size: 0.9rem;
}
.cal-bridge-cell span { font-size: 0.8rem; opacity: 0.7; margin-left: auto; }

/* ── Jump Today btn ──────────────────────────────────────────────────── */
.jump-today-wrap { text-align: center; margin: 1rem 0; }
#jumpToday {
    background: var(--primary-color); color: #fff; border: none;
    border-radius: 8px; padding: 0.55rem 1.4rem; cursor: pointer;
    font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
    transition: opacity 0.15s;
}
#jumpToday:hover { opacity: 0.88; }

/* ── Add to Calendar button ──────────────────────────────────────────── */
.jump-today-wrap {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}
#downloadIcsBtn {
    background: #2C5F2D;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.4rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
#downloadIcsBtn:hover { opacity: 0.88; }

.ics-help {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary, #999);
    margin: 0.5rem 0 1rem;
}
.ics-help i { color: var(--primary-color); margin-right: 0.2rem; }
.ics-help a { color: var(--primary-color); }

/* ── Week Day Guide ──────────────────────────────────────────────────── */
.wd-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 1rem; }
.wd-card { background: var(--bg-card,#fff); border-radius: 12px; padding: 1.2rem; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.wd-label { display: inline-block; color: #fff; border-radius: 6px; padding: 0.2rem 0.65rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; margin-bottom: 0.5rem; }
.wd-card h4 { font-family: var(--font-heading); font-size: 1.1rem; margin: 0 0 0.5rem; color: var(--text-dark,#333); }
.wd-orisha { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.6rem; }
.wd-card p { font-size: 0.83rem; color: var(--text-secondary,#666); line-height: 1.5; margin: 0; }

/* ── Gregorian ref ───────────────────────────────────────────────────── */
.greg-week-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(110px,1fr)); gap: 0.6rem; margin-top: 1rem; }
.greg-day-cell {
    background: var(--bg-light,#faf8f5);
    border-radius: 8px; padding: 0.6rem 0.5rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    text-align: center;
}
.greg-day-en { font-size: 0.75rem; color: #aaa; }
.greg-day-yo { font-weight: 600; font-size: 0.82rem; color: var(--text-dark,#333); }

/* ── Dark mode ───────────────────────────────────────────────────────── */
[data-theme="dark"] .today-card,
[data-theme="dark"] .cal-section,
[data-theme="dark"] .wd-card { background: #1e1e1e; }
[data-theme="dark"] .cal-cell { border-color: #2e2e2e; }
[data-theme="dark"] .cal-cell:hover { background: #252525; }
[data-theme="dark"] .cal-today { background: #2a1f00 !important; border-color: var(--primary-color) !important; }
[data-theme="dark"] .year-strip-btn { background: #1e1e1e; color: #d8d0c0; }
[data-theme="dark"] .greg-day-cell { background: #252525; }
[data-theme="dark"] .orisha-chip.small { background: rgba(255,255,255,0.1); color: #d8d0c0; }

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .today-card { flex-direction: column; }
    .cal-cell { min-height: 50px; padding: 0.35rem; }
    .cal-cell-num { font-size: 0.95rem; }
    .cal-greg-date { display: none; }
    .calendar-hero h1 { font-size: 1.8rem; }
}

/* ── Credits ─────────────────────────────────────────────────────────── */
.calendar-page-credit {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color, #e8e0d0);
    font-size: 0.83rem;
    color: var(--text-secondary, #888);
    text-align: center;
}
.calendar-page-credit a { color: var(--primary-color); text-decoration: none; }
.calendar-page-credit a:hover { text-decoration: underline; }
.calendar-page-credit i { color: #c0392b; margin-right: 0.3rem; }

.calendar-credit {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.3rem;
}
.calendar-credit a { color: var(--primary-color); text-decoration: none; }
.calendar-credit a:hover { text-decoration: underline; }

[data-theme="dark"] .calendar-page-credit { border-color: #2e2e2e; color: #666; }
