/* ==========================================================================
   Home: "Explore our resources" cards + "Trusted by 965+ universities" logo marquee.
   Markup: resources/views/user/new_home/home-partitions/section3.blade.php
   (loaded by AJAX into #AllSectionAdd). The marquee rows are filled by the JS at
   the bottom of that file (api/student/get-random-university).
   All colours come from gateway-theme.css.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Shared heading bits
   --------------------------------------------------------------------------- */
.gw-resources-kicker {
    margin: 0 0 10px;
    font-family: var(--gw-font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gw-gold-dark);
}
.gw-resources .gw-resources-title,
.gw-unis .gw-unis-title {
    margin: 0 0 12px;
    font-family: var(--gw-font);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.2;
    background: none;
    color: var(--gw-navy);
    -webkit-text-fill-color: var(--gw-navy);
}
.gw-unis .gw-unis-title .gw-unis-accent {
    background: none;
    color: var(--gw-gold-dark);
    -webkit-text-fill-color: var(--gw-gold-dark);
}
.gw-resources-sub,
.gw-unis-sub {
    margin: 0;
    font-family: var(--gw-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gw-slate);
}

/* ---------------------------------------------------------------------------
   A. Explore our resources (white)
   --------------------------------------------------------------------------- */
.gw-resources {
    background: var(--gw-white);
    padding: 96px 0;
}
.gw-resources-head {
    max-width: 680px;
    margin-bottom: 40px;
}
.gw-resources-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.gw-resource-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 32px 28px 28px;
    overflow: hidden;
    background: var(--gw-white);
    border: 1px solid rgba(var(--gw-navy-rgb), .10);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(var(--gw-navy-rgb), .07);
    text-decoration: none;
    color: inherit;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.gw-resource-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--gw-gold);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .35s ease;
}
.gw-resource-card:hover,
.gw-resource-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(var(--gw-navy-rgb), .16);
    box-shadow: 0 18px 40px rgba(var(--gw-navy-rgb), .12);
    text-decoration: none;
    color: inherit;
}
.gw-resource-card:hover::after,
.gw-resource-card:focus-visible::after {
    transform: scaleX(1);
}
.gw-resource-card:focus { outline: none; }
.gw-resource-card:focus-visible {
    outline: 3px solid var(--gw-gold);
    outline-offset: 3px;
}

.gw-resource-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
    border-radius: 14px;
    background: var(--gw-navy);
    color: var(--gw-gold);
    flex-shrink: 0;
}
.gw-resource-icon svg {
    width: 26px;
    height: 26px;
}

.gw-resources .gw-resource-title {
    margin: 0 0 10px;
    font-family: var(--gw-font);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    background: none;
    color: var(--gw-navy);
    -webkit-text-fill-color: var(--gw-navy);
}
.gw-resource-desc {
    margin: 0 0 24px;
    font-family: var(--gw-font);
    font-size: 15px;
    line-height: 1.65;
    color: var(--gw-slate);
}
.gw-resource-action {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--gw-font);
    font-size: 15px;
    font-weight: 600;
    color: var(--gw-gold-dark);
}
.gw-resource-arrow {
    display: inline-block;
    transition: transform .25s ease;
}
.gw-resource-card:hover .gw-resource-arrow,
.gw-resource-card:focus-visible .gw-resource-arrow {
    transform: translateX(4px);
}

/* ---------------------------------------------------------------------------
   B. Universities logo marquee (ice)
   --------------------------------------------------------------------------- */
.gw-unis {
    --gw-uni-w: 180px;
    --gw-uni-h: 96px;
    --gw-uni-gap: 16px;
    background: var(--gw-ice);
    padding: 96px 0;
    overflow: hidden;
}
.gw-unis-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}
.gw-unis-intro { max-width: 680px; }

.gw-unis-browse {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1.5px solid var(--gw-navy);
    border-radius: 999px;
    background: transparent;
    font-family: var(--gw-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--gw-navy);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease;
}
.gw-unis-browse:hover,
.gw-unis-browse:focus-visible {
    background: var(--gw-navy);
    color: var(--gw-white);
    text-decoration: none;
}
.gw-unis-browse:focus { outline: none; }
.gw-unis-browse:focus-visible {
    outline: 3px solid var(--gw-gold);
    outline-offset: 3px;
}

/* The viewport: full width (max 1440), edges fade out. */
.gw-unis-marquee {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--gw-uni-gap);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.gw-unis-marquee[hidden] { display: none; }
.gw-unis-row {
    overflow: hidden;
    padding: 4px 0; /* room for the card border/focus ring */
}
.gw-unis-track {
    display: flex;
    width: max-content;
    animation: gw-unis-scroll var(--gw-unis-duration, 40s) linear infinite;
}
.gw-unis-row--reverse .gw-unis-track {
    animation-direction: reverse;
}
.gw-unis-marquee:hover .gw-unis-track,
.gw-unis-marquee:focus-within .gw-unis-track {
    animation-play-state: paused;
}
@keyframes gw-unis-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* margin (not flex gap) so the cloned half is exactly 50% of the track */
.gw-uni-card {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--gw-uni-w);
    height: var(--gw-uni-h);
    margin-right: var(--gw-uni-gap);
    background: var(--gw-white);
    border: 1px solid rgba(var(--gw-navy-rgb), .08);
    border-radius: 16px;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.gw-uni-card img {
    max-width: 70%;
    max-height: 70%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .75;
    transition: filter .25s ease, opacity .25s ease;
}
.gw-uni-card:hover,
.gw-uni-card:focus-visible {
    border-color: rgba(var(--gw-navy-rgb), .16);
    box-shadow: 0 8px 22px rgba(var(--gw-navy-rgb), .08);
}
.gw-uni-card:hover img,
.gw-uni-card:focus-visible img {
    filter: none;
    opacity: 1;
}
.gw-uni-card:focus { outline: none; }
.gw-uni-card:focus-visible {
    outline: 2px solid var(--gw-gold-dark);
    outline-offset: -2px;
}
.gw-uni-card.is-broken img { visibility: hidden; }

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .gw-resources .gw-resources-title,
    .gw-unis .gw-unis-title { font-size: 34px; }
    .gw-resource-card { padding: 28px 24px 24px; }
}

@media (max-width: 991.98px) {
    .gw-resources,
    .gw-unis { padding: 72px 0; }
    .gw-unis { --gw-uni-w: 160px; --gw-uni-h: 88px; }
}

@media (max-width: 767.98px) {
    .gw-resources,
    .gw-unis { padding: 56px 0; }
    .gw-resources .gw-resources-title,
    .gw-unis .gw-unis-title { font-size: 28px; }
    .gw-resources-sub,
    .gw-unis-sub { font-size: 15px; }
    .gw-resources-head { margin-bottom: 28px; }
    .gw-resources-grid { grid-template-columns: 1fr; gap: 16px; }

    .gw-unis { --gw-uni-w: 140px; --gw-uni-h: 80px; --gw-uni-gap: 12px; }
    .gw-unis-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 28px;
    }
    .gw-uni-card { border-radius: 14px; }
    .gw-unis-marquee {
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    }
}

/* ---------------------------------------------------------------------------
   Reduced motion: no scroll, one wrapping grid of the real logos (clones hidden)
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .gw-resource-card,
    .gw-resource-card::after,
    .gw-resource-arrow { transition: none; }

    .gw-unis-marquee {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--gw-uni-gap);
        padding: 0 16px;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .gw-unis-row,
    .gw-unis-track { display: contents; }
    .gw-unis-track { animation: none; }
    .gw-uni-card { margin-right: 0; }
    .gw-uni-card.is-clone { display: none; }
}

/* ---- Bento (Nov 2026): big navy blog card + gold FAQ card + white exam card ---- */
.gw-resources .gw-resources-title span { color: var(--gw-gold-dark); -webkit-text-fill-color: var(--gw-gold-dark); }
.gw-bento { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.gw-bento .gw-resource-card { position: relative; overflow: hidden; border-radius: 26px; min-height: 0; }
.gw-bento .gw-resource-card .gw-resource-icon { position: relative; z-index: 2; }
/* big faint icon in the corner of every card */
.gw-bento .gw-resource-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    border: 34px solid currentColor;
    opacity: .07;
    transition: transform 400ms ease;
    pointer-events: none;
}
.gw-bento .gw-resource-card:hover::after { transform: scale(1.15) rotate(12deg); }
.gw-bento .gw-resource-title, .gw-bento .gw-resource-desc, .gw-bento .gw-resource-action { position: relative; z-index: 2; }

.gw-bento-blog {
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 380px !important;
    padding: 40px !important;
    color: var(--gw-white);
    background:
        radial-gradient(circle at 0% 0%, rgba(var(--gw-gold-rgb), .18), transparent 45%),
        linear-gradient(150deg, var(--gw-navy-light), var(--gw-navy)) !important;
    border-color: transparent !important;
}
.gw-bento-blog .gw-resource-title { font-size: clamp(28px, 2.6vw, 38px); color: var(--gw-white); -webkit-text-fill-color: var(--gw-white); }
.gw-bento-blog .gw-resource-desc { font-size: 16px; color: rgba(255, 255, 255, .78); max-width: 380px; }
.gw-bento-blog .gw-resource-icon { background: var(--gw-gold-shine); color: var(--gw-navy); width: 60px; height: 60px; margin-bottom: auto; }
.gw-bento-blog .gw-resource-action {
    align-self: flex-start;
    margin-top: 18px;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--gw-gold-shine);
    color: var(--gw-navy);
    -webkit-text-fill-color: var(--gw-navy);
    box-shadow: var(--gw-gold-glow);
}
.gw-bento-blog::after { color: var(--gw-gold); opacity: .12; width: 260px; height: 260px; border-width: 46px; }

.gw-bento-faq {
    color: var(--gw-navy);
    background: var(--gw-gold-shine) !important;
    border-color: transparent !important;
}
.gw-bento-faq .gw-resource-icon { background: var(--gw-navy); color: var(--gw-gold); }
.gw-bento-faq .gw-resource-title { color: var(--gw-navy); -webkit-text-fill-color: var(--gw-navy); }
.gw-bento-faq .gw-resource-desc { color: rgba(var(--gw-navy-rgb), .8); }
.gw-bento-faq .gw-resource-action { color: var(--gw-navy); -webkit-text-fill-color: var(--gw-navy); }
.gw-bento-faq::before { display: none; }                 /* no gold hover bar on the gold card */

.gw-bento-exam { border: 2px solid var(--gw-gold) !important; color: var(--gw-navy); }

@media (max-width: 767.98px) {
    .gw-bento { grid-template-columns: 1fr; }
    .gw-bento-blog { grid-row: auto; min-height: 300px !important; padding: 28px !important; }
}

/* ---- Bento v2: live previews inside the cards ---- */
.gw-bento .gw-resource-card { display: flex; flex-direction: column; }
.gw-bento-blog { justify-content: flex-start !important; }
.gw-bento-blog .gw-resource-icon { margin-bottom: 18px; }
.gw-bento-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; position: relative; z-index: 2; }
.gw-bento-post {
    display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 16px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
    color: var(--gw-white); text-decoration: none; transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.gw-bento-post:hover { background: rgba(255, 255, 255, .12); border-color: rgba(var(--gw-gold-rgb), .5); transform: translateX(4px); color: var(--gw-white); }
.gw-bento-thumb { flex-shrink: 0; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--gw-navy-light); }
.gw-bento-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gw-bento-post-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; line-height: 1.4; }
.gw-bento-go { color: var(--gw-gold); flex-shrink: 0; }
.gw-bento .gw-bento-main { margin-top: auto; padding-top: 18px; text-decoration: none; }
.gw-bento-blog .gw-bento-main { margin-top: 20px; }

.gw-bento-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; position: relative; z-index: 2; }
.gw-bento-q {
    padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; text-decoration: none;
    background: rgba(255, 255, 255, .55); color: var(--gw-navy); border: 1px solid rgba(var(--gw-navy-rgb), .12);
    transition: background 200ms ease, transform 200ms ease;
}
.gw-bento-q:hover { background: var(--gw-white); color: var(--gw-navy); transform: translateY(-2px); }
.gw-bento-q::before { content: "?"; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; background: var(--gw-navy); color: var(--gw-gold); font-size: 11px; font-weight: 700; }
.gw-bento-exam-chip {
    padding: 9px 16px; border-radius: 12px; font-size: 14px; font-weight: 700; letter-spacing: .02em; text-decoration: none;
    background: var(--gw-navy); color: var(--gw-gold); transition: transform 200ms ease, box-shadow 200ms ease;
}
.gw-bento-exam-chip:hover { color: var(--gw-gold); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(var(--gw-navy-rgb), .25); }
.gw-bento-post:focus-visible, .gw-bento-q:focus-visible, .gw-bento-exam-chip:focus-visible, .gw-bento-main:focus-visible { outline: 3px solid var(--gw-gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .gw-bento-post, .gw-bento-q, .gw-bento-exam-chip { transition: none; transform: none !important; } }
/* thumbnail fallback (image missing): a gold document icon on navy */
.gw-bento-thumb { display: grid; place-items: center; background: var(--gw-navy-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFC629' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M9 13h6M9 17h4'/%3E%3C/svg%3E") center / 26px no-repeat; }

/* ---- Blog previews as small image cards (3 across) instead of a text list ---- */
.gw-bento-minis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gw-bento-minis .gw-bento-post { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; border-radius: 16px; }
.gw-bento-minis .gw-bento-post:hover { transform: translateY(-4px); }
.gw-bento-minis .gw-bento-thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 0; background-size: 30px; }
.gw-bento-minis .gw-bento-post-title {
    padding: 10px 12px 12px;
    font-size: 12.5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gw-bento-minis .gw-bento-go { display: none; }
@media (max-width: 600px) {
    .gw-bento-minis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .gw-bento-minis .gw-bento-post-title { font-size: 11.5px; padding: 8px; }
}
