/* ============================================================
   calendar.css — events calendar page
   ============================================================ */

.cal-wrap {
    /* A month grid cannot reflow to a single column, so WCAG 1.4.10 allows
       it to scroll sideways -- but body has overflow-x: hidden, so without
       this any overflow would just be clipped and unreachable. */
    overflow-x: auto;
    padding: 3rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cal-intro {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.85;
    max-width: 700px;
    margin-bottom: 3rem;
}

/* ── COMING UP CARDS ── */
.coming-up {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    margin-bottom: 4rem;
}

.cu-card {
    background: var(--bg2);
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: background .3s;
}

.cu-card:hover {
    background: var(--bg3);
}

.cu-img {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.cu-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.6);
    transition: filter .4s, transform .5s;
}

.cu-card:hover .cu-img img {
    filter: brightness(.8);
    transform: scale(1.04);
}

.cu-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--red);
    color: white;
    font-size: .55rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    padding: .35rem .7rem;
}

.cu-body {
    padding: 1.5rem;
}

.cu-date {
    font-size: .6rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--red-text);
    margin-bottom: .4rem;
}

.cu-title {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text);
    margin-bottom: .3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cu-type {
    font-size: .6rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── SECTION TITLE ── */
.cal-section-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cal-section-title .label {
    font-family: var(--font-ui);
    font-size: .6rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── NAV BUTTONS ── */
.cal-nav-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: .3rem .8rem;
    cursor: pointer;
    font-size: .8rem;
    transition: all .2s;
    font-family: var(--font-ui);
}

.cal-nav-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ── CALENDAR GRID ── */
.cal-grid {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 1px;
    background: var(--border);
    margin-bottom: 2rem;
}

.cal-day-head {
    background: var(--bg3);
    padding: .7rem;
    text-align: center;
    font-weight: 400; /* th defaults to bold; the div didn't */
    font-size: .58rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cal-cell {
    background: var(--bg2);
    padding: .6rem;
    height: 90px;
    vertical-align: top;
}

.cal-cell.today {
    background: var(--bg4);
    outline: 1px solid var(--border-gold);
}

.cal-cell.other-month {
    background: var(--bg);
}

.cal-cell.other-month .cal-num {
    color: var(--text-dim);
}

.cal-cell.other-month .cal-event {
    display: none;
}

.cal-cell.past {
    background: var(--bg);
}

.cal-num {
    font-size: .75rem;
    color: var(--text-muted);
    margin-bottom: .4rem;
}

.cal-cell.today .cal-num {
    color: var(--gold);
    font-weight: 700;
}

/* ── CALENDAR EVENT CHIPS ── */
.cal-event {
    font-size: .58rem;
    background: rgba(201, 36, 27, .5);
    color: rgba(248, 244, 239, .85);
    padding: .2rem .4rem;
    margin-bottom: .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background .2s;
}

.cal-event:hover {
    background: rgba(201, 36, 27, .8);
}

.cal-event.wine {
    background: rgba(201, 168, 76, .35);
    color: rgba(248, 244, 239, .85);
}

.cal-event.wine:hover {
    background: rgba(201, 168, 76, .6);
}

.cal-event.happy {
    background: rgba(232, 114, 12, .3);
    color: rgba(248, 244, 239, .75);
}

.cal-event.disco {
    background: rgba(100, 80, 180, .4);
    color: rgba(248, 244, 239, .85);
}

.cal-event.tasting {
    background: rgba(76, 175, 114, .35);
    color: rgba(248, 244, 239, .85);
}

/* ── COLOR KEY ── */
.cal-color-key {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    font-size: .7rem;
    color: var(--text-muted);
}

.cal-color-key span {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.key-dot {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    display: inline-block;
}

/* ── EVENTS LIST ── */
.cal-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    margin-bottom: 4rem;
}

.cal-list-item {
    background: var(--bg2);
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 2rem;
    align-items: start;
    transition: background .3s;
}

.cal-list-item:hover {
    background: var(--bg3);
}

.cal-list-item.past {
    opacity: .5;
}

.cli-date {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--red-text);
    line-height: 1;
}

.cli-month {
    font-size: .55rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: .2rem;
}

.cli-title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text);
    margin-bottom: .3rem;
}

.cli-desc {
    font-size: .75rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.cli-badge {
    background: rgba(201, 36, 27, .2);
    border: 1px solid rgba(201, 36, 27, .4);
    color: var(--red-text);
    font-size: .6rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: .4rem .8rem;
    white-space: nowrap;
    align-self: start;
}

.cli-badge.tasting {
    background: rgba(76, 175, 114, .2);
    border-color: rgba(76, 175, 114, .4);
    color: #4caf72;
}

/* ── MISC ── */
.wine-note {
    background: var(--bg3);
    border-left: 3px solid var(--gold);
    padding: 1rem 1.5rem;
    margin-bottom: 3rem;
    font-size: .8rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-style: italic;
}

.no-events {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-style: italic;
    background: var(--bg2);
}

/* ── MOBILE ── */
@media (max-width: 768px) {
    .cal-wrap {
        padding: 2rem 1.2rem;
    }

    .cal-section-title {
        font-size: 1.1rem;
    }

    .cal-cell {
        min-height: 60px;
        padding: .4rem;
    }

    .cal-num {
        font-size: .65rem;
    }

    .cal-event {
        font-size: .48rem;
        padding: .15rem .3rem;
    }

    .coming-up {
        grid-template-columns: 1fr;
    }

    .cal-list-item {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .cli-badge {
        display: none;
    }

    .cli-date {
        font-size: 1.5rem;
    }

    .cal-color-key {
        gap: .8rem;
        font-size: .62rem;
    }
}

@media (max-width: 480px) {
    /* These chips are links to event pages and the only place the
       month's events appear -- there is no list after the table. They
       used to be display:none here, which removed them from the page
       and the a11y tree on phones. Cells grow instead. */
    .cal-event {
        font-size: .44rem;
        padding: .12rem .22rem;
    }
}
