/* =================================================
   Sündmused Plugin – kalendri stiilid
   Fondid: Fraunces (pealkirjad), Inter (tekst) – laeb teema.
   ================================================= */

.kal-wrap {
    background: #f9f4ec;
    padding: 2rem 2rem 4rem;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.kal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 0.5px solid #c8bfb0;
}

.kal-card {
    position: relative;
    padding: 2rem 1.8rem 2rem;
    border-right: 0.5px solid #c8bfb0;
    border-bottom: 0.5px solid #c8bfb0;
    cursor: pointer;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.kal-card:nth-child(3n) {
    border-right: none;
}

.kal-card:hover {
    background: #ffffff;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.07);
}

/* Klaviatuuriga liikumisel nähtav fookus */
.kal-card:focus-within {
    outline: 2px solid #b5522a;
    outline-offset: -2px;
}

.kal-card:hover .kal-day {
    color: #b5522a;
}

.kal-card:hover .kal-name {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.kal-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.kal-card-top-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding-top: 4px;
}

.kal-date {
    display: block;
}

.kal-day {
    display: block;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: #1a1611;
    line-height: 1;
    transition: color 0.25s ease;
}

.kal-month {
    display: block;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: #5f564b; /* kontrast ≥ 4.5:1 taustal #f9f4ec */
    text-transform: uppercase;
    margin-top: 4px;
}

.kal-type {
    font-size: 10px;
    letter-spacing: 0.18em;
    color: #5f564b;
    text-transform: uppercase;
}

/* Korduvuse märgend */
.kal-recurring {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9a4220;
    background: rgba(181, 82, 42, 0.08);
    border: 0.5px solid rgba(181, 82, 42, 0.25);
    border-radius: 20px;
    padding: 3px 8px;
    white-space: nowrap;
}

.kal-name {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1a1611;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.kal-desc {
    font-size: 0.95rem;
    color: #4f473e;
    line-height: 1.6;
    margin-bottom: 1.8rem;
}

.kal-link {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1a1611;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Kogu kaart on klikitav (ilma inline JavaScriptita) */
.kal-link::before {
    content: '';
    position: absolute;
    inset: 0;
}

.kal-link::after {
    content: '→';
    font-size: 13px;
    transition: transform 0.2s ease;
}

.kal-card:hover .kal-link::after {
    transform: translateX(4px);
}

/* Ekraanilugejale mõeldud peidetud tekst */
.synd-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.synd-empty {
    text-align: center;
    color: #5f564b;
    font-style: italic;
    padding: 2rem;
}

@media (prefers-reduced-motion: reduce) {
    .kal-card,
    .kal-day,
    .kal-link::after {
        transition: none;
    }
}

/* ---- Mobiil ---- */
@media (max-width: 768px) {
    .kal-grid {
        grid-template-columns: 1fr;
    }

    .kal-card,
    .kal-card:nth-child(3n) {
        border-right: none;
    }
}
