/* ==========================================================================
   homepage.css - front page (hero, intro text, three link cards)
   Depends on colors.css (load it first). No hardcoded colors in this file.
   Same look as the Association page: pill labels, red accent bars,
   14px cards, soft bands that fade into the page instead of hard edges.
   ========================================================================== */

/* ========== Hero ========== */
.home .entry-content > .wp-block-cover:first-child {
    min-height: clamp(360px, 56vh, 560px) !important;
    /* same left inset as the Association hero - keep these two in sync */
    padding-inline: clamp(20px, 8vw, 96px) !important;
}

/* drop the block's own "margin-left: 10%" and centring so the text starts
   exactly at the padding above */
.home .entry-content > .wp-block-cover:first-child .wp-block-cover__inner-container {
    max-width: 640px;
    margin: 0 !important;
}

.home .entry-content > .wp-block-cover:first-child .wp-block-cover__inner-container > * {
    max-width: none;
    margin-left: 0 !important;
}

/* soft dark fade from the left so the white heading stays readable */
.home .wp-block-cover .wp-block-cover__background {
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--color-text-primary) 62%, transparent) 0%,
        color-mix(in srgb, var(--color-text-primary) 25%, transparent) 60%,
        transparent 100%
    ) !important;
    opacity: 1 !important;
}

/* bottom of the photo melts into the page so the hero flows into the intro */
.home .entry-content > .wp-block-cover:first-child::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(48px, 9vh, 96px);
    background: linear-gradient(180deg, transparent, var(--color-background));
    pointer-events: none;
    z-index: 1;
}

.home .entry-content > .wp-block-cover:first-child .wp-block-cover__inner-container {
    z-index: 2;
}

.home .wp-block-cover h1 {
    margin-bottom: 12px !important;
    color: var(--color-white);
    font-size: clamp(2.2rem, 6.5vw, 3.4rem) !important;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.01em;
}

/* "D.R.V. Hippocampus - Since 1965" as a small pill label */
.home .wp-block-cover p.hero-title {
    display: inline-block;
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    padding: 4px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-white) 18%, transparent);
    color: var(--color-white);
    font-size: 0.78rem !important;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* hero buttons: same pills as the Association page */
.home .wp-block-cover .wp-block-buttons {
    flex-wrap: nowrap !important;
    gap: 12px;
    margin-bottom: clamp(48px, 8vh, 88px) !important;   /* clears the bottom fade */
}

.home .wp-block-cover .wp-block-button {
    width: auto !important;
}

.home .wp-block-cover .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    border-radius: 999px !important;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease,
                border-color 0.15s ease, transform 0.15s ease;
}

/* "Become a member" - filled */
.home .wp-block-cover .wp-block-button.is-style-fill .wp-block-button__link {
    background-color: var(--color-primary) !important;
    color: var(--color-on-primary) !important;
    border: 2px solid var(--color-primary);
}

.home .wp-block-cover .wp-block-button.is-style-fill .wp-block-button__link:hover {
    background-color: var(--color-primary-hover) !important;
    border-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

/* "View lessons" - see-through outline on the photo */
.home .wp-block-cover .wp-block-button:not(.is-style-fill) .wp-block-button__link {
    background-color: transparent !important;
    color: var(--color-white) !important;
    border: 2px solid color-mix(in srgb, var(--color-white) 70%, transparent);
}

.home .wp-block-cover .wp-block-button:not(.is-style-fill) .wp-block-button__link:hover {
    background-color: color-mix(in srgb, var(--color-white) 15%, transparent) !important;
    border-color: var(--color-white);
}

/* ========== Welcome ==========
   Styled with the shared section rules further down (.hp-section, .hp-welcome).
   Sits right under the hero fade, so it needs less top padding. */

/* ========== Card band ========== */
/* soft band behind the cards that fades in and out (like "What we do") */
.home .entry-content > .wp-block-group:has(.hp-card) {
    margin-top: clamp(20px, 4vw, 36px) !important;
    padding: clamp(28px, 5vw, 48px) 0 !important;
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--color-surface-secondary) 22%,
        var(--color-surface-secondary) 78%,
        transparent 100%
    );
}

/* "What we do" header above the cards, centred like the other sections */
.home .entry-content > .wp-block-group:has(.hp-card) .hp-eyebrow {
    margin-left: auto !important;
    margin-right: auto !important;
}

.home .entry-content > .wp-block-group:has(.hp-card) .hp-section-lead {
    padding-inline: clamp(16px, 5vw, 48px);
    box-sizing: border-box;
}

/* GeneratePress adds 40px padding inside groups; the band handles spacing */
.home .entry-content > .wp-block-group:has(.hp-card) > .wp-block-group__inner-container {
    padding: 0 !important;
}

.home .wp-block-columns:has(.hp-card) {
    max-width: 1100px;
    margin: 0 auto clamp(24px, 4vw, 40px) !important;
    padding-inline: clamp(16px, 5vw, 48px);
    box-sizing: border-box;
    gap: clamp(14px, 2.5vw, 22px) !important;
}

/* ========== Card ========== */
/* fixed height: image on top (45%), text below */
.hp-card > .wp-block-group {
    position: relative;                      /* anchor for the stretched link */
    display: grid !important;
    grid-template-rows: 45% minmax(0, 1fr);
    gap: 0 !important;
    height: 420px;
    overflow: hidden;

    background: var(--color-surface) !important;
    border: 1px solid var(--color-border);
    border-radius: 14px !important;
    box-shadow: var(--shadow-card) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* red accent line that fades in on hover (same as board cards) */
.hp-card > .wp-block-group::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

@media (hover: hover) {
    .hp-card > .wp-block-group:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-card-hover) !important;
    }

    .hp-card > .wp-block-group:hover::after {
        opacity: 0.6;
    }

    .hp-card > .wp-block-group:hover .wp-block-image img {
        transform: scale(1.04);
    }
}

/* keyboard users get the same lift */
.hp-card > .wp-block-group:focus-within {
    box-shadow: var(--shadow-card-hover) !important;
    border-color: var(--color-primary-border);
}

/* ---- Top half: image ---- */
.hp-card > .wp-block-group > .wp-block-image {
    position: relative;
    min-height: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    overflow: hidden;
    background: linear-gradient(145deg, var(--color-avatar-bg-start), var(--color-avatar-bg-end));
}

.hp-card > .wp-block-group > .wp-block-image img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* ---- Bottom half: text, as a column so the arrow sits at the bottom ---- */
.hp-card > .wp-block-group > .wp-block-group {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap !important;            /* WP's flex layout sets wrap, which pushes the
                                                arrow into a 2nd column when text is long */
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
    padding: 20px 22px 20px;
    overflow: auto;
    gap: 0;
}

/* title with the short red bar above it (same as the "What we do" cards) */
.hp-card h3 {
    margin: 0 0 8px !important;
    color: var(--color-text-primary);
    font-size: clamp(1.15rem, 2.2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.25;
}

.hp-card h3::before {
    content: '';
    display: block;
    width: 28px;
    height: 3px;
    margin-bottom: 12px;
    border-radius: 3px;
    background: var(--color-primary);
    opacity: 0.75;
}

/* the old "—" dash is replaced by the bar above */
.hp-card h3 > span {
    display: none;
}

.hp-card p:not(.card-link) {
    margin: 0 !important;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ========== Arrow link ========== */
.hp-card .card-link {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding-top: 12px;
}

/* round soft button that fills when the card is hovered */
.card-link a {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--color-primary-border);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.card-link a span {
    display: block;
    line-height: 1;
    transition: transform 0.2s ease;
}

/* make the whole card clickable via the arrow link */
.hp-card .card-link a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hp-card > .wp-block-group:hover .card-link a,
.card-link a:focus-visible {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-on-primary);
}

.hp-card > .wp-block-group:hover .card-link a span {
    transform: translateX(3px);
}

.card-link a:focus-visible {
    outline: 3px solid var(--color-primary-border);
    outline-offset: 2px;
}

/* ========== Responsive ========== */
/* WP stacks the columns below 782px; let cards size to content there */
@media (max-width: 781px) {
    .hp-card > .wp-block-group {
        grid-template-rows: 200px auto;
        height: auto;
    }

    .hp-card > .wp-block-group > .wp-block-group {
        overflow: visible;
    }
}

/* phones: keep the hero buttons side by side (same as the Association page),
   just a little more compact so both fit */
@media (max-width: 480px) {
    .home .wp-block-cover .wp-block-buttons {
        gap: 10px;
    }

    .home .wp-block-cover .wp-block-button__link {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

/* very narrow phones (320px): a bit tighter still so both buttons fit */
@media (max-width: 360px) {
    .home .wp-block-cover .wp-block-buttons {
        gap: 8px;
    }

    .home .wp-block-cover .wp-block-button__link {
        padding: 9px 12px !important;
        font-size: 0.8rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-card > .wp-block-group,
    .hp-card > .wp-block-group .wp-block-image img,
    .card-link a,
    .card-link a span,
    .home .wp-block-cover .wp-block-button__link {
        transition: none;
    }
}

/* ==========================================================================
   Extra homepage sections
   (stats, stable split, activities, quote, join steps, FAQ, closing CTA)
   Same tokens and visual language as above: pill labels, red bars, 14px cards.
   ========================================================================== */

/* ========== Shared section shell ========== */
.home .entry-content > .hp-section {
    margin: 0 !important;
    padding: clamp(40px, 7vw, 72px) clamp(16px, 5vw, 48px) !important;
    box-sizing: border-box;
}

/* GeneratePress inner container: the section handles spacing */
.home .entry-content > .hp-section > .wp-block-group__inner-container,
.home .entry-content > .hp-cta > .wp-block-group__inner-container {
    padding: 0 !important;
}

/* same 1100px content width as the card row */
.home .hp-section > :not(.wp-block-group__inner-container),
.home .hp-section > .wp-block-group__inner-container > * {
    max-width: 1100px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* soft band that fades in and out, same as the card band */
.home .entry-content > .hp-band {
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--color-surface-secondary) 22%,
        var(--color-surface-secondary) 78%,
        transparent 100%
    );
}

/* ---- Section header: pill label, red bar, title, lead ---- */
.home p.hp-eyebrow,
.home .hp-section p.hp-eyebrow {
    width: fit-content;
    margin-top: 0 !important;
    margin-bottom: 14px !important;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--color-primary-border);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home .hp-section-title {
    margin: 0 0 12px !important;
    color: var(--color-text-primary);
    font-size: clamp(1.6rem, 3.6vw, 2.1rem);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

/* short red bar above the title (same as the intro) */
.home .hp-section-title::before {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    margin: 0 auto 16px;
    border-radius: 3px;
    background: var(--color-primary);
}

/* the pill already marks the start, so no bar right under it */
.home .hp-eyebrow + .hp-section-title::before {
    display: none;
}

.home p.hp-section-lead,
.home .hp-section p.hp-section-lead {
    max-width: 620px !important;
    margin: 0 auto clamp(24px, 4vw, 36px) !important;
    color: var(--color-text-secondary);
    font-size: clamp(1rem, 1.9vw, 1.08rem);
    line-height: 1.75;
    text-align: center;
}

/* ---- Buttons outside the hero: same pills ---- */
.home .hp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(20px, 3vw, 28px) !important;
}

.home .hp-actions-center {
    justify-content: center;
}

.home .hp-actions .wp-block-button {
    width: auto !important;
}

.home .hp-actions .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    border-radius: 999px !important;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease,
                border-color 0.15s ease, transform 0.15s ease;
}

.home .hp-actions .wp-block-button.is-style-fill .wp-block-button__link {
    background-color: var(--color-primary) !important;
    color: var(--color-on-primary) !important;
    border: 2px solid var(--color-primary);
}

.home .hp-actions .wp-block-button.is-style-fill .wp-block-button__link:hover {
    background-color: var(--color-primary-hover) !important;
    border-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

/* outline version for light backgrounds */
.home .hp-actions .wp-block-button:not(.is-style-fill) .wp-block-button__link {
    background-color: transparent !important;
    color: var(--color-primary) !important;
    border: 2px solid var(--color-primary-border);
}

.home .hp-actions .wp-block-button:not(.is-style-fill) .wp-block-button__link:hover {
    background-color: var(--color-primary-soft) !important;
    border-color: var(--color-primary);
}

/* shared h3 inside the new sections (matches the card titles) */
.home .hp-section h3 {
    margin: 0 0 8px !important;
    color: var(--color-text-primary);
    font-size: clamp(1.1rem, 2.1vw, 1.22rem);
    font-weight: 600;
    line-height: 1.3;
}

.home .hp-section p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ========== Welcome + stats strip ========== */
.home .entry-content > .hp-welcome {
    padding-top: clamp(8px, 2vw, 16px) !important;
    padding-bottom: clamp(24px, 4vw, 40px) !important;
}

.home .hp-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 !important;
    margin-bottom: 0 !important;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.home .hp-stat {
    padding: clamp(18px, 3vw, 28px) 16px;
    text-align: center;
}

.home .hp-stat + .hp-stat {
    border-left: 1px solid var(--color-border);
}

.home .hp-section p.hp-stat-number {
    margin: 0 0 4px !important;
    color: var(--color-primary);
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    font-weight: 600;
    line-height: 1.1;
}

.home .hp-section p.hp-stat-label {
    margin: 0 !important;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ========== Stable / lessons split ========== */
.home .hp-split-cols {
    align-items: center !important;
    gap: clamp(24px, 5vw, 56px) !important;
    margin-bottom: 0 !important;
}

.home .hp-split-image {
    position: relative;
    margin: 0 !important;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    background: linear-gradient(145deg, var(--color-avatar-bg-start), var(--color-avatar-bg-end));
}

.home .hp-split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* text column is left aligned */
.home .hp-split .hp-eyebrow {
    margin-left: 0 !important;
}

.home .hp-split .hp-section-title,
.home .hp-split .hp-section-lead {
    text-align: left;
}

.home .hp-split .hp-section-lead {
    margin-left: 0 !important;
    margin-bottom: 20px !important;
}

.home .hp-checklist {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    display: grid;
    gap: 12px;
}

.home .hp-checklist li {
    position: relative;
    margin: 0;
    padding-left: 34px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.home .hp-checklist li strong {
    display: block;
    color: var(--color-text-primary);
    font-weight: 600;
}

/* small round check, same family as the arrow buttons */
.home .hp-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 1px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--color-primary-border);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.home .hp-split .hp-actions {
    justify-content: flex-start;
}

/* ========== Upcoming activities ==========
   Used by the static cards on the homepage AND by the Events Manager grid
   template (.em-item.hp-event), so these rules are not scoped to .home. */
.home .hp-events-grid {
    gap: clamp(14px, 2.5vw, 22px) !important;
    margin-bottom: 0 !important;
}

.hp-event {
    position: relative;
    display: flex !important;
    flex-direction: column;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 0 !important;
    height: 100%;
    box-sizing: border-box;
    padding: 22px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.hp-event p.hp-event-date {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0 0 16px !important;
    border-radius: 12px;
    border: 1.5px solid var(--color-primary-border);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hp-event-date strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
}

.hp-event p.hp-event-meta {
    margin: 0 0 10px !important;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hp-event p:last-child {
    margin: 0 !important;
}

/* shared text styles, so the cards also look right outside .hp-section */
.hp-event h3 {
    margin: 0 0 8px !important;
    color: var(--color-text-primary);
    font-size: clamp(1.1rem, 2.1vw, 1.22rem);
    font-weight: 600;
    line-height: 1.3;
}

.hp-event p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ---- Events Manager grid (template uses the same hp-event card) ----
   !important is needed to beat Events Manager's own .em.pixelbones styles */
.em .em-item.hp-event,
.em-item.hp-event {
    overflow: hidden;
    padding: 22px !important;
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--shadow-card) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.em .em-item.hp-event h3.em-item-title {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: clamp(1.1rem, 2.1vw, 1.22rem) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* title link: plain text, but stretched so the whole card is clickable */
.hp-event .em-item-title a {
    color: var(--color-text-primary) !important;
    text-decoration: none !important;
}

.hp-event .em-item-title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.em .em-item.hp-event p {
    margin: 0;
    color: var(--color-text-secondary) !important;
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
}

.em .em-item.hp-event p.hp-event-date {
    margin: 0 0 16px !important;
    color: var(--color-primary) !important;
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
}

.em .em-item.hp-event p.hp-event-meta {
    margin: 0 0 10px !important;
    font-size: 0.78rem !important;
}

/* same lift and red accent line as the homepage link cards */
.em-item.hp-event::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

@media (hover: hover) {
    .em-item.hp-event:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-card-hover) !important;
    }

    .em-item.hp-event:hover::after {
        opacity: 0.6;
    }
}

.em-item.hp-event:focus-within {
    border-color: var(--color-primary-border) !important;
    box-shadow: var(--shadow-card-hover) !important;
}

.hp-event .em-item-title a:focus-visible {
    outline: 3px solid var(--color-primary-border);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Events Manager "events" widget block: it stacks items in a column and lays
   each item out as a row. Turn the list into the same 3-column card grid as
   the homepage blocks, and each item back into a vertical card. */
.em.em-list-widget:has(.hp-event) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2.5vw, 22px) !important;
    max-width: 1100px;
    margin-left: auto !important;
    margin-right: auto !important;
}

.em.em-list-widget .em-item.hp-event {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
    gap: 0 !important;
    width: auto;
    height: 100%;
    box-sizing: border-box;
    margin: 0 !important;
}

/* Events Manager makes <strong> extra bold; match the block badge */
.em .em-item.hp-event .hp-event-date strong {
    font-weight: 600 !important;
}

/* the block's own "Events" heading: the section already has a title */
.hp-events .wp-block-events-manager__title {
    display: none;
}

/* #_EVENTEXCERPT brings its own <p>, so it sits in a div */
.hp-event .hp-event-excerpt {
    width: 100%;
}

.em .em-item.hp-event .hp-event-excerpt p {
    margin: 0 0 8px !important;
}

.em .em-item.hp-event .hp-event-excerpt p:last-child,
.hp-event p:empty {
    margin: 0 !important;
}

.hp-event p:empty {
    display: none;
}

/* spacing between the grid cards */
.em.em-events-list-grid,
.em-events-list-grid {
    gap: clamp(14px, 2.5vw, 22px) !important;
}

/* ========== Member quote ========== */
.home .hp-testimonial .hp-eyebrow {
    margin-bottom: 22px !important;
}

.home .hp-quote {
    max-width: 720px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none;
    text-align: center;
    font-style: normal;
}

.home .hp-quote::before {
    content: '\201C';
    display: block;
    margin-bottom: -8px;
    color: var(--color-primary);
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0.35;
}

.home .hp-section .hp-quote p {
    margin: 0 0 18px !important;
    color: var(--color-text-primary);
    font-size: clamp(1.1rem, 2.4vw, 1.35rem);
    font-style: normal;
    line-height: 1.6;
}

.home .hp-quote cite {
    display: inline-block;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home .hp-quote cite::before {
    content: '';
    display: block;
    width: 28px;
    height: 3px;
    margin: 0 auto 12px;
    border-radius: 3px;
    background: var(--color-primary);
    opacity: 0.75;
}

/* ========== Join in three steps ========== */
.home .hp-steps-grid {
    gap: clamp(20px, 3vw, 32px) !important;
    margin-bottom: 0 !important;
}

.home .hp-step {
    position: relative;
}

.home .hp-section p.hp-step-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 0 16px !important;
    border-radius: 50%;
    border: 1.5px solid var(--color-primary-border);
    background: var(--color-surface);
    color: var(--color-primary);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: var(--shadow-card);
}

/* thin dashed line linking the step circles */
.home .hp-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    left: 60px;
    right: -8px;
    border-top: 2px dashed var(--color-primary-border);
    pointer-events: none;
}

.home .hp-step p:last-child {
    margin: 0 !important;
}

/* ========== FAQ ========== */
.home .hp-faq .hp-section-title {
    margin-bottom: clamp(22px, 4vw, 32px) !important;
}

.home .hp-faq-item {
    max-width: 760px !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.home .hp-faq-item[open] {
    border-color: var(--color-primary-border);
    box-shadow: var(--shadow-card);
}

.home .hp-faq-item summary {
    position: relative;
    padding: 16px 56px 16px 20px;
    color: var(--color-text-primary);
    font-weight: 600;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}

.home .hp-faq-item summary::-webkit-details-marker {
    display: none;
}

/* "+" in a soft circle that turns into "×" when open */
.home .hp-faq-item summary::after {
    content: '+';
    position: absolute;
    top: 50%;
    right: 16px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-top: -14px;
    border-radius: 50%;
    border: 1.5px solid var(--color-primary-border);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.home .hp-faq-item[open] summary::after {
    transform: rotate(45deg);
}

.home .hp-faq-item summary:focus-visible {
    outline: 3px solid var(--color-primary-border);
    outline-offset: 2px;
    border-radius: 14px;
}

.home .hp-section .hp-faq-item p {
    margin: 0 !important;
    padding: 0 20px 18px;
}

/* ========== Closing call to action ========== */
.home .entry-content > .hp-cta {
    width: min(1100px, calc(100% - 2 * clamp(16px, 5vw, 48px)));
    margin: clamp(16px, 3vw, 24px) auto clamp(48px, 8vw, 88px) !important;
    padding: clamp(32px, 6vw, 56px) clamp(20px, 5vw, 48px) !important;
    box-sizing: border-box;
    text-align: center;
    background: linear-gradient(145deg, var(--color-primary-soft), var(--color-surface));
    border: 1px solid var(--color-primary-border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.home .hp-cta .hp-section-lead {
    margin-bottom: 0 !important;
}

/* ========== Responsive (new sections) ========== */
@media (max-width: 781px) {
    .home .hp-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home .hp-stat:nth-child(odd) {
        border-left: 0 !important;
    }

    .home .hp-stat:nth-child(n + 3) {
        border-top: 1px solid var(--color-border);
    }

    .home .hp-step:not(:last-child)::after {
        display: none;
    }

    .hp-event {
        height: auto;
    }

    .em.em-list-widget:has(.hp-event) {
        grid-template-columns: minmax(0, 1fr);
    }

    .em.em-list-widget .em-item.hp-event {
        height: auto;
    }
}

@media (max-width: 480px) {
    .home .hp-actions {
        gap: 10px;
    }

    .home .hp-actions .wp-block-button__link {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home .hp-actions .wp-block-button__link,
    .home .hp-faq-item,
    .home .hp-faq-item summary::after,
    .em-item.hp-event,
    .em-item.hp-event::after {
        transition: none;
    }
}