/* ============================================================
   CALENDARUL BISERICESC

   Încărcat numai pe pagina de calendar, ca restul site-ului să nu
   plătească pentru stiluri pe care nu le folosește.

   Culoarea urmează convenția cărților de slujbă: sărbătorile mari
   se tipăresc cu roșu, restul cu negru. Hramurile parohiei le dăm
   cu aur, ca să se deosebească de celelalte praznice.
   ============================================================ */

/* ---------- Rezumatul zilei ---------- */

.cal-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-5);
    max-width: var(--width-page);
    margin-inline: auto;
}

.cal-summary-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-6);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--rule-dark);
    border-top: 2px solid var(--rule-gold);
}

.cal-summary-wide {
    grid-column: span 2;
}

.cal-summary-label {
    font-family: var(--font-ui);
    font-size: var(--text-2xs);
    font-weight: 700;
    letter-spacing: var(--track-wider);
    text-transform: uppercase;
    color: var(--gold-400);
}

.cal-summary-value {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--white);
    line-height: var(--lead-tight);
}

.cal-feast-name {
    text-wrap: balance;
}

.cal-summary-note {
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    color: var(--on-dark-muted);
    text-transform: capitalize;
}

.cal-state-post,
.cal-state-branza {
    color: var(--gold-300);
}

.cal-state-liber {
    color: var(--on-dark);
}

/* ---------- Antetul lunii ---------- */

.cal-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    max-width: var(--width-page);
    margin: 0 auto var(--space-8);
}

.cal-month {
    min-width: 10ch;
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    color: var(--ink);
    text-align: center;
    text-transform: capitalize;
}

.cal-year {
    color: var(--wine-500);
    font-variant-numeric: tabular-nums;
}

.cal-nav {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--navy-800);
    text-decoration: none;
    border: 1px solid var(--rule-light);
    border-radius: var(--radius-full);
    transition: color var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out);
}

.cal-nav:hover {
    color: var(--wine-500);
    border-color: var(--gold-500);
    background: var(--white);
}

/* ---------- Grila lunii ---------- */

.cal-grid-wrap {
    max-width: var(--width-page);
    margin-inline: auto;
    overflow-x: auto;
}

.cal-grid {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
}

.cal-grid th {
    padding: var(--space-3) var(--space-2);
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--ink-muted);
    text-align: left;
    border-bottom: 1px solid var(--rule-light);
}

/* Duminica, ultima coloană, e scoasă cu roșu ca în calendarele tipărite. */
.cal-grid th:last-child {
    color: var(--wine-500);
}

.cal-cell {
    height: 142px;
    padding: var(--space-4);
    vertical-align: top;
    background: var(--white);
    border: 1px solid var(--rule-light);
}

.cal-cell.is-out {
    background: var(--paper-alt);
    opacity: 0.5;
}

.cal-num {
    display: block;
    margin-bottom: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

/* Ziua de post: un punct discret lângă cifră. O culoare de fundal ar
   concura cu sărbătorile, care sunt informația mai importantă. */
.cal-cell.is-fast .cal-num::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 6px;
    vertical-align: 0.32em;
    border-radius: 50%;
    background: var(--navy-600);
    opacity: 0.55;
}

.cal-cell.is-great {
    background: #FFFBF3;
}

.cal-cell.is-great .cal-num {
    color: var(--wine-500);
}

.cal-cell.is-patron {
    background: var(--gold-100);
    border-color: var(--gold-500);
}

.cal-cell.is-today {
    outline: 2px solid var(--navy-700);
    outline-offset: -2px;
}

.cal-cell.is-today .cal-num {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--white);
    background: var(--navy-700);
}

.cal-marks {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cal-feast {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    line-height: 1.35;
    color: var(--ink-body);
}

.cal-feast-mare {
    color: var(--wine-500);
    font-weight: 700;
}

.cal-feast-hram {
    color: var(--gold-700);
    font-weight: 700;
}

/* ---------- Legenda ---------- */

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
    max-width: var(--width-page);
    margin: var(--space-8) auto 0;
    list-style: none;
}

.cal-legend li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-ui);
    font-size: var(--text-2xs);
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--ink-muted);
}

.cal-key {
    width: 14px;
    height: 14px;
    border: 1px solid var(--rule-light);
}

.cal-key-great {
    background: #FFFBF3;
    border-color: var(--wine-500);
}

.cal-key-patron {
    background: var(--gold-100);
    border-color: var(--gold-500);
}

.cal-key-fast {
    width: 7px;
    height: 7px;
    border: none;
    border-radius: 50%;
    background: var(--navy-600);
    opacity: 0.55;
}

/* ---------- Posturile anului ---------- */

.fast-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
    max-width: var(--width-page);
    margin-inline: auto;
}

.fast-item {
    display: grid;
    grid-template-columns: 4px 1fr;
    gap: var(--space-5);
}

.fast-bar {
    background: var(--gold-500);
}

.fast-bar-mare     { background: var(--wine-500); }
.fast-bar-apostoli { background: var(--gold-600); }
.fast-bar-adormire { background: var(--navy-600); }
.fast-bar-craciun  { background: var(--gold-500); }

.fast-body h3 {
    margin-bottom: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--navy-800);
}

.fast-dates {
    margin-bottom: var(--space-2);
    font-family: var(--font-ui);
    font-size: var(--text-base);
    font-variant-numeric: tabular-nums;
    color: var(--ink-body);
}

.fast-length {
    display: inline-block;
    margin-left: var(--space-2);
    padding: 1px 9px;
    font-size: var(--text-2xs);
    font-weight: 700;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--navy-950);
    background: var(--gold-100);
    border-radius: var(--radius-full);
}

.fast-note {
    font-family: var(--font-prose);
    font-size: var(--text-lg);
    line-height: var(--lead-body);
    color: var(--ink-muted);
}

/* ---------- Lista sărbătorilor ---------- */

.feast-columns {
    max-width: var(--width-page);
    margin-inline: auto;
    columns: 2;
    column-gap: var(--space-12);
}

.feast-row {
    display: grid;
    grid-template-columns: 6ch 1fr;
    gap: var(--space-4);
    align-items: baseline;
    break-inside: avoid;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--rule-light);
}

.feast-date {
    font-family: var(--font-ui);
    font-size: var(--text-base);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--wine-500);
}

.feast-name {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    font-family: var(--font-prose);
    font-size: var(--text-xl);
    line-height: var(--lead-snug);
    color: var(--ink-body);
}

.feast-row.is-patron .feast-date {
    color: var(--gold-700);
}

.feast-row.is-patron .feast-name {
    color: var(--navy-800);
    font-weight: 600;
}

.feast-tag {
    display: inline-block;
    margin-left: var(--space-2);
    padding: 1px 8px;
    font-family: var(--font-ui);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--navy-950);
    background: var(--gold-300);
    border-radius: var(--radius-full);
}

/* ---------- Nota de sursă ---------- */

.cal-source {
    max-width: 74ch;
    margin: var(--space-12) auto 0;
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    line-height: var(--lead-body);
    color: var(--ink-muted);
    text-align: center;
}

.cal-source a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: var(--space-2);
    color: var(--wine-500);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    white-space: nowrap;
}


@media (max-width: 860px) {

    .cal-summary-wide {
        grid-column: span 1;
    }

    .feast-columns {
        columns: 1;
    }

    .cal-cell {
        height: 88px;
    }

    .cal-feast {
        -webkit-line-clamp: 2;
    }
}


/* ---------- Desenele sărbătorilor ---------- */

.cal-feast {
    display: block;
}

.cal-feast-icon {
    display: block;
    margin-bottom: 3px;
    color: var(--wine-500);
}

.cal-feast-hram .cal-feast-icon {
    color: var(--gold-700);
}

.cal-feast-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feast-icon {
    color: var(--gold-700);
    flex-shrink: 0;
    align-self: center;
}

.feast-row.is-patron .feast-icon {
    color: var(--wine-500);
}

/* ---------- Însemnările parohiei ---------- */

/* Se despart de sărbătorile canonice printr-un filet, ca să se vadă
   că sunt de alt fel: acelea vin din rânduiala Bisericii, acestea din
   viața parohiei. */
.cal-marks-parish {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed var(--rule-light);
}

.cal-entry {
    display: block;
    font-family: var(--font-ui);
    font-size: var(--text-2xs);
    line-height: 1.35;
    color: var(--navy-600);
}

.cal-entry-time {
    font-variant-numeric: tabular-nums;
    color: var(--gold-700);
}

.cal-entry-slujba { color: var(--navy-700); font-weight: 700; }
.cal-entry-sarbatoare { color: var(--gold-700); font-weight: 700; }

.cal-cell.has-parish {
    box-shadow: inset 0 -3px 0 var(--gold-300);
}

/* ---------- Ce urmează la parohie ---------- */

.upcoming {
    max-width: var(--width-page);
    margin: var(--space-10) auto 0;
    padding-top: var(--space-8);
    border-top: 1px solid var(--rule-dark);
}

.upcoming-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--gold-300);
    margin-bottom: var(--space-5);
}

.upcoming-list {
    display: grid;
    gap: var(--space-4);
    list-style: none;
}

.upcoming-item {
    display: grid;
    grid-template-columns: 15ch 1fr;
    gap: var(--space-5);
    align-items: baseline;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--rule-dark);
}

.upcoming-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.upcoming-date {
    font-family: var(--font-ui);
    font-size: var(--text-2xs);
    font-weight: 700;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--gold-400);
}

.upcoming-date b {
    display: block;
    font-variant-numeric: tabular-nums;
    color: var(--on-dark-muted);
}

.upcoming-body b {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--white);
}

.upcoming-note {
    display: block;
    margin-top: 3px;
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    color: var(--on-dark-body);
}

@media (max-width: 700px) {
    .upcoming-item {
        grid-template-columns: 1fr;
        gap: var(--space-1);
    }
}
