/* Events: /events/ archive and single event pages (RequestDesk Connector rd_event).
   Enqueued by inc/cc-events.php only on those pages. */

/* ====== Wrappers: full-bleed hero flush to the nav (same fixes as the case study archive) ====== */
body.post-type-archive-rd_event .site-content, body.single-rd_event .site-content { padding-top: 0 !important; margin-top: 0 !important; }
body.post-type-archive-rd_event .site-main, body.single-rd_event .site-main { grid-template-columns: 1fr !important; display: block !important; }
body.post-type-archive-rd_event article.post-archive, body.single-rd_event article.cc-ev-main { width: 100% !important; max-width: none !important; overflow: visible !important; }
body.post-type-archive-rd_event article.post-archive .inside-article::after, body.single-rd_event article.cc-ev-main .inside-article::after { display: none !important; content: none !important; }
body.post-type-archive-rd_event article.post-archive:hover, body.single-rd_event article.cc-ev-main:hover { transform: none !important; box-shadow: none !important; }
article.cc-ev-main, article.cc-ev-main > .inside-article { padding: 0 !important; margin: 0 !important; background: transparent; border: 0 !important; box-shadow: none !important; }

/* ====== Hero ====== */
.cc-ev-hero {
    background: radial-gradient(120% 90% at 85% 0%, #2f4a2a 0%, #1a1a1a 55%), #1a1a1a;
    color: #fff;
    padding: 4rem 1.5rem 4.5rem;
    width: 100vw; position: relative; left: 50%; right: 50%; margin: 0 -50vw 0 -50vw;
}
.cc-ev-hero__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.cc-ev-hero__inner--solo { grid-template-columns: 1fr; }
.cc-ev-hero__eyebrow {
    display: inline-block; background: rgba(125,200,80,.15); color: #7dc850; padding: .35rem .85rem;
    border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem;
}
.cc-ev-hero__title { color: #fff; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.05; margin: 0 0 .75rem; }
.cc-ev-hero__lead { color: #cfd2d0; font-size: 1.1rem; line-height: 1.55; margin: 0 0 2rem; max-width: 34rem; }
.cc-ev-hero__next { border-left: 3px solid #7dc850; padding: .25rem 0 .25rem 1.25rem; }
.cc-ev-hero__role { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #ffd400; margin-bottom: .4rem; }
.cc-ev-hero__next-title { color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; margin: 0 0 .35rem; }
.cc-ev-hero__next-meta { color: #7dc850; font-weight: 600; margin: 0 0 .75rem; }
.cc-ev-hero__next-copy { color: #d8dad8; line-height: 1.55; margin: 0 0 1.4rem; max-width: 36rem; }
.cc-ev-hero__cta {
    display: inline-block; background: #ffd400; color: #111; padding: .85rem 1.6rem; border-radius: 999px;
    font-weight: 700; text-decoration: none; transition: transform .15s ease, background .15s ease;
}
.cc-ev-hero__cta:hover { background: #ffe14d; color: #111; transform: translateY(-1px); }
.cc-ev-hero__media { border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.cc-ev-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-ev-hero__media--logo { display: flex; align-items: center; justify-content: center; background: #fff; padding: 2.5rem; }
.cc-ev-hero__media--logo img { object-fit: contain; }
.cc-ev-hero__media--name { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #58c558, #2f7d3a); }
.cc-ev-hero__media--name span { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; text-align: center; padding: 1rem; }

/* ====== Body + filters ====== */
.cc-ev-body { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.5rem 1rem; }
.cc-ev-filters {
    display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; padding: 1rem 1.25rem; margin: 0 0 2.5rem;
    background: #f8f9fa; border: 1px solid #e6e8e6; border-radius: 14px;
}
.cc-ev-filters__group { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.cc-ev-filters__label { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b6f6b; margin-right: .25rem; }
.cc-ev-chip {
    appearance: none; border: 1px solid #d5d9d5; background: #fff; color: #2c3e50; border-radius: 999px;
    padding: .45rem .95rem; font-size: .92rem; font-weight: 600; cursor: pointer; line-height: 1.2;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.cc-ev-chip:hover { border-color: #58c558; color: #1e6b28; background: #fff; }
.cc-ev-chip.is-active { background: #58c558; border-color: #58c558; color: #fff; }
.cc-ev-chip:focus-visible { outline: 3px solid #ffd400; outline-offset: 2px; }
.cc-ev-chip__count { display: inline-block; margin-left: .3rem; font-size: .78rem; opacity: .8; }

/* ====== Sections + grid ====== */
.cc-ev-section { margin: 0 0 3rem; }
.cc-ev-section[hidden], .cc-ev-card[hidden], .cc-ev-empty[hidden] { display: none !important; }
.cc-ev-section__title { font-size: clamp(1.5rem, 2.4vw, 2rem); color: #1a1a1a; margin: 0 0 1.25rem; }
/* Flex, not grid: the count changes with every filter, so a short last row is
   centered instead of hanging off the left edge. */
.cc-ev-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.cc-ev-grid > .cc-ev-card { flex: 0 1 calc((100% - 3rem) / 3); }
@media (max-width: 1000px) { .cc-ev-grid > .cc-ev-card { flex-basis: calc((100% - 1.5rem) / 2); } }
@media (max-width: 640px) { .cc-ev-grid > .cc-ev-card { flex-basis: 100%; } }

/* ====== Card ====== */
.cc-ev-card { background: #fff; border: 1px solid #e6e8e6; border-radius: 14px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.cc-ev-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.10); }
.cc-ev-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.cc-ev-card__link:hover { color: inherit; }
.cc-ev-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: #1a1a1a; }
.cc-ev-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-ev-card__media--logo { display: flex; align-items: center; justify-content: center; background: #f3f5f3; padding: 1.5rem 2rem; }
.cc-ev-card__media--logo img { object-fit: contain; }
.cc-ev-card__media--name { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #58c558, #2f7d3a); }
.cc-ev-card__media--name span { color: #fff; font-size: 1.5rem; font-weight: 800; text-align: center; padding: 1rem; line-height: 1.15; }
.cc-ev-card.is-past .cc-ev-card__media--name { background: linear-gradient(135deg, #3a3f3a, #1f231f); }
.cc-ev-card__body { display: flex; gap: 1rem; padding: 1.25rem 1.25rem 1.4rem; flex: 1; }
.cc-ev-card__date {
    flex: 0 0 auto; width: 3.4rem; text-align: center; border-radius: 10px; overflow: hidden; align-self: flex-start;
    border: 1px solid #e0e3e0; background: #fff;
}
.cc-ev-card__month { display: block; background: #58c558; color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .2rem 0; }
.cc-ev-card.is-past .cc-ev-card__month { background: #6b6f6b; }
.cc-ev-card__day { display: block; font-size: 1.35rem; font-weight: 800; color: #1a1a1a; padding: .25rem 0 .3rem; }
.cc-ev-card__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cc-ev-card__role {
    align-self: flex-start; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    background: #fff4b8; color: #6a5600; border-radius: 999px; padding: .2rem .6rem; margin-bottom: .5rem;
}
.cc-ev-card__title { font-size: 1.15rem; line-height: 1.25; color: #1a1a1a; margin: 0 0 .35rem; }
.cc-ev-card__meta { font-size: .9rem; color: #5b605b; margin: 0 0 .65rem; }
.cc-ev-card__dot { margin: 0 .35rem; }
.cc-ev-card__copy { font-size: .95rem; line-height: 1.5; color: #3d423d; margin: 0 0 1rem; }
.cc-ev-card__cta { margin-top: auto; font-weight: 700; color: #2f7d3a; font-size: .95rem; }
.cc-ev-card:hover .cc-ev-card__cta { color: #1e5c27; }
.cc-ev-empty { text-align: center; color: #5b605b; font-size: 1.05rem; padding: 2rem 0 3rem; }

/* ====== Bottom band ====== */
.cc-ev-band {
    background: #58c558; color: #102010; padding: 3rem 1.5rem; margin-top: 1rem;
    width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw;
}
.cc-ev-band__inner { max-width: 820px; margin: 0 auto; text-align: center; }
.cc-ev-band__title { color: #102010; font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0 0 .5rem; }
.cc-ev-band__text { font-size: 1.05rem; margin: 0 0 1.25rem; }
.cc-ev-band__cta { display: inline-block; background: #1a1a1a; color: #fff; padding: .85rem 1.6rem; border-radius: 999px; font-weight: 700; text-decoration: none; }
.cc-ev-band__cta:hover { background: #000; color: #fff; }

@media (max-width: 900px) {
    .cc-ev-hero { padding: 3rem 1rem 3.5rem; }
    .cc-ev-hero__inner { grid-template-columns: 1fr; gap: 2rem; }
    .cc-ev-body { padding: 2rem 1rem 1rem; }
    .cc-ev-filters { gap: .85rem; }
}

/* ====== Single event page ====== */
.cc-ev-hero--single { padding-top: 2.5rem; }
.cc-ev-hero__back { display: inline-block; color: #cfd2d0; text-decoration: none; font-weight: 600; font-size: .92rem; margin-bottom: 1.25rem; }
.cc-ev-hero__back:hover { color: #fff; }
.cc-ev-hero__tags { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.cc-ev-hero__tags .cc-ev-hero__eyebrow, .cc-ev-hero__tags .cc-ev-hero__role { margin-bottom: 0; }
.cc-ev-hero--single .cc-ev-hero__role { background: rgba(255,212,0,.14); padding: .35rem .85rem; border-radius: 999px; }
.cc-ev-hero__kicker { color: #7dc850; font-weight: 700; margin: 0 0 .4rem; }
.cc-ev-hero__title--long { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.15; }
.cc-ev-hero--single .cc-ev-hero__next-meta { font-size: 1.05rem; }
.cc-ev-hero--single .cc-ev-hero__lead { margin-bottom: 1.75rem; }

.cc-ev-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; align-items: start; margin: 0 0 3.5rem; }
.cc-ev-detail--solo { grid-template-columns: minmax(0, 560px); justify-content: center; }
.cc-ev-detail__content { font-size: 1.05rem; line-height: 1.7; color: #2f342f; margin-bottom: 2rem; }
.cc-ev-detail__content > :last-child { margin-bottom: 0; }
.cc-ev-detail__content h2 { font-size: 1.45rem; color: #1a1a1a; margin: 2rem 0 .75rem; }
.cc-ev-detail__content h3 { font-size: 1.15rem; color: #1a1a1a; margin: 1.5rem 0 .4rem; }
.cc-ev-detail__content > :first-child { margin-top: 0; }
.cc-ev-speakers { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.cc-ev-speakers__item { background: #f8f9fa; border: 1px solid #e6e8e6; border-radius: 12px; padding: .9rem 1.1rem; }
.cc-ev-speakers__name { display: block; font-weight: 700; color: #1a1a1a; }
.cc-ev-speakers__title { display: block; font-size: .92rem; color: #5b605b; margin-top: .15rem; }

.cc-ev-facts { background: #f8f9fa; border: 1px solid #e6e8e6; border-radius: 14px; padding: 1.5rem; position: sticky; top: 7rem; }
.cc-ev-facts dl { margin: 0 0 1.25rem; }
.cc-ev-facts__row { padding: .85rem 0; border-bottom: 1px solid #e6e8e6; }
.cc-ev-facts__row:first-child { padding-top: 0; }
.cc-ev-facts__row:last-child { border-bottom: 0; }
.cc-ev-facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b6f6b; margin-bottom: .25rem; }
.cc-ev-facts dd { margin: 0; color: #1a1a1a; line-height: 1.5; }
.cc-ev-facts dd a { color: #2f7d3a; font-weight: 600; }
.cc-ev-facts__cta { display: block; text-align: center; background: #58c558; color: #fff; padding: .85rem 1rem; border-radius: 999px; font-weight: 700; text-decoration: none; }
.cc-ev-facts__cta:hover { background: #2f7d3a; color: #fff; }

.cc-ev-more__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.cc-ev-more__all { font-weight: 700; color: #2f7d3a; text-decoration: none; }

@media (max-width: 900px) {
    .cc-ev-detail { grid-template-columns: 1fr; gap: 2rem; }
    .cc-ev-facts { position: static; }
}
