/* ── News & Events (index) ──────────────────────────────────────────────────
   Two soft cards side by side: Newsletters (blue) and Event of the Day (warm).
   Each card is a copy column plus an illustration column; below 640px the art
   drops under the copy. Sizes ride the tokens in 16-typography.css. */

/* Extra room under the cards so they don't crowd the wave that opens the
   Animation Studio section below. */
#news-events-section {
    padding-bottom: 3.5rem;
}

@media (min-width: 640px) {
    #news-events-section {
        padding-bottom: 5rem;
    }
}

.ne-lead {
    font-size: var(--fs-lead);
    line-height: var(--lh-body);
}

.ne-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 20px 50px -28px rgba(15, 40, 90, 0.28);
}

.ne-card--news {
    background:
        radial-gradient(120% 90% at 100% 100%, #D6E8FB 0%, rgba(214, 232, 251, 0) 60%),
        linear-gradient(135deg, #F7FAFF 0%, #EEF5FE 100%);
}

.ne-card--event {
    background:
        radial-gradient(110% 90% at 100% 100%, #FDE6C8 0%, rgba(253, 230, 200, 0) 60%),
        linear-gradient(135deg, #FFFBF6 0%, #FDF3E8 100%);
}

@media (min-width: 640px) {
    .ne-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 340px;
        padding: 2rem 1.5rem 2.75rem 2rem;
    }
}

.ne-card__copy {
    position: relative;
    z-index: 2;
    flex: 1 1 56%;
    min-width: 0;
}

.ne-card__art {
    position: relative;
    z-index: 1;
    flex: 0 1 44%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding-bottom: 1rem;
}

.ne-card__head {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.ne-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    color: #fff;
}

.ne-icon--blue {
    background: linear-gradient(145deg, #3D8BFF, #1F66E5);
    box-shadow: 0 12px 24px -10px rgba(31, 102, 229, 0.6);
}

.ne-icon--red {
    background: linear-gradient(145deg, #FF6B6B, #E2474B);
    box-shadow: 0 12px 24px -10px rgba(226, 71, 75, 0.6);
}

.ne-eyebrow {
    display: block;
    margin-top: 0.15rem;
    /* Same metrics as the hero eyebrow pills (.page-hero-badge, .eyebrow). */
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-eyebrow);
    text-transform: uppercase;
}

.ne-card__title {
    margin-top: 0.35rem;
    font-size: var(--fs-h3);
    font-weight: 600;
    color: #1B1464;
    white-space: nowrap;
}

.ne-card__text {
    max-width: 30ch;
    margin-bottom: 1.5rem;
    font-size: var(--fs-body);
    line-height: 1.85;
    color: #5B6B85;
}

.ne-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    padding: 0.7rem 1.5rem;
    /* Same face, size and weight as every other pill CTA (.site-btn). */
    font-size: var(--fs-btn);
    font-weight: var(--fw-semibold);
    color: #fff;
    transition: gap 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.ne-btn:hover {
    gap: 0.75rem;
    transform: translateY(-2px);
}

.ne-btn--blue {
    background-color: #1E5CA3;
    box-shadow: 0 12px 24px -10px rgba(30, 92, 163, 0.55);
}

.ne-btn--blue:hover {
    background-color: #14488C;
}

.ne-btn--red {
    background: linear-gradient(to right, #F2545B, #F36B5E);
    box-shadow: 0 12px 24px -10px rgba(226, 71, 75, 0.6);
}

/* Corner foliage */
.ne-leaf {
    position: absolute;
    bottom: -8px;
    z-index: 1;
    width: 52px;
    pointer-events: none;
}

.ne-leaf--left { left: 0; }
.ne-leaf--right { right: 4px; }

/* ── Newsletter mock-up ─────────────────────────────────────────────────── */
.ne-paper-stack {
    position: relative;
    width: min(230px, 70%);
    aspect-ratio: 0.8;
    margin-top: 1.5rem;
}

@media (min-width: 640px) {
    .ne-deck { width: min(220px, 64%); }
}

.ne-paper {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 36px -18px rgba(15, 40, 90, 0.35);
}

.ne-paper--back {
    transform: rotate(9deg) translate(10px, 6px);
    background: #F3F7FD;
}

.ne-paper--front {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem 1rem 1.1rem;
    transform: rotate(4deg);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ne-card--news:hover .ne-paper--front {
    transform: rotate(1deg) translateY(-4px);
}

.ne-paper__brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.ne-paper__logo {
    font-family: 'Courgette', 'Brush Script MT', cursive;
    font-size: 22px;
    font-style: italic;
    font-weight: 700;
    color: #D7262E;
}

.ne-paper__sub {
    margin-top: 2px;
    font-size: 8px;
    color: #1B1464;
}

.ne-paper__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.ne-paper__title {
    font-size: 15px;
    font-weight: 700;
    color: #1B1464;
}

.ne-paper__date {
    font-size: 7.5px;
    color: #5B6B85;
    white-space: nowrap;
}

.ne-paper__photo {
    width: 100%;
    aspect-ratio: 1.75;
    object-fit: cover;
    border-radius: 6px;
}

.ne-paper__line {
    display: block;
    height: 6px;
    border-radius: 9999px;
    background: #E3ECF8;
}

.ne-paper__line--accent {
    width: 55%;
    background: #A9CBF5;
}

.ne-paper__line--short { width: 70%; }

.ne-plane {
    position: absolute;
    top: -30px;
    right: -34px;
    z-index: 2;
    width: 84px;
    animation: ne-float 4s ease-in-out infinite;
}

@keyframes ne-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ── Event poster deck ──────────────────────────────────────────────────── */
.ne-deck {
    position: relative;
    width: min(200px, 56%);
    aspect-ratio: 1000 / 1401;
}

.ne-poster {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 40px -20px rgba(70, 40, 10, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, visibility 0.4s;
}

.ne-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Before the script runs (or without it) the first poster still shows. */
.ne-poster:first-child,
.ne-poster.is-active {
    z-index: 3;
    opacity: 1;
    visibility: visible;
    transform: none;
}

.ne-deck.is-ready .ne-poster:not(.is-active) {
    opacity: 0;
    visibility: hidden;
}

.ne-deck.is-ready .ne-poster.is-next {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transform: translateX(34%) rotate(5deg) scale(0.9);
    filter: brightness(0.92);
}

.ne-deck.is-ready .ne-poster.is-prev {
    z-index: 1;
    transform: translateX(-20%) rotate(-6deg) scale(0.88);
}

.ne-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 9999px;
    background: #fff;
    color: #1E3A8A;
    box-shadow: 0 10px 22px -10px rgba(15, 40, 90, 0.45);
    transform: translateY(-50%);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ne-nav:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 14px 26px -10px rgba(15, 40, 90, 0.5);
}

.ne-nav--prev { left: 0; }
.ne-nav--next { right: 0; }

@media (prefers-reduced-motion: reduce) {
    .ne-plane { animation: none; }
    .ne-poster,
    .ne-paper--front { transition: none; }
}
