/* Home.aspx — News & Events (editorial grid, Hasset brand) */

.home-news-head {
    margin-bottom: clamp(24px, 4vw, 36px);
}

.home-news-head__pill {
    display: inline-flex;
    align-items: center;
    margin-bottom: clamp(16px, 2.5vw, 24px);
    padding: 6px 14px;
    border: 1px solid color-mix(in srgb, var(--home-gold, #D4A054) 40%, var(--home-primary));
    border-radius: 999px;
    font-family: var(--home-font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--home-primary);
    background: color-mix(in srgb, var(--home-gold, #D4A054) 14%, transparent);
}

.home-news-head__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}

.home-news-head__title {
    font-family: var(--home-serif);
    font-size: clamp(1.85rem, 3.4vw, 2.6rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--home-text);
}

.home-news-head__title::after {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    margin-top: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--home-gold, #D4A054), var(--home-gold-soft, #F5D9A8), transparent);
}

.home-news-head__title em {
    font-style: italic;
    color: color-mix(in srgb, var(--home-primary) 65%, var(--home-gold, #D4A054));
}

.home-news-head__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: transparent;
    font-family: var(--home-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--home-primary);
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.home-news-head__more:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.home-news-head__more i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.home-news-head__more[aria-expanded="true"] i {
    transform: rotate(90deg);
}

.home-news-hub {
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 4vw, 40px);
}

.home-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2.5vw, 24px);
}

.home-news-card {
    height: 100%;
}

.home-news-card.is-collapsed {
    display: none;
}

.home-news-grid.is-expanded .home-news-card.is-collapsed {
    display: block;
}

.home-news-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--home-primary) 10%, transparent);
    background: linear-gradient(165deg, #fff 0%, color-mix(in srgb, var(--home-bg-alt) 35%, #fff) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 28px rgba(74, 35, 26, 0.05);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.home-news-card__link:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--home-gold, #D4A054) 35%, var(--home-border));
    box-shadow: 0 18px 40px rgba(74, 35, 26, 0.1);
}

.home-news-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #f5ebe6 0%, #c9a08f 100%);
}

.home-news-card__media--clipart {
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-news-card__media--clipart::before,
.home-news-card__media--clipart::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.home-news-card__media--clipart::before {
    width: 72%;
    height: 72%;
    top: -18%;
    right: -14%;
    background: rgba(255, 255, 255, 0.22);
}

.home-news-card__media--clipart::after {
    width: 48%;
    height: 48%;
    bottom: -16%;
    left: -10%;
    background: rgba(255, 255, 255, 0.14);
}

.home-news-card__clipart {
    position: relative;
    z-index: 1;
    width: clamp(72px, 20vw, 96px);
    height: clamp(72px, 20vw, 96px);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2rem, 5.5vw, 2.75rem);
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 32px rgba(42, 24, 20, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.35s ease;
}

.home-news-card__link:hover .home-news-card__clipart {
    transform: scale(1.06) translateY(-2px);
}

.home-news-card__media--savings-flagship {
    background: linear-gradient(145deg, #f5ebe6 0%, #c9a08f 42%, #6b3a2e 100%);
}

.home-news-card__media--share-capital {
    background: linear-gradient(145deg, #f8f0e8 0%, #d4b896 45%, #4a231a 100%);
}

.home-news-card__media--savings-flex {
    background: linear-gradient(145deg, #f5ebe6 0%, #b8927a 45%, #5c3228 100%);
}

.home-news-card__media--savings {
    background: linear-gradient(145deg, #f8f2ee 0%, #c4a080 45%, #4a231a 100%);
}

.home-news-card__media--loan {
    background: linear-gradient(145deg, #fff4e8 0%, #e0b070 45%, #8b5e48 100%);
}

.home-news-card__media--women {
    background: linear-gradient(145deg, #f8ebe6 0%, #c4897a 45%, #6b3a2e 100%);
}

.home-news-card__media--children {
    background: linear-gradient(145deg, #f5efe8 0%, #d4a054 45%, #6b3a2e 100%);
}

.home-news-card__media--diaspora {
    background: linear-gradient(145deg, #f0ece8 0%, #a89078 45%, #3d241c 100%);
}

.home-news-card__media--senior {
    background: linear-gradient(145deg, #f5f0e8 0%, #c9b08a 45%, #6a5040 100%);
}

.home-news-card__media--group {
    background: linear-gradient(145deg, #f3ebe4 0%, #b89a72 45%, #4a231a 100%);
}

.home-news-card__media--news {
    background: linear-gradient(145deg, #f0ece8 0%, #b8a090 45%, #4a231a 100%);
}

.home-news-card__media.is-fallback {
    background: linear-gradient(135deg, #e8ddd4 0%, #a89078 100%);
}

.home-news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.home-news-card__link:hover .home-news-card__media img {
    transform: scale(1.05);
}

.home-news-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: clamp(16px, 2.5vw, 22px);
}

.home-news-card__title {
    font-family: var(--home-serif);
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--home-text);
    margin: 0 0 12px;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.home-news-card__link:hover .home-news-card__title {
    color: var(--home-primary);
}

.home-news-card__excerpt {
    font-family: var(--home-font);
    font-size: 14px;
    line-height: 1.65;
    color: var(--home-muted);
    margin: 0 0 16px;
    min-height: 4.5em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.home-news-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    margin-top: auto;
    border-top: 1px solid color-mix(in srgb, var(--home-primary) 8%, var(--home-border));
}

.home-news-card__cat {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--home-gold, #D4A054) 16%, transparent);
    font-family: var(--home-font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--home-primary);
}

.home-news-card__date {
    font-family: var(--home-font);
    font-size: 12px;
    color: var(--home-muted);
    white-space: nowrap;
}

.home-news-grid__empty {
    grid-column: 1 / -1;
    padding: 48px 24px;
    text-align: center;
    color: var(--home-muted);
    font-size: 15px;
    background: var(--home-surface-solid);
    border-radius: 20px;
    border: 1px dashed var(--home-border);
}

/* Join CTA below grid */
.home-news-hub__join {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px 32px;
    padding: clamp(24px, 4vw, 32px);
    border-radius: 20px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--home-primary) 94%, #000) 0%, var(--home-primary) 50%, color-mix(in srgb, var(--home-accent) 35%, var(--home-primary-dark)) 100%);
    border: 1px solid color-mix(in srgb, #fff 12%, transparent);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 18px 44px rgba(74, 35, 26, 0.2);
    color: #F8F2EE;
}

.home-news-hub__join-copy h3 {
    font-family: var(--home-serif);
    font-size: clamp(1.2rem, 2.5vw, 1.45rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: #fff;
}

.home-news-hub__join p {
    font-size: 14px;
    color: rgba(248, 242, 238, 0.82);
    margin: 0;
    max-width: 44ch;
    line-height: 1.6;
}

.home-news-hub__join .home-btn--accent,
.home-news-hub__join .home-btn--primary {
    background: linear-gradient(135deg, var(--home-gold, #D4A054) 0%, #C4893A 100%);
    color: #1A100E;
    border: none;
}

/* Dark mode */
body.home-dark .home-news-head__pill {
    color: var(--home-gold-soft, #F5D9A8);
    border-color: color-mix(in srgb, var(--home-gold, #D4A054) 45%, var(--home-border));
    background: color-mix(in srgb, var(--home-gold, #D4A054) 12%, transparent);
}

body.home-dark .home-news-head__title {
    color: var(--home-text);
}

body.home-dark .home-news-head__title em {
    color: var(--home-gold-soft, #F5D9A8);
}

body.home-dark .home-news-card__link {
    background: linear-gradient(165deg, var(--home-surface-solid) 0%, color-mix(in srgb, var(--home-primary) 8%, var(--home-bg)) 100%);
    border-color: var(--home-border);
}

body.home-dark .home-news-card__cat {
    background: color-mix(in srgb, var(--home-gold, #D4A054) 18%, transparent);
    color: var(--home-gold-soft, #F5D9A8);
}

body.home-dark .home-news-head__more {
    color: var(--home-gold-soft, #F5D9A8);
}

body.home-dark .home-news-card__title {
    color: var(--home-text);
}

body.home-dark .home-news-card__excerpt {
    color: var(--home-muted);
}

body.home-dark .home-news-card__date {
    color: var(--home-muted);
}

body.home-dark .home-news-card__link:hover .home-news-card__title {
    color: var(--home-gold-soft, #F5D9A8);
}

body.home-dark .home-news-hub__join {
    background:
        linear-gradient(135deg, #2A1510 0%, #1A100E 55%, #241410 100%);
    border-color: color-mix(in srgb, var(--home-gold, #D4A054) 28%, transparent);
}

/* Responsive */
@media (max-width: 1024px) {
    .home-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .home-news-grid {
        grid-template-columns: 1fr;
    }

    .home-news-head__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-news-hub__join {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .home-news-hub__join .home-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-news-card__link,
    .home-news-card__clipart,
    .home-news-head__more i {
        transition: none;
    }

    .home-news-card__link:hover .home-news-card__clipart {
        transform: none;
    }
}
