/* ==========================================================================
   Home: "Gateway in the news" (30 Nov 2026). Markup: resources/views/user/partials/_home_news.blade.php
   White band, one card per article (publication name, line, Read More) in an endless marquee,
   thin dividers between cards. Colours only from gateway-theme.css variables.
   ========================================================================== */
.gw-news {
    --gw-news-w: 280px;
    --gw-news-speed: 60s;
    padding: 40px 0 44px;
    background: var(--gw-white);
    font-family: var(--gw-font);
    overflow: hidden;
}
.gw-news .gw-news-h {
    margin: 0 0 20px;
    font-family: var(--gw-font);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--gw-navy);
    background: none;
    text-transform: none;
}
.gw-news .gw-news-h span { color: var(--gw-gold-dark); }

/* ---------- marquee ---------- */
.gw-news-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.gw-news-track {
    display: flex;
    width: max-content;
    animation: gwNewsRun var(--gw-news-speed) linear infinite;
    will-change: transform;
}
.gw-news-marquee:hover .gw-news-track,
.gw-news-marquee:focus-within .gw-news-track { animation-play-state: paused; }
.gw-news-set { display: flex; margin: 0; padding: 0; list-style: none; }
@keyframes gwNewsRun { to { transform: translateX(-50%); } }

/* ---------- card ---------- */
.gw-news-card {
    position: relative;
    flex: 0 0 var(--gw-news-w);
    width: var(--gw-news-w);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 22px 38px;
    text-align: center;
    background: var(--gw-white);
    border-left: 1px solid rgba(var(--gw-navy-rgb), .14);
    transition: background .3s;
}
.gw-news-card:hover,
.gw-news-card:focus-within { background: var(--gw-ice); }

/* publication name as the masthead */
.gw-news .gw-news-name {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6em;
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--gw-navy);
}
.gw-news-sub {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--gw-slate);
}
.gw-news .gw-news-line {
    margin: 6px 0 14px;
    font-family: var(--gw-font);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    display: -webkit-box;                        /* long headlines stop at 2 lines with "..." */
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--gw-navy);
    background: none;
}

/* Read More, pinned to the bottom so every card lines up */
.gw-news-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: var(--gw-navy-light);
    transition: color .25s;
}
.gw-news-link::after { content: ""; position: absolute; inset: 0; }   /* the whole card is the click target */
.gw-news-link svg { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.gw-news-card:hover .gw-news-link { color: var(--gw-gold-dark); }
.gw-news-card:hover .gw-news-link svg { transform: translateX(6px); }
.gw-news-link:focus-visible { outline: 3px solid var(--gw-gold); outline-offset: 4px; }

.gw-news-alt {
    position: absolute;                          /* above the card-wide link */
    z-index: 2;
    bottom: 9px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gw-slate);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.gw-news-alt:hover, .gw-news-alt:focus-visible { color: var(--gw-gold-dark); }

/* ---------- responsive ---------- */
@media (max-width: 1199.98px) {
    .gw-news .gw-news-h { font-size: 36px; }
}
@media (max-width: 767.98px) {
    .gw-news { --gw-news-w: 240px; --gw-news-speed: 55s; padding: 32px 0 36px; }
    .gw-news .gw-news-h { font-size: 30px; margin-bottom: 16px; }
    .gw-news-card { padding: 18px 16px 34px; }
    .gw-news .gw-news-name { font-size: 18px; }
    .gw-news .gw-news-line { font-size: 14px; }
}
@media (max-width: 359.98px) {
    .gw-news .gw-news-h { font-size: 26px; }
}

/* ---------- reduced motion: a normal swipeable row ---------- */
@media (prefers-reduced-motion: reduce) {
    .gw-news-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
    .gw-news-track { animation: none; }
    .gw-news-set[aria-hidden="true"] { display: none; }
    .gw-news-card, .gw-news-link, .gw-news-link svg { transition: none; }
}
