/*
 * Hand-written additions loaded after app.css (no Sass source in the theme).
 * Masthead call to action - added Nov 2026 for Feed a Friend for a Fiver.
 */
.masthead__ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px 30px;
    margin-top: 30px;
}

.masthead__ctas .button {
    margin-bottom: 0;
}

/* Secondary button: same rough button shape as the theme's pink button, in black */
.masthead__ctas a.button.masthead__secondary-cta {
    background-image: url(../img/button-tertiary.svg);
    text-decoration: none;
}

.masthead__ctas a.button.masthead__secondary-cta:hover,
.masthead__ctas a.button.masthead__secondary-cta:focus {
    background-image: url(../img/button-secondary.svg);
}

/* app.css hides the masthead sub title on mobile - show it when the hero carries a call to action */
@media screen and (max-width: 39.99875em) {
    .masthead--has-cta .masthead__sub-title {
        display: block;
        margin: 25px 0 0;
        font-family: trumpsoftpro, "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
        font-weight: 700;
        font-size: 1.375rem;
        line-height: 1.75rem;
        color: #fff;
    }

    .masthead--has-cta .masthead__text {
        width: 100%;
    }
}

@media print, screen and (min-width: 40em) {
    .masthead--has-cta .masthead__sub-title {
        margin-top: 35px;
    }

    .masthead__ctas {
        margin-top: 40px;
    }
}

/*
 * Hero with a call to action: taller image, text sits at the bottom so faces in the photo stay clear.
 * Bottom padding allows for the quick links box, which overlaps the masthead by 50px on tablet
 * and 200px on desktop (desktop overlap is on the right only, clear of the text column).
 */
.masthead--has-cta {
    display: flex;
    align-items: flex-end;
    min-height: 600px;
    padding-bottom: 40px;
    background-position: center 50%;
}

@media print, screen and (min-width: 40em) {
    .masthead--has-cta {
        min-height: 720px;
        padding-bottom: 90px;
    }
}

@media screen and (min-width: 75em) {
    .masthead--has-cta {
        min-height: min(52vw, 900px);
        padding-bottom: 40px;
    }
}

/*
 * Black highlight behind each word of the title and sub title (app.js wraps words in spans via .title-wrap).
 * app.css uses fixed pixel padding with a -35px overlap, which at these smaller sizes made each word's
 * black box cover the end of the previous word. Em-based values keep the boxes joined without covering text.
 */
.masthead--has-cta .title-wrap span {
    padding: .12em .2em;
    margin: 0 -.25em 0 0;
}

/*
 * Smaller title and wider text column for the call-to-action hero, so the text runs
 * along the bottom of the photo in fewer lines instead of climbing up over faces.
 * Desktop column stays under 60% to keep clear of the quick links box (40%, floated right).
 */
@media print, screen and (min-width: 40em) {
    .masthead--has-cta .masthead__text {
        width: 85%;
    }

    /* Scales with the screen so the title stays on one line */
    .masthead--has-cta .masthead__title {
        font-size: clamp(3rem, 7.4vw, 5rem);
        line-height: 1;
    }

    .masthead--has-cta .masthead__sub-title {
        font-size: 1.875rem;
        line-height: 2.5rem;
    }
}

@media screen and (min-width: 75em) {
    .masthead--has-cta .masthead__text {
        width: 57%;
    }

    .masthead--has-cta .masthead__title {
        font-size: clamp(3.75rem, 5.2vw, 6rem);
        line-height: 1;
    }

    .masthead--has-cta .masthead__sub-title {
        font-size: 2.125rem;
        line-height: 2.75rem;
    }
}
