/* Warriors read-more boxes */

.qboxes_section {
    --qbox-radius: 18px;
    --qbox-gap: 24px;
    --qbox-section-pad-y: clamp(48px, 6vw, 88px);
    --qbox-dots-gap: 20px;
    position: relative;
    isolation: isolate;
    overflow: visible;
    padding-top: var(--qbox-section-pad-y);
    padding-bottom: var(--qbox-section-pad-y);
    padding-inline: var(--section-edge-pad, var(--site-inline-pad, 24px));
    background-color: #0b1018;
}

.qboxes_section::before,
.qboxes_section::after {
    position: absolute;
    inset: -12%;
    content: "";
    pointer-events: none;
}

.qboxes_section::before {
    z-index: 0;
    background:
        radial-gradient(ellipse at 12% 18%, rgba(79, 125, 220, 0.36), transparent 30%),
        radial-gradient(ellipse at 88% 76%, rgba(232, 119, 34, 0.28), transparent 32%),
        linear-gradient(120deg, #0b1018 0%, #151936 48%, #0b1018 100%);
    background-size: 120% 120%, 110% 110%, 180% 180%;
    animation: qboxesAmbientGradient 18s ease-in-out infinite alternate;
}

.qboxes_section::after {
    z-index: 0;
    background:
        radial-gradient(circle at 8% 28%, rgba(255, 255, 255, 0.75) 0 1px, transparent 2px),
        radial-gradient(circle at 28% 72%, rgba(232, 119, 34, 0.75) 0 1px, transparent 2px),
        radial-gradient(circle at 64% 18%, rgba(255, 255, 255, 0.6) 0 1px, transparent 2px),
        radial-gradient(circle at 92% 42%, rgba(126, 169, 255, 0.7) 0 1px, transparent 2px);
    background-size: 170px 150px, 220px 190px, 260px 220px, 190px 180px;
    opacity: 0.62;
    animation: qboxesSparkleFloat 14s linear infinite;
}

@keyframes qboxesAmbientGradient {
    0% { transform: translate3d(-3%, 1%, 0) scale(1); background-position: 0% 0%, 100% 100%, 0% 50%; }
    100% { transform: translate3d(3%, -2%, 0) scale(1.06); background-position: 22% 18%, 78% 82%, 100% 50%; }
}

@keyframes qboxesSparkleFloat {
    0% { transform: translate3d(-1%, -1%, 0); opacity: 0.38; }
    50% { opacity: 0.78; }
    100% { transform: translate3d(2%, 2%, 0); opacity: 0.5; }
}

.qboxes {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
}

.qboxes_particle_field {
    position: absolute;
    inset: -24px;
    z-index: 2;
    overflow: visible;
    pointer-events: none;
}

.qboxes_particle {
    position: absolute;
    display: block;
    border-radius: 50%;
    box-shadow: 0 0 7px currentColor;
    opacity: 0.25;
    mix-blend-mode: screen;
    animation: qboxesParticleTwinkle 4.5s ease-in-out infinite alternate;
    will-change: opacity, filter, transform;
}

@keyframes qboxesParticleTwinkle {
    0% {
        opacity: 0.16;
        filter: blur(0.2px);
    }
    45% {
        opacity: 0.72;
        filter: blur(0);
    }
    100% {
        opacity: 0.28;
        filter: blur(0.8px);
    }
}

.qboxes_track {
    margin: 0;
    padding: 0;
}

/* Pre-init: keep slides in a row until Slick mounts */
.qboxes_slick:not(.slick-initialized) {
    display: flex;
    gap: var(--qbox-gap);
    overflow: hidden;
}

.qboxes_slick:not(.slick-initialized) .qbox_slide {
    flex: 0 0 calc((100% - (var(--qbox-gap) * 3)) / 4);
    min-width: 0;
}

@media screen and (max-width: 1280px) {
    .qboxes_slick:not(.slick-initialized) .qbox_slide {
        flex-basis: calc((100% - (var(--qbox-gap) * 2)) / 3);
    }
}

@media screen and (max-width: 1080px) {
    .qboxes_slick:not(.slick-initialized) .qbox_slide {
        flex-basis: calc((100% - var(--qbox-gap)) / 2);
    }
}

@media screen and (max-width: 767px) {
    .qboxes_slick:not(.slick-initialized) .qbox_slide {
        flex-basis: 100%;
    }
}

.qbox_slide {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    box-sizing: border-box;
}

.qbox {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    border-radius: var(--qbox-radius);
    overflow: visible;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.qbox:hover,
.qbox:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}

.qbox_inner {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 100%;
    box-sizing: border-box;
    padding: clamp(22px, 3vw, 30px);
    border-radius: var(--qbox-radius);
    overflow: hidden;
    isolation: isolate;
}

/* Glossy sweep across the card on hover */
.qbox_inner::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 55%;
    height: 100%;
    z-index: 3;
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.14) 42%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.14) 58%,
        rgba(255, 255, 255, 0) 100%);
    transform: skewX(-18deg);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.qbox_slide:hover .qbox_inner::after,
.qbox_slide:focus-within .qbox_inner::after {
    opacity: 1;
    animation: qboxGloss 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes qboxGloss {
    from { left: -75%; }
    to { left: 125%; }
}

/* Box background = one of the site's three theme colours, alternated by theme */
.qbox_theme_navy .qbox_inner {
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0.14) 100%),
        var(--color-schools, #1b365d);
}

.qbox_theme_green .qbox_inner {
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0.14) 100%),
        var(--color-quests, #3e5c45);
}

.qbox_theme_orange .qbox_inner {
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.16) 100%),
        var(--color-orange-deep, #c05a28);
}

.qbox_head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 16px;
}

.qbox_icon_ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border: 1.5px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    color: #fff;
}

.qbox_icon_svg {
    width: 24px;
    height: 24px;
}

.qbox_title {
    margin: 0;
    color: #fff;
    font-family: var(--font-heading);
    font-size: clamp(1rem, 1.2vw, 1.18rem);
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.15;
    text-transform: uppercase;
}

.qbox_description {
    margin: 0;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(0.88rem, 1vw, 0.96rem);
    line-height: 1.55;
    text-align: left;
}

.qbox_footer {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    margin-top: clamp(16px, 2vw, 22px);
    text-align: left;
}

.qbox_link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.25s ease, transform 0.25s ease;
}

.qbox_link:hover,
.qbox_link:focus-visible {
    color: var(--color-orange);
    transform: translateX(3px);
    outline: none;
}

.qbox_link_icon {
    width: 16px;
    height: 16px;
}

/* Zoomed, faded, animated echo of the title icon in the bottom-right corner.
   First child of .qbox_inner, absolutely positioned and click-transparent so
   it sits visually behind the card content and never blocks the link. */
.qbox_corner_mark {
    position: absolute;
    right: clamp(10px, 2vw, 20px);
    bottom: clamp(10px, 2vw, 20px);
    width: clamp(84px, 11vw, 116px);
    height: clamp(84px, 11vw, 116px);
    color: #fff;
    pointer-events: none;
}

.qbox_corner_mark_svg {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.16;
    transform-origin: center;
    animation: qboxCornerFloat 7s ease-in-out infinite;
}

.qbox:hover .qbox_corner_mark_svg,
.qbox:focus-within .qbox_corner_mark_svg {
    opacity: 0.24;
}

@keyframes qboxCornerFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate3d(-6px, -6px, 0) rotate(-6deg) scale(1.06);
    }
}

/* Slick slider */
.qboxes_is_slider .qboxes_slick {
    margin: 0;
}

.qboxes_is_slider .qboxes_slick.slick-slider {
    margin-bottom: 0;
}

.qboxes_is_slider .slick-list {
    overflow: hidden;
    margin: 0 calc(var(--qbox-gap) / -2);
}

.qboxes_is_slider .qbox_slide {
    padding: 0 calc(var(--qbox-gap) / 2);
    box-sizing: border-box;
}

.qboxes_is_slider .slick-track {
    display: flex;
    align-items: stretch;
}

.qboxes_is_slider .slick-slide {
    height: auto;
    box-sizing: border-box;
}

/* Equal-height boxes: let flex stretch every slide to the tallest one
   (a fixed height:100% on the slide resolves to its own content height). */
.qboxes_is_slider .slick-track > .qbox_slide.slick-slide {
    height: auto;
    min-height: 0;
    align-self: stretch;
}

.qboxes_is_slider .slick-slide > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.qboxes_is_slider .qbox_slide,
.qboxes_is_slider .qbox {
    height: 100%;
}

.qboxes_is_slider .slick-prev,
.qboxes_is_slider .slick-next,
.qboxes_is_slider .slick-arrow {
    display: none !important;
}

/* Pill pager — matches hero slider dots/lines */
.qboxes_is_slider .slick-dots {
    display: flex !important;
    justify-content: center;
    align-items: center;
    position: static;
    width: 100%;
    margin: var(--qbox-dots-gap) 0 0;
    padding: 0;
    min-height: 0;
    list-style: none;
}

.qboxes_is_slider .slick-dots li {
    display: inline-flex;
    align-items: center;
    width: auto;
    height: auto;
    margin: 0;
}

.qboxes_is_slider .slick-dots li button {
    display: block;
    width: 14px;
    height: 4px;
    margin: 0 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    font-size: 0;
    line-height: 0;
    text-indent: -9999px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition:
        width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.35s ease;
}

.qboxes_is_slider .slick-dots li button:before {
    display: none;
    content: none;
}

.qboxes_is_slider .slick-dots li button:hover,
.qboxes_is_slider .slick-dots li button:focus {
    background: rgba(255, 255, 255, 0.62);
    transform: translateY(-1px);
    outline: none;
}

.qboxes_is_slider .slick-dots li.slick-active button {
    width: 38px;
    background: var(--color-orange);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 18px rgba(var(--color-orange-rgb), 0.45);
}

@media screen and (max-width: 1200px) {
    .qboxes_section {
        --qbox-gap: 20px;
    }
}

@media screen and (max-width: 1080px) {
    .qboxes_is_slider .qboxes_slick,
    .qboxes_is_slider .qboxes_slick.slick-slider {
        margin: 0;
    }
}

@media screen and (max-width: 767px) {
    .qboxes_section {
        --qbox-section-pad-y: clamp(40px, 8vw, 48px);
        --qbox-dots-gap: 16px;
    }

    .qboxes_is_slider .slick-dots li button {
        width: 12px;
        height: 3px;
        margin: 0 5px;
    }

    .qboxes_is_slider .slick-dots li.slick-active button {
        width: 30px;
    }

    .qbox:hover,
    .qbox:focus-within {
        transform: none;
        box-shadow: none;
    }

    .qbox_icon_ring {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .qbox_icon_svg {
        width: 22px;
        height: 22px;
    }
}

@media screen and (max-width: 560px) {
    .qboxes_section {
        --qbox-section-pad-y: clamp(32px, 8vw, 40px);
        --qbox-gap: 16px;
        --qbox-dots-gap: 14px;
    }

    .qbox_inner {
        padding: 20px;
    }

    .qbox_head {
        gap: 12px;
        margin-bottom: 12px;
    }
}

@media screen and (max-width: 440px) {
    .qboxes_section {
        --qbox-section-pad-y: clamp(32px, 8vw, 40px);
    }

    .qboxes_is_slider .slick-dots li button {
        width: 10px;
        margin: 0 4px;
    }

    .qboxes_is_slider .slick-dots li.slick-active button {
        width: 26px;
    }

    .qbox_title {
        font-size: 0.92rem;
        letter-spacing: 0.12em;
    }

    .qbox_description {
        font-size: 0.84rem;
    }

    .qbox_link {
        font-size: 0.66rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qboxes_section::before,
    .qboxes_section::after {
        animation: none;
    }

    .qbox {
        transition: none;
    }

    .qbox_corner_mark_svg {
        animation: none;
    }

    .qbox_slide:hover .qbox_inner::after,
    .qbox_slide:focus-within .qbox_inner::after {
        animation: none;
        opacity: 0;
    }

    .qbox:hover,
    .qbox:focus-within {
        transform: none;
    }

    .qbox_link:hover,
    .qbox_link:focus-visible {
        transform: none;
    }
}

/* Final background treatment: dark, restrained, and irregular rather than patterned. */
.qboxes_section::before {
    inset: 0;
    background:
        radial-gradient(ellipse at 14% 22%, rgba(65, 91, 160, 0.1), transparent 34%),
        radial-gradient(ellipse at 86% 78%, rgba(190, 76, 31, 0.08), transparent 32%),
        linear-gradient(120deg, #080c13 0%, #0b1018 52%, #080c13 100%);
    opacity: 0.96;
    animation-name: qboxesDarkAmbient;
}

.qboxes_section::after {
    inset: 0;
    background:
        radial-gradient(circle at 6% 14%, rgba(255, 255, 255, 0.56) 0 1px, transparent 2px),
        radial-gradient(circle at 17% 78%, rgba(117, 153, 229, 0.42) 0 1px, transparent 2px),
        radial-gradient(circle at 31% 31%, rgba(255, 255, 255, 0.36) 0 1px, transparent 2px),
        radial-gradient(circle at 47% 88%, rgba(224, 115, 52, 0.42) 0 1px, transparent 2px),
        radial-gradient(circle at 59% 17%, rgba(255, 255, 255, 0.44) 0 1px, transparent 2px),
        radial-gradient(circle at 73% 64%, rgba(117, 153, 229, 0.38) 0 1px, transparent 2px),
        radial-gradient(circle at 89% 27%, rgba(255, 255, 255, 0.34) 0 1px, transparent 2px),
        radial-gradient(circle at 96% 91%, rgba(224, 115, 52, 0.38) 0 1px, transparent 2px);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    opacity: 0.46;
    animation-name: qboxesIrregularSparkle;
    animation-duration: 19s;
}

@keyframes qboxesDarkAmbient {
    0% { transform: translate3d(-1%, 0, 0) scale(1); }
    100% { transform: translate3d(1%, -1%, 0) scale(1.025); }
}

@keyframes qboxesIrregularSparkle {
    0% { transform: translate3d(-0.5%, -0.5%, 0); opacity: 0.28; }
    37% { transform: translate3d(0.8%, -0.2%, 0); opacity: 0.5; }
    71% { transform: translate3d(-0.3%, 0.7%, 0); opacity: 0.38; }
    100% { transform: translate3d(0.6%, 0.4%, 0); opacity: 0.46; }
}

@media (prefers-reduced-motion: reduce) {
    .qboxes_section::before,
    .qboxes_section::after {
        animation: none !important;
    }

    .qboxes_particle {
        animation: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qboxes_section::before,
    .qboxes_section::after {
        animation: none !important;
    }
}


/* Extra ambient points keep the dark background lively without creating a grid. */
.qboxes_section::after {
    background:
        radial-gradient(circle at 4% 9%, rgba(255, 255, 255, 0.86) 0 1.5px, transparent 3px),
        radial-gradient(circle at 11% 63%, rgba(102, 151, 255, 0.7) 0 1px, transparent 3px),
        radial-gradient(circle at 19% 35%, rgba(255, 176, 104, 0.72) 0 1.5px, transparent 3px),
        radial-gradient(circle at 27% 91%, rgba(255, 255, 255, 0.66) 0 1px, transparent 3px),
        radial-gradient(circle at 36% 15%, rgba(130, 173, 255, 0.62) 0 1.5px, transparent 3px),
        radial-gradient(circle at 44% 56%, rgba(255, 255, 255, 0.72) 0 1px, transparent 3px),
        radial-gradient(circle at 53% 82%, rgba(255, 153, 82, 0.72) 0 1.5px, transparent 3px),
        radial-gradient(circle at 61% 27%, rgba(255, 255, 255, 0.8) 0 1px, transparent 3px),
        radial-gradient(circle at 69% 74%, rgba(111, 161, 255, 0.66) 0 1.5px, transparent 3px),
        radial-gradient(circle at 78% 11%, rgba(255, 191, 120, 0.62) 0 1px, transparent 3px),
        radial-gradient(circle at 84% 48%, rgba(255, 255, 255, 0.74) 0 1.5px, transparent 3px),
        radial-gradient(circle at 93% 82%, rgba(115, 164, 255, 0.7) 0 1px, transparent 3px);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    opacity: 0.7;
    filter: drop-shadow(0 0 4px rgba(119, 161, 255, 0.22));
    animation-name: qboxesIrregularSparkle;
    animation-duration: 13s;
}

@keyframes qboxesIrregularSparkle {
    0% {
        transform: translate3d(-1%, -0.5%, 0) scale(0.98);
        opacity: 0.42;
    }
    23% {
        transform: translate3d(0.7%, -1.2%, 0) scale(1.02);
        opacity: 0.76;
    }
    51% {
        transform: translate3d(-0.4%, 0.8%, 0) scale(1);
        opacity: 0.54;
    }
    79% {
        transform: translate3d(1.1%, 0.2%, 0) scale(1.03);
        opacity: 0.82;
    }
    100% {
        transform: translate3d(-0.3%, 1%, 0) scale(0.99);
        opacity: 0.62;
    }
}

/* Pin the "Learn More" footer to the bottom so links line up across boxes. */
.qbox_inner > .qbox_footer {
    margin-top: auto;
    padding-top: clamp(16px, 2vw, 22px);
}
