@font-face {
  font-family: 'MidnightSans';
  font-weight: 800;
  src:  url('/wp-content/themes/cloudbet2/assets/fonts/midnight-sans-st-48-heavy-pro.woff2') format('woff2');
}

body {
    font-family: 'Inter', sans-serif;
}

.font-midnight {
    font-family: 'MidnightSans', 'Inter', sans-serif;
    text-transform: uppercase;
    font-weight: 900;
}

.container {
    width: 1240px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1em;
    padding-right: 1em;
}

/* FOOTER */
.social svg {
    height: 1.8rem;
    width: 1.8rem;
}

footer {
    background: radial-gradient(
    80% 100% at 50% 92%,
    #40255E,
    #1E1322,
    transparent
    );
}

.links-list a {
    opacity: 0.8;
    margin-bottom: 5px;
}
#footer-license p {
    line-height: 1.6;
    opacity: 0.6;
    font-size: 0.8em;
}

/* WPML language selector (footer) */
.wpml-ls-legacy-dropdown {
    width: 150px;
    font-size: 0.8rem;
    position: relative;
    z-index: 2;
}
.wpml-ls-legacy-dropdown a {
    background-color: transparent;
    color: #CCA6FF;
    font-weight: bold;
    padding: 0.8em 1em;
    border: 0;
}
.wpml-ls-legacy-dropdown .wpml-ls-current-language:hover>a, .wpml-ls-legacy-dropdown a:focus, .wpml-ls-legacy-dropdown a:hover {
    background-color: transparent!important;
    color: #CCA6FF;
}
.wpml-ls-legacy-dropdown li {
    background-color: transparent!important;
}
.wpml-ls-legacy-dropdown a.wpml-ls-item-toggle {
    border-radius: 12px;
    margin: 5px 0;
}
.wpml-ls:hover a.wpml-ls-item-toggle {
    background-color: rgba(255,255,255,0.1)!important;
}
.wpml-ls-legacy-dropdown .wpml-ls-item.wpml-ls-current-language {
    padding-top: 3px;
    padding-bottom: 3px;
}
.wpml-ls-legacy-dropdown .wpml-ls-item.wpml-ls-current-language a {
    border: 1px solid rgba(100,100,100,0.1);
}
.wpml-ls-legacy-dropdown .wpml-ls-sub-menu {
    border-radius: 12px;
    border: 0!important;
    background-color: #333!important;
}

/* HERO (video) */
/* mobile: video on top fading into the bg, centred text below. desktop: text over the video with a dark shade on the left */
.ff-hero {
    padding-bottom: 4rem; /* room for the arc */
}
.ff-hero-video {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
    mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.ff-hero-shade {
    display: none;
}
.ff-hero-text {
    text-align: center;
    margin-top: -3rem; /* tuck up into the faded part of the video */
    position: relative;
}
.ff-hero-text p {
    line-height: 1.4;
}
@media (min-width: 1024px) {
    .ff-hero {
        padding-bottom: 0;
        min-height: 600px;
    }
    .ff-hero-video {
        position: absolute;
        inset: 0;
        height: 100%;
        aspect-ratio: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .ff-hero-shade {
        display: block;
        position: absolute;
        inset: 0;
        background:
            linear-gradient(to right, rgba(20,17,20,0.9) 25%, rgba(20,17,20,0.4) 55%, transparent 75%),
            linear-gradient(to bottom, rgba(20,17,20,0.6), transparent 25%);
        pointer-events: none;
    }
    .ff-hero-content {
        position: relative;
        height: min(56.25vw, 100vh); /* video is 16:9, capped at one screen */
        min-height: 600px;
        display: flex;
        align-items: center;
        padding-top: 6rem; /* clears the absolute header */
        padding-bottom: 6rem;
    }
    .ff-hero-text {
        text-align: left;
        margin-top: 0;
        max-width: 48rem;
    }
    .ff-hero-text .ff-intro-text {
        max-width: 36rem;
    }
}

/* INTRO */
/* fade the photo into the background: top/bottom on mobile, right + top/bottom on desktop */
.ff-intro-img {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 60%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 60%, transparent);
}
@media (min-width: 1024px) {
    .ff-intro-img {
        -webkit-mask-image:
            linear-gradient(to right, #000 55%, transparent 95%),
            linear-gradient(to bottom, transparent, #000 10%, #000 75%, transparent);
        -webkit-mask-composite: source-in;
        mask-image:
            linear-gradient(to right, #000 55%, transparent 95%),
            linear-gradient(to bottom, transparent, #000 10%, #000 75%, transparent);
        mask-composite: intersect;
    }
}
.ff-intro-text p {
    line-height: 1.6;
}

/* SPONSORED ATHLETES */
/* card bg + purple border that fades from the top-left corner */
.sponsored-card {
    height: 170px;
    border: 2px solid transparent;
    background:
        linear-gradient(to right, #1A161D, #221C27) padding-box,
        linear-gradient(160deg, #7A4BC4 0%, rgba(122,75,196,0.15) 45%, rgba(122,75,196,0.35) 100%) border-box;
}
/* purple glow behind the photo, fades in on hover */
.sponsored-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(45% 90% at 80% 100%, rgba(141,82,218,0.45), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sponsored-card:hover::before {
    opacity: 1;
}
/* cut-out photo pops out above the card */
.sponsored-img {
    position: absolute;
    z-index: 1;
    right: 1rem;
    bottom: 0;
    height: 120%;
    width: auto;
    max-width: 45%;
    object-fit: contain;
    object-position: bottom;
    transition: transform 0.3s ease;
}
.sponsored-card:hover .sponsored-img {
    transform: scale(1.03);
}
.sponsored-chevron {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background-color: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
}

/* TESTIMONIALS CAROUSEL */
/* purple glow behind the left side */
#testimonials {
    background: radial-gradient(
    55% 50% at 15% 50%,
    #382449,
    transparent
    );
}
/* fade out the cut-off card on the right */
.testimonials-glide .glide__track {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 120px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 120px), transparent);
}
.testimonial-card {
    background-color: #1E1724;
    min-height: 310px;
    height: auto;
    white-space: normal;
}
.testimonial-card p {
    line-height: 1.6;
    opacity: 0.85;
}
.testimonial-arrow {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease;
    &:hover {
        border-color: #CCA6FF;
    }
}
.testimonials-glide .glide__bullet {
    width: 0.75rem;
    height: 0.75rem;
    padding: 0;
    border-radius: 999px;
    background-color: #8346D4;
    opacity: 0.6;
    transition: all 0.3s ease;
}
.testimonials-glide .glide__bullet--active {
    width: 2rem;
    opacity: 1;
}

/* CONTACT */
/* arcs sit over the top/bottom edge of the photo and scale with it */
.ff-arc {
    position: absolute;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
}
/* darkens the right side of the photo behind the text (sits under the arcs), desktop only as text is below the photo on mobile */
.ff-contact-shade {
    display: none;
}
@media (min-width: 1024px) {
    .ff-contact-shade {
        display: block;
        position: absolute;
        inset: 0;
        background: linear-gradient(to right, transparent 45%, rgba(20,17,20,0.85) 62%, #141114 85%);
        pointer-events: none;
    }
}
.ff-contact-text {
    line-height: 1.6;
    max-width: 28rem;
}
/* mobile: centred, photo fades out at the bottom instead of the arc. T&C is a plain text link on all sizes */
.ff-contact-img {
    -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
    mask-image: linear-gradient(to bottom, #000 65%, transparent);
}
.ff-contact-arc-bottom {
    display: none;
}
.ff-contact-body {
    text-align: center;
    margin-top: -2rem; /* tuck up into the faded part of the photo */
    position: relative;
}
.ff-contact-text {
    margin-left: auto;
    margin-right: auto;
}
.ff-contact-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.ff-contact-tc {
    font-size: 0.875rem;
    color: #BDBDBD;
    text-decoration: underline;
    text-underline-offset: 4px;
}
@media (min-width: 1024px) {
    .ff-contact-img {
        -webkit-mask-image: none;
        mask-image: none;
    }
    .ff-contact-arc-bottom {
        display: block;
    }
    .ff-contact-body {
        text-align: left;
        margin-top: 0;
    }
    .ff-contact-text {
        margin-left: 0;
    }
    .ff-contact-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 2rem;
    }
}

/* LATEST NEWS */
/* mobile: photo as a banner above the centred title, "view all" button moves below the cards.
   md+: photo sits top-right behind the heading/cards, faded top/bottom (+ left/right on desktop) */
.ff-news {
    padding-top: 0;
}
/* negative margin cancels the .container padding so the mobile banner stays full-bleed */
.ff-news-img {
    width: calc(100% + 2em);
    max-width: none;
    height: auto;
    display: block;
    margin: 0 -1em 1.5rem;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 60%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 60%, transparent);
}
.ff-news-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
/* keep content above the absolutely positioned photo on md+ */
.ff-news-inner > :not(.ff-news-img) {
    position: relative;
}
.ff-news-grid {
    width: 100%;
    text-align: left;
}
.ff-news-more {
    order: 1;
    margin-top: 2.5rem;
}
@media (min-width: 768px) {
    .ff-news {
        padding-top: 5rem;
    }
    .ff-news-img {
        position: absolute;
        top: -5rem; /* cancels the section's top padding */
        right: 0;
        width: 100%;
        margin: 0;
        opacity: 0.5;
    }
    .ff-news-inner {
        align-items: flex-start;
        text-align: left;
    }
    .ff-news-more {
        order: 0;
    }
}
@media (min-width: 1024px) {
    .ff-news-img {
        width: 62%;
        max-width: 960px;
        opacity: 1;
        -webkit-mask-image:
            linear-gradient(to right, transparent, #000 45%, #000 85%, transparent),
            linear-gradient(to bottom, transparent, #000 15%, #000 60%, transparent 95%);
        -webkit-mask-composite: source-in;
        mask-image:
            linear-gradient(to right, transparent, #000 45%, #000 85%, transparent),
            linear-gradient(to bottom, transparent, #000 15%, #000 60%, transparent 95%);
        mask-composite: intersect;
    }
}
.ff-news-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 4rem;
}
@media (min-width: 640px) {
    .ff-news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .ff-news-grid { grid-template-columns: repeat(4, 1fr); margin-top: 13rem; }
}
.ff-news-card {
    position: relative;
    display: block;
    background-color: #1E1724;
    border: 1px solid #2E2634;
    border-radius: 1rem;
    overflow: hidden;
    transition: border-color 0.3s ease;
}
/* purple glow from the bottom, fades in on hover (same as .sponsored-card) */
.ff-news-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(70% 50% at 50% 100%, rgba(141,82,218,0.35), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.ff-news-card > * {
    position: relative;
}
.ff-news-card:hover {
    border-color: #4A3460;
}
.ff-news-card:hover::before {
    opacity: 1;
}
/* blank until real thumbnails are wired up */
.ff-news-thumb {
    aspect-ratio: 16 / 9;
    background-color: #2A2330;
}
.ff-news-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0.75rem 0;
}
.ff-news-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background-color: #CCA6FF;
    object-fit: cover;
    flex-shrink: 0;
}
.ff-news-author {
    color: #E0E0E0;
}

/* SINGLE FIGHTER (single-fighter-fund-post.php) */
/* mobile: cut-out in a faint box on top. desktop: purple glow behind the cut-out, image flush with the bottom of the section */
.ff-fighter {
    padding-top: 6rem; /* clears the absolute header */
    background: radial-gradient(45% 60% at 25% 40%, #382449, transparent);
}
.ff-fighter-img-wrap {
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 1.5rem;
    background: linear-gradient(to bottom, #2A1F36, #141114);
    overflow: hidden;
    padding-top: 2.5rem;
    margin-bottom: 2.5rem;
}
.ff-fighter-img {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    margin: 0 auto;
}
.ff-fighter-info {
    padding-bottom: 3rem;
}
/* yellow rule, runs off the right edge of the screen on desktop */
.ff-fighter-line {
    height: 2px;
    width: 70%;
    margin: 2rem 0;
}
.ff-fighter-arrows {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
}
.testimonial-arrow.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.ff-fighter-social svg {
    width: 2.25rem;
    height: 2.25rem;
    transition: transform 0.2s ease;
}
.ff-fighter-social:hover svg {
    transform: scale(1.08);
}
.ff-fighter-text p {
    line-height: 1.6;
    margin-bottom: 1em;
}
@media (min-width: 1024px) {
    .ff-fighter {
        padding-top: 7rem;
    }
    .ff-fighter-img-wrap {
        width: 50%;
        border: 0;
        border-radius: 0;
        background: none;
        padding-top: 0;
        margin-bottom: 0;
    }
    .ff-fighter-info {
        width: 50%;
        align-self: center;
        padding-bottom: 0;
    }
    .ff-fighter-line {
        /* stretch from the text column to the right screen edge */
        width: auto;
        margin-right: calc((100vw - min(1240px, 100vw)) / -2 - 1em);
        margin-left: 5rem;
    }
    .ff-fighter-arrows {
        justify-content: flex-end;
    }
    .ff-fighter-body {
        padding-left: 5rem;
        max-width: 34rem;
    }
}

/* SINGLE NEWS (single-fighter-fund-post.php, layout "News") */
.ff-article {
    padding: 6rem 0 5rem; /* top clears the absolute header */
    background: radial-gradient(40% 35% at 15% 10%, #382449, transparent);
}
.ff-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ff-news-grid--flush {
    margin-top: 0 !important; /* landing page pushes its grid down past the photo */
}
.ff-share a,
.ff-share button {
    display: block;
    width: 1.1rem;
    height: 1.1rem;
    opacity: 0.9;
    transition: opacity 0.2s ease, color 0.2s ease;
    &:hover {
        opacity: 1;
        color: #CCA6FF;
    }
}
.ff-article-title {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}
.ff-article-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}
.ff-article-text p {
    line-height: 1.6;
    margin-bottom: 1.5em;
}
@media (min-width: 1024px) {
    .ff-article-side {
        width: 200px;
        flex-shrink: 0;
    }
    .ff-article-main {
        max-width: 600px;
    }
    .ff-article-title {
        font-size: 2.25rem;
    }
}

/* LANDING POSTS (single-fighter-fund-post.php, layouts "News_Landing" / "Fighter_Landing") */
.ff-landing {
    padding: 8rem 0 5rem; /* top clears the absolute header */
}
.ff-filter {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    color: #BDBDBD;
    &.is-active {
        border: 2px solid #8D52DA;
        background-color: rgba(141,82,218,0.25);
        color: #fff;
    }
}
.ff-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #141114;
    transition: border-color 0.2s ease;
    &:focus-within {
        border-color: #8D52DA;
    }
    svg {
        width: 1rem;
        height: 1rem;
        flex-shrink: 0;
        opacity: 0.8;
    }
    input {
        flex: 1;
        background: transparent;
        border: 0;
        outline: 0;
        font-size: 0.875rem;
        color: inherit;
    }
}
@media (min-width: 1024px) {
    .ff-search {
        width: 400px;
    }
}

/* GENERAL (single-fighter-fund-post.php, layout "General") - plain editor content in a central column */
.ff-general {
    max-width: 48rem;
    margin: 0 auto;
}
/* editor content on news + general pages: brings back the lists/headings tailwind's reset strips (paragraphs are styled in SINGLE NEWS) */
.ff-article-text {
    ul, ol, table {
        margin-bottom: 1.5em;
    }
    h2, h3, h4 {
        font-weight: 700;
        line-height: 1.3;
        margin: 2em 0 0.75em;
        color: #fff;
    }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.05rem; }
    ul, ol {
        padding-left: 1.5em;
    }
    ul { list-style: disc; }
    ol { list-style: decimal; }
    li {
        line-height: 1.6;
        margin-bottom: 0.5em;
    }
    a {
        color: #CCA6FF;
        text-decoration: underline;
    }
    strong {
        font-weight: 700;
        color: #fff;
    }
}

/* FAQ */
.ff-faq {
    border: 2px solid #26202B;
    transition: border-color 0.3s ease;
    &:hover,
    &[open] {
        border-color: #8D52DA;
    }
    summary {
        list-style: none;
        &::-webkit-details-marker {
            display: none;
        }
    }
    .arrow {
        transition: transform 0.3s ease;
    }
    &[open] .arrow {
        transform: rotate(180deg);
    }
    p, div {
        line-height: 1.6;
    }
}

/* HEADER (adapted from academy.css) */
html {
    scroll-behavior: smooth;
}
@media (max-width: 1023px) {
    header .container {
        padding-left: 0;
        padding-right: 0;
    }
    header .navbar {
        font-size: 1.3em;
        width: 100%;
        pointer-events: none;
        opacity: 0;
        height: 0;
        overflow: hidden;
        transform-origin: top;
        transform: translateY(-10px) scale(0.98);
        transition: transform 0.3s ease;
    }
}
header.nav-open {
    background: #141114;
    .navbar {
        padding: 1em;
        margin-top: 1em;
        pointer-events: auto;
        opacity: 1;
        height: auto;
        overflow: visible;
        transform: translateY(0) scale(1);
    }
}
header .wpml-ls-legacy-dropdown {
    width: auto;
    max-width: 130px;
    margin: 0 auto;
}
@media only screen and (min-width: 1024px) {
    header .wpml-ls-item-toggle span {
        display: none;
    }
    header .wpml-ls-legacy-dropdown .wpml-ls-sub-menu {
        width: 120px;
        left: auto;
        right: 0;
    }
}

/* APPLY MODAL (Google Form embed, built in fighterfund.js) */
.ff-apply-modal {
    width: min(100% - 2rem, 720px);
    height: min(100% - 2rem, 900px);
    max-width: none;
    max-height: none;
    padding: 0;
    border: 2px solid #8D52DA;
    border-radius: 1.5rem;
    background: #211C25;
    overflow: hidden;
    flex-direction: column;
    /* fade in/out; display + overlay keep it rendered until the fade-out ends (no-op in browsers without support) */
    opacity: 0;
    transition: opacity 0.25s ease, display 0.25s allow-discrete, overlay 0.25s allow-discrete;
    &[open] {
        display: flex;
        opacity: 1;
        @starting-style {
            opacity: 0;
        }
    }
    &::backdrop {
        background: rgba(20, 17, 20, 0.85);
        opacity: 0;
        transition: opacity 0.25s ease, display 0.25s allow-discrete, overlay 0.25s allow-discrete;
    }
    &[open]::backdrop {
        opacity: 1;
        @starting-style {
            opacity: 0;
        }
    }
    iframe {
        width: 100%;
        flex: 1;
        border: 0;
        display: block;
    }
}
.ff-apply-fallback {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.79rem;
    color: #CCA6FF;
    text-decoration: underline;
}
.ff-apply-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: #DFFD51;
    color: #141114;
    font-size: 1.75rem;
    line-height: 1;
    transition: transform 0.2s ease;
    &:hover {
        transform: scale(1.05);
    }
}
body:has(.ff-apply-modal[open]) {
    overflow: hidden;
}
