/* ==========================================================================
   Insights Index (home.php)
   ========================================================================== */

.insights-page {
    min-height: 60vh;
}

/* ── Page Header ── */

.insights-header {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 4rem 2rem 2rem;

    @media (max-width: 767px) {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.insights-header__title {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--color-dark_green);
    margin: 0;
    line-height: 1.1;
    text-align: center;
}

/* ── Featured Insight ── */

.insights-featured-wrap {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem 4rem;

    @media (max-width: 767px) {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.insights-featured {
    display: flex;
    flex-direction: column;
    border-radius: 25px;
    overflow: hidden;
    min-height: 320px;
}

@media (min-width: 900px) {
    .insights-featured {
        flex-direction: row;
        align-items: center;
        overflow: visible;
    }
}

/* Image */

.insights-featured__image-wrap {
    border-radius: 25px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--color-dark_green);
    min-height: 320px;
    overflow: hidden;
}

/* Blurred-background variant for non-wide images */

.insights-featured__image-wrap--blurred {
    position: relative;
}

.insights-featured__image-wrap--blurred::before {
    content: '';
    position: absolute;
    inset: -10%;
    background: inherit;
    filter: blur(20px);
}

.insights-featured__image-wrap--blurred::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(115, 140, 189, 0.5);
    z-index: 0;
}

.insights-featured__image-wrap--blurred .insights-featured__image {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 899px) {
    .insights-featured__image-wrap {
        border-radius: 25px 25px 0 0;
        min-height: 220px;
    }
}

@media (min-width: 900px) {
    .insights-featured__image-wrap {
        flex: 0 0 62%;
        min-height: 400px;
        position: relative;
        z-index: 1;
        border-right: 15px solid var(--color-maroon);
        border-bottom: 15px solid var(--color-maroon);
        box-sizing: border-box;
        margin-right: -8%;
    }
}

/* Overlay panel */

.insights-featured__panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12.5px);
    -webkit-backdrop-filter: blur(12.5px);
    border-radius: 25px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
}

@media (max-width: 899px) {
    .insights-featured__panel {
        border-radius: 0 0 25px 25px;
    }
}

@media (max-width: 767px) {
    .insights-featured__panel {
        padding: 1rem;
    }
}

@media (min-width: 900px) {
    .insights-featured__panel {
        flex: 0 0 46%;
        box-sizing: border-box;
        position: relative;
        z-index: 2;
        align-self: center;
    }
}

.insights-featured__date-bar {
    margin: -2rem -2rem 0;
    background-color: var(--color-blue);
    color: var(--color-dark_green);
    text-align: center;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0;
}

@media (max-width: 767px) {
    .insights-featured__date-bar {
        margin: -1rem -1rem 0;
    }
}

@media (min-width: 900px) {
    .insights-featured__date-bar {
        border-radius: 25px 25px 0 0;
    }
}

.insights-featured__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-maroon);
    margin: 0;
}

.insights-featured__title {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-dark_green);
    margin: 0;
    line-height: 1.2;
}

.insights-featured__title a {
    color: inherit;
    text-decoration: none;
}

.insights-featured__title a:hover {
    color: var(--color-blue);
}

.insights-featured__excerpt {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-dark_green);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insights-featured__panel .btn {
    align-self: flex-start;
}

/* ── Body (filters + grid) ── */

.insights-body {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem 6rem;

    @media (max-width: 767px) {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ── Filters ── */

.insights-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.insights-filters__group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.insights-filters__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-dark_green);
}

.insights-filters__select {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--color-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2313294B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    border: none;
    border-radius: 50px;
    color: var(--color-dark_green);
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.875rem 3rem 0.875rem 1.75rem;
    cursor: pointer;
    width: 300px;
}

.insights-filters__select:focus {
    outline: none;
}

.insights-filters__clear {
    font-size: 0.875rem;
    font-weight: 600;
    color: #888;
    text-decoration: none;
    padding-bottom: 0.65rem;
    transition: color 0.2s ease;
}

.insights-filters__clear:hover {
    color: var(--color-dark_green);
}

/* ── Insights Grid ── */

.insights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Insight Card ── */

.insights-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.insights-card:hover {
    transform: translateY(-3px);
}

.insights-card__image {
    display: block;
    border-radius: 25px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-tan);
    height: 300px;
    flex-shrink: 0;
}

.insights-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.insights-card__title {
    font-family: 'Work Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-dark_green);
    margin: 0;
    line-height: 1.3;

}

.insights-card__title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.insights-card__title a:hover {
    color: var(--color-maroon);
}

.insights-card__excerpt {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #555;
    margin: 0.75rem 0;
    max-height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.insights-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-dark_green);
    text-decoration: none;
    margin-top: 0.25rem;
    transition: color 0.2s ease, gap 0.2s ease;
}

.insights-card__link::after {
    content: '→';
    color: var(--color-maroon);
}

.insights-card__link:hover {
    color: var(--color-maroon);
    gap: 0.6rem;
}

/* ── Pagination ── */

.insights-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.insights-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark_green);
    text-decoration: none;
    transition: color 0.2s ease;
}

.insights-pagination .page-numbers:hover {
    color: var(--color-maroon);
}

.insights-pagination .page-numbers.current {
    color: var(--color-maroon);
    font-weight: 700;
}

.insights-pagination .page-numbers.dots {
    color: var(--color-dark_green);
}

.insights-pagination .page-numbers.next,
.insights-pagination .page-numbers.prev {
    font-size: 0;
}

.insights-pagination .page-numbers.next::after {
    content: '›';
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-dark_green);
    transition: color 0.2s ease;
}

.insights-pagination .page-numbers.prev::before {
    content: '‹';
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-dark_green);
    transition: color 0.2s ease;
}

.insights-pagination .page-numbers.next:hover::after,
.insights-pagination .page-numbers.prev:hover::before {
    color: var(--color-maroon);
}

/* ── Events Intro Block ── */

.events-intro-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.events-intro {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12.5px);
    -webkit-backdrop-filter: blur(12.5px);
    border-radius: 25px;
    padding: 2.5rem;
}

@media (min-width: 768px) {
    .events-intro {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: center;
        justify-items: center;
    }
}

.events-intro__header {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-dark_green);
    margin: 0;
    line-height: 1.2;
}

.events-intro__copy {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-copy);
}

.events-intro__copy p:first-child { margin-top: 0; }
.events-intro__copy p:last-child  { margin-bottom: 0; }

/* ── Events List ── */

.events-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .events-list {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Odd number of items: center the lone last item across both columns
       instead of leaving it stranded in the left column. */
    .events-list__item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc(50% - 0.5rem);
    }
}

.events-list__item {
    position: relative;
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
}

.events-list__item--maroon {
    background-color: var(--color-maroon);
}

/* ── Event card with image ── */

.events-list__image-wrap {
    position: relative;
    width: calc(100% + 5rem);
    margin: -2.5rem -2.5rem 1.25rem;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background-size: cover;
    background-position: center;
}

.events-list__item--first .events-list__image-wrap::before {
    content: '';
    position: absolute;
    inset: -10%;
    background: inherit;
    filter: blur(20px);
}

.events-list__item--first .events-list__image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(115, 140, 189, 0.3);
    z-index: 0;
}

.events-list__item--first .events-list__image {
    position: relative;
    z-index: 1;
}

.events-list__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.events-list__item--has-image .events-list__date-bar {
    margin-top: 0;
    border-radius: 0;
}

.events-list__item--blue {
    background-color: var(--color-dark_green);
}

.events-list__date-bar {
    margin: -2.5rem -2.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.5);
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-dark_green);
    border-radius: 20px 20px 0 0;
    width: calc(100% + 5rem);
}

.events-list__title {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: var(--color-white);
    margin: 0;
    line-height: 1.2;
}

.events-list__title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.events-list__title a:hover {
    opacity: 0.7;
}

.events-list__blurb {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-white);
    margin: 0;
}

.events-list__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.7rem 2rem;
    background-color: var(--color-white);
    border: 2px solid var(--color-white);
    border-radius: 50px;
    color: var(--color-dark_green);
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Stretch the CTA across the whole card so the entire block is clickable */
.events-list__link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.events-list__link svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.events-list__link:hover {
    background-color: transparent;
    color: var(--color-white);
}

.events-list__link:hover svg {
    transform: translateX(3px);
}

/* ── Past events ── */

.events-past {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

.events-past__heading {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--color-dark_green);
    text-align: center;
    margin: 0 0 2.5rem;
}

/* Faded by default, full color on hover */
.events-list--past .events-list__item {
    opacity: 0.5;
    transition: opacity 0.25s ease;
}

.events-list--past .events-list__item:hover {
    opacity: 1;
}

/* ── Empty state ── */

.insights-empty {
    padding: 3rem 0;
    color: #666;
    font-size: 1rem;
    text-align: center;
}