﻿/* Holiday 2026 /holiday */

/***********************
 *  //   General   //  *
 ***********************/

/* Variables */
:root {
    --section-shading: #fef2f2;
    --sticky-form-runway-width: 390px;
}

.shaded-section {
    background: var(--section-shading);
}

.shaded-section-bottom-only {
    background: linear-gradient(
        to top,
        var(--section-shading),
        var(--section-shading) 30%,
        white 30%,
        white
    );
}

@media (min-width: 768px) {
    .shaded-section-desktop-only {
        background: var(--section-shading);
    }
}

/* Containers */
@media (min-width: 768px) {
    .container {
        padding-right: var(--sticky-form-runway-width);
    }

    .landing-page-container {
        position: relative;
    }
}

/* Headings */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    margin-bottom: 0.75em;
}

h2 {
    font-size: 2rem;
    line-height: 1.2;

    @media (min-width: 1024px) {
        font-size: 2.4375rem;
    }
}

/* Images */
.basic-image-container {
    font-size: 0;
    margin: 0;
    padding: 0;
}

/**********************
 *  //   Header   //  *
 **********************/
header {
    .header-inner {
        @media (min-width: 768px) {
            &:has(.header-button-container):not(.header.desktop-only-btn) {
                padding-top: 20px;
            }
        }

        &.container {
            display: flex;
            height: var(--mobile-header-height-btn);
            justify-content: space-between;

            @media (min-width: 768px) {
                align-items: center;
                height: 100px;
                padding: 20px 30px;
                padding-right: var(--sticky-form-runway-width);
            }

            .logo-wrapper,
            .language-switch-container {
                align-items: center;
                display: flex;
                height: 77px;
                margin: 0;
                max-height: 77px;
            }

            .logo-wrapper {
                .partner-logo {
                    margin-left: 20px;

                    img {
                        height: 40px;
                    }
                }
            }

            .header-button-container {
                bottom: 20px;
                left: 0;
                margin: 0 20px;
                position: absolute;
                width: calc(100% - 40px);

                @media (min-width: 768px) {
                    display: none;
                }

                a {
                    &.btn {
                        &.btn-primary {
                            width: 100%;
                        }
                    }
                }
            }
        }
    }
}

/***************************
 *  //   Hero Banner   //  *
 ***************************/
.hero-banner-wrapper {
    background: url(https://cdn.redcross.ca/prodmedia/crc/azure/campaign/holiday/2026/holiday-banner-background-filler.jpg);
    height: 320px;
    position: relative;

    @media (min-width: 600px) {
        height: 400px;
    }

    .banner-background {
        height: 320px;
        left: 50%;
        max-width: 1030px;
        overflow: hidden;
        position: absolute;
        translate: -50% -0%;
        width: 100%;

        @media (min-width: 600px) {
            height: 400px;
        }

        .basic-image {
            height: 150%;
            margin-top: -100px;
            object-fit: cover;
            object-position: 0% 20%;

            @media (min-width: 500px) {
                height: 180%;
                margin-top: -120px;
                object-position: 0 20%;
            }

            @media (min-width: 600px) {
                height: 220%;
                margin-top: -180px;
                object-position: 15% 20%;
            }

            @media (min-width: 768px) {
                height: 250%;
                margin-top: -200px;
                object-position: 40% 40%;
            }

            @media (min-width: 1024px) {
                object-position: 24% 40%;
            }
        }

        .basic-image-overlay {
            background: linear-gradient(
                360deg,
                rgba(0, 0, 0, 0.64) 39.13%,
                rgba(102, 102, 102, 0) 100%
            );
            height: 100%;
            left: 0;
            mix-blend-mode: multiply;
            position: absolute;
            top: 0;
            width: 100%;
        }

        .basic-image-credit {
            color: var(--white);
            font-size: 10px;
            padding: 10px;
            position: absolute;
            right: 0;
            top: 0;

            @media (min-width: 768px) {
                bottom: 0;
                right: unset;
                top: unset;
            }
        }
    }

    .container {
        color: var(--white);
        font-weight: 600;
        position: relative;
        top: 0;

        h1 {
            anchor-name: --heading;
            font-family: Arial;
            font-size: 40px;
            line-height: 1;
            margin-bottom: 20px;
            padding-left: 21px;
            text-align: left;

            @media (min-width: 400px) {
                font-size: 45px;
                padding-left: 23px;
            }

            @media (min-width: 600px) {
                font-size: 60px;
                padding-left: 31px;
            }

            @media (min-width: 768px) {
                margin-top: 20px;
            }

            @media (min-width: 1024px) {
                font-size: 65px;
                padding-left: 33.5px;
            }

            figure {
                left: anchor(left);
                position: absolute;
                position-anchor: --heading;
                top: calc(anchor(top) + 5px);

                @media (min-width: 400px) {
                    top: calc(anchor(top) + 6px);
                }
                
                @media (min-width: 600px) {
                    top: calc(anchor(top) + 7px);
                }

                @media (min-width: 1024px) {
                    top: calc(anchor(top) + 8px);
                }

                img {
                    width: 30px;

                    @media (min-width: 400px) {
                        width: 33px;
                    }
    
                    @media (min-width: 600px) {
                        width: 44px;
                    }
                    
                    @media (min-width: 1024px) {
                        width: 48px;
                    }
                }
            }
        }

        p {
            font-size: 1rem;

            @media (min-width: 600px) {
                font-size: 1.3rem;
                max-width: 400px;
            }

            @media (min-width: 1024px) {
                font-size: 1.6875rem;
                max-width: unset;
            }
        }
    }
}

html[lang|=fr] {
    .hero-banner-wrapper {
        .container {   
            h1 { 
                @media (min-width: 400px) {
                    font-size: 40px;
                    padding-left: 21px;
                }

                @media (min-width: 600px) {
                    font-size: 55px;
                    padding-left: 31px;
                }
                
                @media (min-width: 768px) {
                    font-size: 50px;
                    padding-left: 27px;
                    margin-top: 20px;
                }

                @media (min-width: 900px) {
                    padding-left: 31px;
                    font-size: 60px;
                }
                
                figure {
                    @media (min-width: 400px) {
                        top: calc(anchor(top) + 5px);
                    }
                    
                    @media (min-width: 600px) {
                        top: calc(anchor(top) + 5px);
                    }
                    
                    @media (min-width: 768px) {
                        top: calc(anchor(top) + 6px);
                    }

                    @media (min-width: 900px) {
                        top: calc(anchor(top) + 7px);
                    }
    
                    img {
                        @media (min-width: 400px) {
                            width: 30px;
                        }
        
                        @media (min-width: 600px) {
                            width: 43px;
                        }
                        
                        @media (min-width: 768px) {
                            width: 38px;
                        }
        
                        @media (min-width: 900px) {
                            width: 44px;
                        }
                    }
                }
            }
    
            p {
                font-size: 1rem;
    
                @media (min-width: 600px) {
                    font-size: 1.3rem;
                    max-width: 400px;
                }

                @media (min-width: 768px) {
                    font-size: 1.1rem;
                    margin-top: 20px;
                }
    
                @media (min-width: 1024px) {
                    font-size: 1.6875rem;
                    max-width: unset;
                }
            }
        }
    }    
}

/********************
 *  //   Form   //  *
 ********************/
.donation-form-section {
    @media (min-width: 768px) {
        height: 100%;
        position: absolute;
        top: 0;
        width: 100%;
        visibility: hidden;
        z-index: 99;
    }

    .container {
        padding-top: 0;

        @media (min-width: 768px) {
            height: 100%;
            padding-right: 30px;
            padding-top: 0;
            text-align: right;
        }

        .donation-form {
            background: var(--white);
            box-shadow: 0px 4.76px 19.05px 0px #00000059;
            margin: -62px auto 0;
            max-width: 330px;
            position: relative;

            @media (min-width: 768px) {
                display: inline-block;
                position: sticky;
                top: 0;
                visibility: visible;
            }

            .donation-form-title {
                background: var(--primary-red);
                color: var(--white);
                font-weight: 600;
                padding: 20px;
                text-align: center;

                @media (min-width: 768px) {
                    font-size: 22px;
                    font-weight: 700;
                }
            }

            .donation-form-element {
                background-image: url(https://cdn.redcross.ca/prodmedia/crc/azure/campaign/spin-1s-50px.svg);
                background-position: center;
                background-repeat: no-repeat;
                min-height: 400px;
            }
        }
    }
}

/*********************
 *  //   Video   //  *
 *********************/
.section-video {
    .container {
        padding-bottom: 0;
        .video-wrapper {
            margin: 30px -30px 0;

            @media (min-width: 768px) {
                margin: 30px 0 0;
            }
        }
    }
}

/*************************
 *  //   Countdown   //  *
 *************************/
.section-countdown {
    .container {
        padding-bottom: 35px;
        padding-top: 30px;

        .countdown-wrapper {
            margin: auto;
            max-width: 400px;
            position: relative;

            @media (min-width: 768px) {
                background: var(--white);
                border: 1px solid #d3d3d3;
                max-width: unset;
                padding: 20px 20px 35px;
                width: 100%;
            }

            .countdown-timer {
                .countdown {
                    display: grid;
                    grid-template-columns: 1fr 1fr 1fr 1fr;
                    font-size: 0.6rem;
                    font-weight: 700;
                    text-align: center;
                    text-transform: uppercase;

                    span:has(> .number) {
                        position: relative;

                        .number {
                            color: var(--primary-red);
                            display: block;
                            font-size: 2.5rem;
                            font-weight: 400;

                            @media (min-width: 768px) {
                                font-size: 3.5rem;
                            }
                        }

                        &:not(:last-child) .number:after {
                            content: ":";
                            position: absolute;
                            right: 0;
                            translate: 50%;
                        }
                    }
                }
            }

            .countdown-card {
                background: var(--primary-red);
                border-radius: 4px;
                color: var(--white);
                display: inline-block;
                font-size: 0.6rem;
                font-weight: 600;
                left: 50%;
                padding: 8px 15px;
                position: absolute;
                text-transform: uppercase;
                translate: -50% 50%;

                .countdown-card-icon {
                    display: inline-block;
                    font-size: 0.7rem;
                    margin-right: 3px;

                    img {
                        vertical-align: middle;
                        width: 20px;
                    }
                }
            }
        }
    }
}

/***********************
 *  //   Mid CTA   //  *
 ***********************/
.section-mid-cta {
    padding: 30px 0;

    a {
        margin-top: 20px;
    }
}

/************************
 *  //   Timeline   //  *
 ************************/
.section-timeline {
    --connector-length: 70px;

    @media (min-width: 1024px) {
        --connector-length: 100px;
    }

    .container {
        h2:first-of-type {
            opacity: 0;
            translate: 50%;

            &.animate {
                animation: fadeInAndUp 1s ease-out;
                animation-fill-mode: forwards;
            }
        }

        .timeline-items-container {
            margin-bottom: 30px;
            margin-left: 10px;
            padding-left: calc(var(--connector-length) + 30px);
            position: relative;

            &.animate {
                &::before {
                    animation: popIn 0.5s ease-out;
                    animation-fill-mode: forwards;
                }
            }

            &::before,
            &::after {
                background: var(--primary-red);
                border-radius: 50%;
                content: "";
                display: block;
                font-size: 0;
                height: 12px;
                left: 0;
                position: absolute;
                translate: calc(-50% + 1px);
                width: 12px;
            }

            &::before {
                scale: 0;
                top: 0;
            }

            &::after {
                bottom: -9px;
            }

            .timeline-item {
                max-width: 350px;
                padding: 80px 0 20px;
                position: relative;

                &:last-child {
                    padding-bottom: 100px;
                }

                .timeline-item-progress {
                    border-left: 2px solid var(--primary-red);
                    height: 0;
                    left: calc(0px - calc(var(--connector-length) + 30px));
                    position: absolute;
                    top: 0;
                }

                .timeline-item-connector {
                    border-top: 2px solid var(--primary-red);
                    left: calc(0px - calc(var(--connector-length) + 30px));
                    position: absolute;
                    top: 100px;
                    width: 0;

                    @media (min-width: 1024px) {
                        top: 110px;
                    }

                    .base-point,
                    .target-point {
                        background: var(--primary-red);
                        border-radius: 50%;
                        font-size: 0;
                        position: absolute;
                        scale: 0;
                    }

                    .base-point {
                        height: 30px;
                        left: 0;
                        translate: -50% calc(-50% - 1px);
                        width: 30px;

                        &::before {
                            background: var(--white);
                            border-radius: 50%;
                            content: "";
                            font-size: 0;
                            height: 15px;
                            left: 50%;
                            position: absolute;
                            top: 50%;
                            translate: -50% -50%;
                            width: 15px;
                        }
                    }

                    .target-point {
                        height: 10px;
                        right: 0;
                        translate: 50% calc(-50% - 1px);
                        width: 10px;
                    }
                }

                .timeline-item-content {
                    opacity: 0;
                }

                &.animate {
                    .timeline-item-progress {
                        animation: extendDown 1s linear;
                        animation-fill-mode: forwards;
                    }

                    .timeline-item-connector {
                        animation: extendRight 0.5s ease-out;
                        animation-delay: 0.7s;
                        animation-fill-mode: forwards;

                        .base-point,
                        .target-point {
                            animation: popIn 0.5s ease-out;
                            animation-delay: 0.7s;
                            animation-fill-mode: forwards;
                        }

                        .target-point {
                            animation-delay: 1s;
                            animation-fill-mode: forwards;
                        }
                    }

                    .timeline-item-content {
                        animation-delay: 0.25s;
                        animation: slideIn 0.5s ease-out;
                        animation-fill-mode: forwards;
                    }
                }

                h3 {
                    font-size: 1.1875rem;
                    line-height: 120%;
                    margin-bottom: 10px;

                    @media (min-width: 1024px) {
                        font-size: 1.625rem;
                    }

                    span {
                        display: block;
                        font-size: 1.375rem;

                        @media (min-width: 1024px) {
                            font-size: 1.75rem;
                        }
                    }
                }

                p:last-of-type {
                    margin-bottom: 0;
                }
            }
        }
    }
}

@keyframes popIn {
    0% {
        scale: 0;
    }
    50% {
        scale: 1.2;
    }
    100% {
        scale: 1;
    }
}

@keyframes slideIn {
    0% {
        opacity: 0;
        translate: -10%;
    }
    100% {
        opacity: 1;
        translate: 0;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeInAndUp {
    0% {
        opacity: 0;
        translate: 0 50%;
    }
    100% {
        opacity: 1;
        translate: 0;
    }
}

@keyframes extendDown {
    0% {
        height: 0;
    }
    100% {
        height: 100%;
    }
}

@keyframes extendRight {
    0% {
        width: 0;
    }
    100% {
        width: var(--connector-length);
    }
}

/************************
 *  //   Carousel   //  *
 ************************/
.section-carousel {
    .container {
        anchor-name: --carousel;
        padding-top: 150px;

        @media (min-width: 450px) {
            padding-top: 230px;
        }

        .carousel-with-facts {
            max-width: unset;
            position: unset;
            width: 100%;

            .carousel-slide {
                display: none;
                max-width: unset;

                &.carousel-slide-active {
                    display: block;
                    width: 100%;
                }

                .carousel-slide-image {
                    left: anchor(left);
                    position: absolute;
                    position-anchor: --carousel;
                    top: anchor(top);

                    .basic-image-container {
                        height: 450px;
                        max-width: 1080px;
                        overflow: hidden;
                        width: 100%;

                        img {
                            box-shadow: none;
                            object-fit: cover;
                            object-position: left;
                        }

                        .basic-image-credit {
                            color: var(--white);
                            font-size: 10px;
                            padding: 10px;
                            position: absolute;
                            right: 0;
                            text-shadow: 1px 1px 5px #000;
                            top: 0;

                            @media (min-width: 768px) {
                                right: unset;
                                left: 0;
                            }
                        }
                    }
                }

                .carousel-slide-text {
                    anchor-name: --slide-text;
                    background: var(--white);
                    border: 1px solid #efefef;
                    box-shadow: 0px 1px 8.7px 0px #00000044;
                    padding: 25px;
                    padding-top: 100px;
                    position: relative;
                    text-align: left;
                    transition: none;
                    z-index: 2;

                    @media (min-width: 768px) {
                        padding-bottom: 80px;
                        padding-top: 25px;
                    }

                    .carousel-slide-sub-text {
                        font-weight: 700;
                        text-transform: uppercase;

                        @media (min-width: 900px) {
                            margin-bottom: 20px;                                
                        }

                        span:first-child {
                            color: var(--primary-red);
                            display: block;

                            @media (min-width: 900px) {
                                display: inline;                                
                            }
                        }

                        span:last-child {
                            @media (min-width: 900px) {
                                &::before {
                                    content: '•\00a0';
                                    display: inline-block;
                                    margin: 0 5px;
                                }
                            }
                        }
                    }

                    h3 {
                        font-size: 39px;
                        margin-top: 10px;
                        text-transform: none;
                    }

                    .carousel-slide-facts {
                        margin-top: 30px;

                        .carousel-fact {
                            border-top: 1px solid #ddd;
                            display: grid;
                            gap: 15px;
                            grid-template-columns: auto 1fr;
                            padding: 20px 0;

                            figure {
                                height: 35px;
                                width: 35px;

                                img {
                                    height: 100%;
                                    width: 100%;
                                    object-fit: contain;
                                    object-position: center;
                                }
                            }

                            h4 {
                                color: var(--primary-red);
                                font-size: 1.1875rem;
                                line-height: 1em;
                                margin: 0;
                            }

                            p {
                                margin: 0;
                            }
                        }
                    }
                }
            }

            .carousel-dots-container {
                display: flex;
                gap: 5px;
                padding: 35px 25px;
                position-anchor: --slide-text;
                top: anchor(top);
                z-index: 3;

                @media (min-width: 768px) {
                    gap: 10px;
                }

                @media (min-width: 768px) {
                    bottom: anchor(bottom);
                    top: unset;
                }

                .carousel-dot {
                    border-radius: 2px;
                    height: 5px;
                    width: 32px;

                    @media (min-width: 768px) {
                        width: 52px;
                    }
                }
            }

            .carousel-previous,
            .carousel-next {
                align-items: center;
                border-radius: 50%;
                box-shadow: 0px 0px 10px -1px #00000040;
                display: grid;
                height: 45px;
                justify-content: center;
                position-anchor: --slide-text;
                top: calc(anchor(top) + 25px);
                transition: none;
                width: 45px;

                svg {
                    width: 22px;
                }

                &:hover {
                    background: white;

                    svg path {
                        fill: var(--primary-red);
                    }
                }

                &:focus {
                    outline-color: #ccc;
                }
            }

            .carousel-next {
                right: calc(anchor(right) + 25px);

                @media (min-width: 768px) {
                    bottom: calc(anchor(bottom) + 25px);
                    top: unset;
                }
            }

            .carousel-previous {
                left: unset;
                right: calc(anchor(right) + 90px);

                @media (min-width: 768px) {
                    bottom: calc(anchor(bottom) + 25px);
                    top: unset;
                }

                img {
                    rotate: 180deg;
                }
            }
        }
    }
}

/*******************************
 *  //   Generous Donors   //  *
 *******************************/
.section-generous-donors {
    text-align: center;

    @media (min-width: 768px) {
        text-align: left;
    }

    .container {
        display: flex;
        flex-direction: column-reverse;
        flex-wrap: wrap;
        padding-bottom: 150px;

        img {
            margin-top: 20px;
            max-width: 300px;
        }
    }
}

/*******************************
 *  //   Bottom CTA   //  *
 *******************************/
.section-bottom-cta {
    background: var(--primary-red);
    color: var(--white);
    text-align: center;

    @media (min-width: 768px) {
        text-align: left;
    }

    .container {
        padding-bottom: 100px;

        figure {
            margin: -135px auto 20px;
            width: 230px;

            @media (min-width: 768px) {
                margin: -135px 0 20px;
            }
        }

        a {
            border: 1px solid var(--white);
            margin-top: 30px;
        }
    }
}

/**********************
 *  //   Footer   //  *
 **********************/
footer {
    margin-top: 0 !important;
}

@media (min-width: 768px) {
    .container.footer-container {
        padding-right: var(--sticky-form-runway-width);
    }

    .footer .footer-social {
        max-width: 500px;
    }

    .footer-social > ul {
        gap: unset;
        justify-content: space-evenly;
    }
}

/************************
 *  //   A/B Test   //  *
 ************************/
.test-version {
    .hide-for-test {
        display: none !important;
    }

    .donation-form-section {
        background: var(--section-shading);
    }

    .section-generous-donors {
        .container {
            padding: 30px 30px 70px;

            @media (min-width: 768px) {
                padding: 50px var(--sticky-form-runway-width) 70px 30px;
            }
        }
    }
}
