/* ------------------------------------------------------------------
   HOPSA USA-Canada — public events list (/events, /past-activities)
   Square thumbnail + month/day badge + title + date line,
   following the calendar-list pattern used by Google Calendar / Apple.
   ------------------------------------------------------------------ */

.hopsa-events-section {
    background: #fff;
}

.hopsa-events-section-past {
    background: #faf7f4;
}

.hopsa-events-heading {
    font-family: 'Fredoka', 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
    color: #3d2314;
    margin-bottom: .5rem;
}

.hopsa-events-subtitle {
    color: #6c5a4f;
    max-width: 46rem;
    margin: 0 auto 0;
}

.hopsa-events-count {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
    font-weight: 600;
    color: #8B4513;
    margin: 1.25rem 0 0;
}

.hopsa-events-count i {
    margin-right: .4rem;
}

/* ---- list ---- */
.hopsa-events-grid {
    margin-top: 1.5rem;
}

.hopsa-event-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: .95rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(139, 69, 19, .18);
    box-shadow: 0 2px 10px rgba(61, 35, 20, .04);
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.hopsa-event-card:hover {
    background: #fff;
    border-color: rgba(139, 69, 19, .45);
    box-shadow: 0 10px 28px rgba(139, 69, 19, .14);
    transform: translateY(-2px);
}

.hopsa-events-section-past .hopsa-event-card:hover {
    background: #fff;
}

/* ---- thumbnail + date badge ---- */
.hopsa-event-media {
    position: relative;
    flex: 0 0 auto;
}

.hopsa-event-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(140deg, #a85820, #6d3a17);
    box-shadow: 0 4px 12px rgba(61, 35, 20, .18);
}

.hopsa-event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.hopsa-event-card:hover .hopsa-event-thumb img {
    transform: scale(1.06);
}

/* legibility scrim behind the badge */
.hopsa-event-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(0, 0, 0, .58) 0%, rgba(0, 0, 0, .32) 42%, rgba(0, 0, 0, 0) 72%);
    pointer-events: none;
}

.hopsa-event-thumb-placeholder {
    color: rgba(255, 255, 255, .85);
}

.hopsa-event-badge {
    position: absolute;
    left: .55rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    line-height: 1;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
    text-align: center;
    pointer-events: none;
    z-index: 1;
}

.hopsa-event-badge-month {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.hopsa-event-badge-day {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -.02em;
    white-space: nowrap;
    max-width: 74px;   /* multi-day badge ("JUL 1–4") must stay inside the thumbnail */
}

/* ---- body ---- */
.hopsa-event-body {
    min-width: 0;
    flex: 1 1 auto;
    padding-top: .15rem;
}

.hopsa-event-category {
    display: inline-block;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #8B4513;
    background: rgba(139, 69, 19, .10);
    border-radius: 999px;
    padding: .2rem .55rem;
    margin-bottom: .35rem;
}

.hopsa-event-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.02rem;
    font-weight: 600;
    color: #2f1b10;
    margin: 0 0 .25rem;
    line-height: 1.3;
}

.hopsa-event-title a {
    color: inherit;
    text-decoration: none;
}

.hopsa-event-title a:hover {
    color: #8B4513;
    text-decoration: underline;
}

.hopsa-event-featured {
    color: #DAA520;
    font-size: .72rem;
    margin-left: .35rem;
}

.hopsa-event-when,
.hopsa-event-where {
    margin: 0 0 .15rem;
    font-size: .875rem;
    color: #5a463a;
}

.hopsa-event-where {
    color: #7a6a60;
}

.hopsa-event-when i,
.hopsa-event-where i {
    width: 1rem;
    margin-right: .4rem;
    color: #a85820;
    text-align: center;
}

.hopsa-event-desc {
    margin: .4rem 0 0;
    font-size: .85rem;
    color: #6c5a4f;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- long descriptions: clamped summary + "Read more" ---- */
.hopsa-event-details {
    margin: .35rem 0 0;
}

.hopsa-event-details summary {
    cursor: pointer;
    display: inline-block;
    list-style: none;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #8B4513;
}

.hopsa-event-details summary::-webkit-details-marker {
    display: none;
}

.hopsa-event-details summary::after {
    content: " \25BE";
}

.hopsa-event-details[open] summary::after {
    content: " \25B4";
}

.hopsa-event-details-body {
    margin-top: .35rem;
    border-left: 2px solid rgba(139, 69, 19, .18);
    padding-left: .65rem;
}

/* the expanded copy is not clamped — only the summary paragraph is */
.hopsa-event-desc-full {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.hopsa-event-desc-lead {
    font-weight: 600;
    color: #3d2314;
}

/* once expanded, the clamped summary would be a duplicate */
.hopsa-event-card:has(.hopsa-event-details[open]) .hopsa-event-desc-preview {
    display: none;
}

.hopsa-event-cta {
    display: inline-block;
    margin-top: .6rem;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #8B4513 !important;
    border: 1px solid rgba(139, 69, 19, .35);
    border-radius: 999px;
    padding: .3rem .9rem;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

/* The marketing theme colours every anchor through a long `a:not(…)` chain that outranks a
   single class, so the CTA has to assert its own colours — without !important it would keep
   the theme's dark link colour on the brown hover fill and the label would disappear. */
.hopsa-event-cta:hover {
    background: #8B4513;
    color: #fff !important;
}

/* ---- past events read as archive ---- */
.hopsa-events-section-past .hopsa-event-thumb {
    background: linear-gradient(140deg, #8a8378, #5f574d);
    box-shadow: 0 4px 12px rgba(61, 35, 20, .12);
}

.hopsa-events-grid-past .hopsa-event-card {
    border-color: rgba(108, 90, 79, .22);
    background: #fff;
}

.hopsa-events-grid-past .hopsa-event-card:hover {
    transform: none;
    border-color: rgba(108, 90, 79, .4);
}

.hopsa-events-grid-past .hopsa-event-category {
    color: #6c5a4f;
    background: rgba(108, 90, 79, .12);
}

/* ---- empty state ---- */
.hopsa-events-empty {
    text-align: center;
    padding: 2.25rem 1rem;
    margin-top: 1.5rem;
    border: 1px dashed rgba(139, 69, 19, .3);
    border-radius: 16px;
    background: rgba(139, 69, 19, .03);
    color: #6c5a4f;
}

.hopsa-events-empty i {
    font-size: 1.8rem;
    color: #a85820;
    display: block;
    margin-bottom: .6rem;
}

@media (max-width: 575.98px) {
    .hopsa-event-thumb {
        width: 72px;
        height: 72px;
        border-radius: 10px;
    }

    .hopsa-event-badge-day {
        font-size: 1.15rem;
    }

    .hopsa-event-card {
        gap: .75rem;
        padding: .7rem .8rem;
    }
}
