/* Nysnö Events CSS */
/* Event platform styles — shared base is in nysno-public.css */

.events-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 40px;
}

.events-detail-page {
    /* No padding/max-width — hero needs full width */
}

/* Page Header */
.events-page-header {
    margin-bottom: 40px;
}

.events-page-title {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 600;
    color: var(--c-text);
    margin: 0 0 8px;
}

.events-page-subtitle {
    font-size: 18px;
    color: var(--c-text-muted);
    margin: 0;
}

/* Event Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.events-card {
    background: var(--c-card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: var(--c-text);
    transition: box-shadow 0.2s, transform 0.2s;
    display: block;
}

.events-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.events-card-past {
    opacity: 0.7;
}

.events-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--c-bg);
}

.events-card-image-placeholder {
    background: var(--c-gradient);
    opacity: 0.3;
}

/* Generated cover for events without an uploaded image: the Nysnö pill
   illustration placed as a non-filling, per-event-varied decorative element.
   Variation (rotation/scale/offset/tint) comes in as inline custom properties
   from components/event_cover.php. */
.event-cover {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-color: var(--cover-bg, #f2ede6);
}

.event-cover-shapes {
    position: absolute;
    left: var(--cover-x, 50%);
    top: var(--cover-y, 50%);
    width: var(--cover-w, 80%);
    height: auto;
    transform: translate(-50%, -50%) rotate(var(--cover-rot, 0deg)) scale(var(--cover-scale, 1));
    transform-origin: center;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0.92;
}

.event-cover-card {
    --cover-w: 78%;
}

/* Full-width hero variant, mirrors .event-hero-full's framing */
.event-cover-hero {
    --cover-w: 62%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 62vh;
    margin-left: 40px;
    margin-right: 40px;
    padding: 4vw;
    border-radius: 4px;
}

/* Soft light wash behind the heading so the title reads no matter where the
   shapes happen to land for this event. */
.event-cover-scrim {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        180deg,
        color-mix(in srgb, var(--cover-bg, #f2ede6) 0%, transparent) 40%,
        color-mix(in srgb, var(--cover-bg, #f2ede6) 85%, transparent) 100%
    );
    pointer-events: none;
}

.event-cover-content {
    position: relative;
    z-index: 2;
    width: 90%;
    margin-bottom: 24px;
}

.event-cover-title {
    font-family: var(--font-heading, 'Avertape', serif);
    font-size: 60px;
    font-weight: 700;
    line-height: 1.08;
    margin: 0;
    background-image: var(--c-gradient, linear-gradient(135deg, #75479a 0%, #f57aa7 100%));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media (max-width: 767px) {
    .event-cover-hero {
        min-height: 44vh;
        margin-left: 16px;
        margin-right: 16px;
    }
    .event-cover-hero {
        --cover-w: 82%;
    }
    .event-cover-title {
        font-size: 38px;
    }
}

.events-card-body {
    padding: 20px;
    display: flex;
    gap: 16px;
}

.events-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    padding: 8px;
    background: var(--c-bg);
    border-radius: var(--radius-md);
    line-height: 1;
}

.events-card-date-day {
    font-size: 24px;
    font-weight: 700;
    color: var(--c-purple);
}

.events-card-date-month {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin-top: 2px;
}

.events-card-info {
    flex: 1;
    min-width: 0;
}

.events-card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--c-text);
}

.events-members-badge {
    display: inline-block;
    background: var(--c-purple);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.events-meetup-badge {
    background: var(--c-pink, #f57aa7);
}

.events-card-desc {
    font-size: 14px;
    color: var(--c-text-muted);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.events-card-meta {
    font-size: 13px;
    color: var(--c-text-muted);
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.events-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.events-card-price {
    font-weight: 600;
    color: var(--c-text);
}

.events-card-free {
    color: #52c41a;
}

.events-card-discount {
    font-size: 12px;
    font-weight: 400;
    color: var(--c-purple);
    margin-left: 6px;
}

.events-card-attendees {
    font-size: 13px;
    color: var(--c-text-muted);
}

.events-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--c-text-muted);
    font-size: 18px;
}

.events-section-divider {
    margin: 40px 0 24px;
    padding-top: 24px;
    border-top: 1px solid var(--c-border);
}

.events-section-divider h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--c-text-muted);
    margin: 0;
}

/* Event Detail */
.event-detail {
    max-width: 1000px;
    margin: 0 auto;
}

/* Retreat single page needs more horizontal space for the long body + facilitator image. */
.event-detail:has(> .retreat-single) { max-width: 1400px; }
.page-static-content.retreat-single { max-width: 1100px; }
.retreat-single img { display: block; max-width: 100%; height: auto; border-radius: 6px; margin: 1rem 0; }
.retreat-single figure { margin: 1.5rem 0; }
.retreat-single figure img { margin: 0; }

/* "Datum och platser" list — date and title on the same row, both black, no indent. */
.retreat-schedule-list,
.page-static-content .retreat-schedule-list {
    list-style: none;
    margin: 0 0 1rem;
    padding-left: 0;
}
.retreat-schedule-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid #ece9e3;
    color: var(--c-text);
}
.retreat-schedule-item:last-child { border-bottom: none; }
.retreat-schedule-date,
.retreat-schedule-title { color: var(--c-text); font-weight: 400; }

/* H2 → accordion in the body (added at runtime by the script at the bottom of the page). */
.retreat-accordion {
    border-top: 1px solid #d8d4ce;
}
.retreat-accordion:last-of-type { border-bottom: 1px solid #d8d4ce; }

.retreat-accordion-summary {
    list-style: none;
    cursor: pointer;
    padding: 1.25rem 2rem 1.25rem 0;
    position: relative;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--c-text);
    transition: color 0.15s ease;
}
.retreat-accordion-summary::-webkit-details-marker { display: none; }
.retreat-accordion-summary:hover { color: var(--c-purple, #75479a); }

/* Chevron — pure CSS, rotates 180° when the section is open */
.retreat-accordion-summary::after {
    content: '';
    position: absolute;
    right: 0.25rem;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--c-purple, #75479a);
    border-bottom: 2px solid var(--c-purple, #75479a);
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.25s ease;
}
.retreat-accordion[open] > .retreat-accordion-summary::after {
    transform: translateY(-30%) rotate(-135deg);
}

.retreat-accordion-body {
    padding: 0 0 1.25rem;
    overflow: hidden;
}
.retreat-accordion-body > :first-child { margin-top: 0; }

/* Open animation: fade + slide-in. Native <details> still controls visibility,
   so the close is instant — but the open feels alive. */
.retreat-accordion[open] > .retreat-accordion-body {
    animation: retreat-accordion-open 0.28s ease both;
}
@keyframes retreat-accordion-open {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.event-back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--c-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.event-back-link:hover {
    text-decoration: underline;
}

/* Full-bleed hero (matches nysno.se Webflow style) */
.event-hero-full {
    z-index: 10;
    border-radius: 4px;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 80vh;
    margin-left: 40px;
    margin-right: 40px;
    padding-left: 4vw;
    padding-right: 4vw;
    display: flex;
    position: relative;
    overflow: hidden;
}

.event-hero-bg {
    border-radius: 4px;
    position: absolute;
    inset: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.event-hero-overlay {
    background-image: linear-gradient(#3d3d3d4d, #3d3d3d4d);
    position: absolute;
    inset: 0;
}

/* Heros with body copy (subtitle) get a subtle bottom-darkening gradient on
   top of the flat tint so the text stays readable against bright photos. */
.event-hero-full:has(.event-hero-subtitle) .event-hero-overlay {
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.25) 100%),
        linear-gradient(#3d3d3d4d, #3d3d3d4d);
}

.event-hero-content {
    position: relative;
    z-index: 10;
    width: 90%;
    margin-bottom: 40px;
}

.event-back-link-hero {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.event-back-link-hero:hover {
    color: #fff;
}

/* nysno.se's .heading-jumbo inherits Averta from <body> — not Avertape, which
   is reserved for body-content rich-text headings. Match that here. */
.event-hero-title {
    font-family: var(--font-body);
    color: #fff;
    text-transform: none;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    position: relative;
    z-index: 1000;
}

.event-hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

/* Matches Webflow .primary-button.header-primary-button on nysno.se exactly */
.event-hero-cta {
    display: inline-block;
    margin-top: 24px;
    background: #fef787;
    color: var(--c-text, #1a1b1f);
    font-weight: 700;
    font-size: 1rem;
    padding: 15px 24px;
    border-radius: 200px;
    text-decoration: none;
    position: relative;
    z-index: 1000;
}

.event-hero-cta:hover {
    color: var(--c-text, #1a1b1f);
    text-decoration: underline;
}

/* Hero + intro paragraph as one component (page_hero 'intro' slot). The intro
   is an attached panel: same width as the hero card and flush against its
   bottom, so the image and copy form a single rounded card. */
.event-hero-block {
    display: flex;
    flex-direction: column;
}

/* Square off the hero's bottom corners so the panel below joins seamlessly. */
.event-hero-block .event-hero-full {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.event-hero-intro {
    box-sizing: border-box;
    /* Match the hero card's 40px side margins so widths line up exactly. */
    margin: 0 40px;
    padding: 28px 4vw;
    background: #fff;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.event-hero-intro-text {
    max-width: 760px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 22px;
    line-height: 1.5;
    font-weight: 400;
    color: #1a1b1f;
}

/* Rich intro (heading + several paragraphs) inside the attached hero panel. */
.event-hero-intro-rich {
    max-width: 760px;
    color: #1a1b1f;
}
.event-hero-intro-rich h2 {
    margin: 0 0 12px;
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
}
.event-hero-intro-rich p {
    margin: 0 0 12px;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
}
.event-hero-intro-rich p:last-child { margin-bottom: 0; }

@media (max-width: 767px) {
    /* Hero drops its 40px side margins on mobile, so the panel goes full width
       and only the bottom corners stay rounded. */
    .event-hero-intro {
        margin: 0;
        padding: 22px 4vw;
    }
    .event-hero-intro-text { font-size: 20px; }
}

/* Hero video — sits behind .event-hero-overlay/.event-hero-content. */
.event-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.event-hero-full.has-hero-video,
.event-hero-full.has-full-video {
    position: relative;
}

/* Full video sits on top of preview, hidden by default. */
.event-hero-video-full {
    display: none;
    z-index: 5;
    background: #000;
}

.event-hero-full.is-playing-full .event-hero-video-full {
    display: block;
}

.event-hero-full.is-playing-full .event-hero-video-preview,
.event-hero-full.is-playing-full .event-hero-overlay,
.event-hero-full.is-playing-full .event-hero-content {
    display: none;
}

/* Dim the preview video before the user plays the full one — gives the play
   button enough contrast and signals that the video is teaser-only. */
.event-hero-full.has-full-video .event-hero-video-preview {
    filter: brightness(0.55);
}
.event-hero-full.has-full-video.is-playing-full .event-hero-video-preview {
    filter: none;
}

/* Round play button — absolutely centered in the hero (not stuck to the
   bottom of the title block). */
.event-hero-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1b1f;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, background 0.15s ease;
    padding: 0;
    z-index: 1500;
}

.event-hero-play-button svg {
    margin-left: 5px; /* visually centre the triangle */
}

.event-hero-play-button:hover {
    transform: translate(-50%, -50%) scale(1.08);
    background: #fff;
}

.event-hero-full.is-playing-full .event-hero-play-button {
    display: none;
}

.event-detail-content-spacing {
    padding: 4vw;
}

.event-detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    min-height: 400px;
}

.event-detail-title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 600;
    margin: 0 0 24px;
    color: var(--c-text);
}

.event-detail-description {
    font-family: var(--font-body);
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--c-text);
}

.event-detail-description p {
    margin-bottom: 1.5rem;
}

.event-detail-description a {
    color: var(--c-text);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.event-detail-description a:hover {
    color: var(--c-purple);
}

/* Retreat list cards carry their own styling. When the list is rendered
   inside .page-static-content (e.g. venue pages, the per-venue block on a
   program page), don't let that wrapper's link rule underline/bold the card
   anchor — so the cards look identical to the /retreatprogram listing. */
.page-static-content .retreat-card,
.page-static-content .retreat-card:hover {
    text-decoration: none;
    font-weight: 400;
}

/* Sidebar Info Card */
.event-info-card {
    background: var(--c-card-bg);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
}

.event-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 12px 0;
    border-bottom: 1px solid var(--c-border);
    font-size: 15px;
}

.event-info-row:last-child {
    border-bottom: none;
}

.event-info-row strong {
    color: var(--c-text-muted);
    font-weight: 600;
    flex: 0 0 auto;
}

.event-info-row > span {
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
}

.event-members-only-badge {
    display: inline-block;
    background: #ece6f4;
    color: var(--c-purple, #75479a);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.event-members-only-gate {
    background: #fff;
    border: 1px solid #e6e3df;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}

.event-members-only-gate p {
    margin: 0 0 0.85rem;
    color: var(--c-text);
}

/* Inbjudningskod — alternativ väg in på ett medlemsevent */
.event-invite-form {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid #e6e3df;
}

.event-invite-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--c-text);
}

.event-invite-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.event-invite-row input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 2px solid var(--c-border);
    border-radius: 4px;
    font-size: 15px;
    font-family: var(--font-body);
    text-transform: uppercase;
    margin-bottom: 0;
}

.event-invite-btn {
    padding: 10px 16px;
    background: var(--c-bg);
    border: 2px solid var(--c-border);
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    color: var(--c-text);
    white-space: nowrap;
}

.event-invite-btn:hover {
    border-color: var(--c-purple);
    color: var(--c-purple);
}

.event-invite-active {
    background: #ece6f4;
    color: var(--c-purple, #75479a);
    font-size: 14px;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    margin: 0 0 0.85rem;
}

.event-info-row a {
    color: var(--c-purple);
}

.event-price-original {
    text-decoration: line-through;
    color: var(--c-text-muted);
    margin-right: 8px;
}

.event-price-discounted {
    font-weight: 700;
    color: var(--c-purple);
}

.event-discount-badge {
    display: inline-block;
    background: var(--c-purple);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: 600;
}

.event-free-label {
    color: #52c41a;
    font-weight: 600;
}

/* Guest Fields */
.event-guest-fields {
    margin-bottom: 16px;
}

.event-guest-fields label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--c-text);
}

.event-guest-fields input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--c-border);
    border-radius: 4px;
    font-size: 15px;
    font-family: var(--font-body);
    margin-bottom: 12px;
}

.event-guest-fields input:focus,
.event-guest-fields select:focus {
    outline: none;
    border-color: var(--c-purple);
}

.event-quantity-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--c-border);
    border-radius: 4px;
    font-size: 15px;
    font-family: var(--font-body);
    margin-bottom: 12px;
    background: white;
}

/* Price Summary */
.event-price-summary {
    background: var(--c-card-bg);
    border: 1px solid var(--c-border);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.price-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: var(--c-text-muted);
}

.price-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid var(--c-border);
    font-weight: 700;
    font-size: 16px;
    color: var(--c-text);
}

/* Attend Button */
.event-attend-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--c-gradient);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-attend-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(117, 71, 154, 0.3);
}

.event-attend-btn-login {
    background: var(--c-bg);
    color: var(--c-purple);
    border: 2px solid var(--c-purple);
}

.event-attend-btn-login:hover {
    background: var(--c-purple);
    color: white;
}

.event-attending-status {
    background: #f0faf0;
    border: 1px solid #b7e4b7;
    color: #276727;
    padding: 14px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-unattend-btn {
    background: none;
    border: 1px solid #991b1b;
    color: #991b1b;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-body);
}

.event-unattend-btn:hover {
    background: #991b1b;
    color: white;
}

.event-cancelled-notice,
.event-past-notice,
.event-full-notice {
    text-align: center;
    padding: 14px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--c-text-muted);
    background: var(--c-bg);
}

.event-cancelled-notice {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fca5a5;
}

.event-full-notice {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.event-spots-left {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    text-align: center;
}

/* Discount Code Input */
.event-discount-input {
    margin-bottom: 16px;
}

.event-discount-input label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--c-text);
}

.event-discount-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.event-discount-row input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--c-border);
    border-radius: 4px;
    font-size: 15px;
    font-family: var(--font-body);
    text-transform: uppercase;
    margin-bottom: 0;
}

.event-discount-apply-btn {
    padding: 10px 16px;
    background: var(--c-bg);
    border: 2px solid var(--c-border);
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    color: var(--c-text);
    white-space: nowrap;
}

.event-discount-apply-btn:hover {
    border-color: var(--c-purple);
    color: var(--c-purple);
}

.event-discount-message {
    font-size: 13px;
    margin-top: 6px;
    min-height: 20px;
}

/* Attendees Section */
.event-attendees-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--c-border);
}

.event-attendees-section h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin: 0 0 16px;
}

.event-attendees-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.event-attendee {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: var(--c-bg);
    border-radius: 20px;
    text-decoration: none;
    color: var(--c-text);
    font-size: 14px;
    transition: box-shadow 0.2s;
}

a.event-attendee:hover {
    box-shadow: var(--shadow-hover);
}

.event-attendee-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.event-attendee-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-purple);
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.event-attendee-name {
    font-weight: 500;
}

.event-attend-form {
    margin-top: 0;
}

/* Responsive — matching Webflow breakpoints */
@media (max-width: 991px) {
    .event-hero-title {
        font-size: 46px;
    }

    .event-detail-grid {
        grid-template-columns: 1fr;
    }

    .event-detail-sidebar {
        order: -1;
    }

    /* Community login: keep the intro text above the login form on mobile. */
    .community-login-grid .event-detail-sidebar {
        order: 0;
    }
}

@media (max-width: 767px) {
    .events-main {
        padding: 20px 16px;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .events-page-title {
        font-size: 28px;
    }

    .event-hero-full {
        min-height: 50vh;
        margin-left: 0;
        margin-right: 0;
    }

    .event-hero-content {
        width: 100%;
        /* Match the bottom gap to the left gap (hero padding-left: 4vw) so the
           title is inset equally from the bottom and left edges on mobile. */
        margin-bottom: 4vw;
    }

    .event-hero-title {
        width: 100%;
        font-size: 30px;
    }

    .event-detail-content-spacing {
        padding: 24px 16px;
    }

    .event-detail-description {
        font-size: 1.125rem;
    }
}

@media (max-width: 479px) {
    .event-hero-title {
        font-size: 27px;
    }
}

/* Attendee-avatar stack (components/attendee_avatars.php) — shown on event
   listings/puffs for logged-in members. */
.attendee-avatars {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin-top: 12px;
}
.attendee-avatars .attendee-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: -10px;
    border: 2px solid #fff;
    background-size: cover;
    background-position: center;
    background-color: #d9cfc0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #4a3f55;
    flex-shrink: 0;
    box-sizing: border-box;
}
.attendee-avatars .attendee-avatar:first-child { margin-left: 0; }
.attendee-avatars .attendee-avatar[data-member-id] { cursor: pointer; }
.attendee-avatars .attendee-avatar[data-member-id]:hover { border-color: var(--c-purple, #75479a); position: relative; z-index: 1; }
.attendee-avatars .attendee-avatar-more {
    background-color: #75479a;
    color: #fff;
    font-size: 11px;
}

/* ---------------------------------------------------------------------------
   Event tags — chips on cards and the detail page, plus the tag bar that
   links to the collection pages at /events/tagg/{slug}.
   --------------------------------------------------------------------------- */
.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
}
.event-tags-card {
    margin: 8px 0 0;
}
.event-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #efe9f3;
    color: #5a3d75;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
}
a.event-tag-link:hover {
    background: var(--c-purple, #75479a);
    color: #fff;
}
.event-tag-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 32px;
}
.event-tag-bar .event-tag {
    padding: 6px 14px;
    font-size: 13px;
}
.events-section-heading {
    margin: 48px 0 20px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1b1f;
}
