/*
 * Competition landing page
 *
 * Loaded on top-level competition posts via template-competition-landing.php.
 * Enqueued from functions.php (pca_enqueue_competition_landing_css).
 */

.competitions-template-default .nectar_hook_global_section_footer .wpb_row {
    display: none;
}

.competitions-template-default .nectar_hook_global_section_footer .wpb_row.footer-copyright {
    display: block;
}

.competitions-template-default div#header-outer.at-top {
    box-shadow: none !important;
}

.competition-landing {
    position: relative;
    min-height: calc(100vh - 91px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 175px 50px 100px;
    background-color: #1F1933;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

div#ajax-content-wrap:has(.competition-landing__content) main.competition-landing {
    min-height: 100vh;
}

.competition-landing__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #1f19336b 0%, #181427 100%);
    z-index: 0;
    backdrop-filter: blur(7px);
}

.competition-landing__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
}

.competition-landing__card {
    background: #ffffff;
    border-radius: 15px;
    padding: 45px 40px;
    gap: 10px;
    max-width: 550px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 80px rgb(0 0 0 / 28%);
    box-sizing: border-box;
    display: grid;
}

.competition-landing__logo {
    margin-bottom: 0;
}

.competition-landing__logo-image {
    max-width: 160px;
    max-height: 90px;
    object-fit: contain;
    height: auto;
    display: inline-block;
    margin-bottom: -5px;
}

body h1.competition-landing__title {
    margin: 0;
    color: #1F1933;
    font-size: 42px !important;
    line-height: 1 !important;
}

.competition-landing__intro {
    margin: 0 auto;
    color: #3a3550;
    font-size: 14.5px;
    line-height: 1.5;
    max-width: 54ch;
    letter-spacing: -0.01em;
}

.competition-landing__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.competition-landing__updated {
    margin: 7.5px 0 -15px;
    color: #9a95a8;
    font-size: 12.5px;
    letter-spacing: -0.01em;
    text-transform: capitalize;
}

.competition-landing__button {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 17px;
    width: 100%;
    font-family: 'owners-narrow';
    text-decoration: none;
    text-transform: uppercase;
    background: var(--pca-navy);
    border-color: var(--pca-navy);
    color: #ffffff;
    border: 1.5px solid #9a95a81c;
    transition: all 0.15s ease !important;
}

.competition-landing__button:last-child {
    background: var(--pca-light-blue);
    border-color: var(--pca-light-blue);
}

.competition-landing__button:hover {
    color: #ffffff;
    opacity: 0.8;
    cursor: pointer;
}

.competition-landing__button--disabled {
    background: #f6f6f6;
    color: #9a95a8;
    cursor: not-allowed;
    pointer-events: none;
}

.competition-landing__button--disabled:hover {
    background: #e4e2ea;
    transform: none;
}


/* -------------------------------------------------------------------------
 * Animated background ("Ken Burns" slow zoom + drift)
 *
 * The photo lives on an inherited ::before layer so we can move it with a
 * GPU transform without disturbing the frosted overlay or the card. Only
 * this layer animates; overlay and card are bumped above it in the stack.
 * ---------------------------------------------------------------------- */
.competition-landing {
    overflow: hidden;
}

.competition-landing::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: inherit;   /* pulls the inline competition_background */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
    animation: competitionKenBurns 22s linear infinite alternate;
}

/* Keep the frosted overlay and card above the animating photo layer. */
.competition-landing__overlay {
    z-index: 1;
}
.competition-landing__inner {
    z-index: 2;
}

@keyframes competitionKenBurns {
    from {
        transform: scale(1.02);
    }
    to {
        transform: scale(1.3);
    }
}

/* Respect users who prefer reduced motion: hold a still, gently zoomed frame. */
@media (prefers-reduced-motion: reduce) {
    .competition-landing::before {
        animation: none;
        transform: scale(1.05);
    }
}









/* 999 */
@media screen and (max-width: 999px) {
    .competition-landing {
        padding: 135px 25px 75px;
        min-height: calc(100vh - 133.5px);
    }
    
    .competition-landing__card {
        max-width: 100%;
    }
    
    .competition-landing__logo-image {
        max-width: 130px;
        max-height: 85px;
    }
    
    body h1.competition-landing__title {
        font-size: 36px !important;
    }
    
    .competition-landing__intro {
        font-size: 14.5px;
        max-width: 100%;
    }
}



/* 479 */
@media screen and (max-width: 479px) {
    .competition-landing {
        padding: 160px 18px 115px;
    }
    
    .competition-landing__card {
        max-width: 100%;
    }
    
    .competition-landing__logo-image {
        max-width: 110px;
        max-height: 70px;
        margin: 0px;
    }
    
    body h1.competition-landing__title {
        font-size: 30px !important;
    }
    
    .competition-landing__intro {
        font-size: 13px;
        max-width: 100%;
    }
    .competition-landing__card {
        padding: 35px 22px;
    }
    .competition-landing__title {
        font-size: 1.6rem;
    }
    .competition-landing__buttons {
        flex-direction: column;
    }
    .competition-landing__button {
        width: 100%;
        padding: 12px 25px;
        font-size: 16px;
    }
}