/* ---------- Page chrome ---------- */
.home-page .body-content {
    margin-bottom: 0;
    padding-top: 0;
}

/* ---------- Hero: contained carousel with the brewery strip below it ---------- */
.hero-section {
    padding: 28px 15px 32px;
    background-color: var(--surface-alt);
}

.hero-inner {
    max-width: 1600px;
    margin: 0 auto;
}

.brew-strip {
    display: block;
    margin-top: 14px;
    padding: 12px 15px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: center;
    color: rgba(255, 255, 255, .85);
    background-color: var(--brand-navy-dark);
    border-radius: 8px;
    transition: background-color .2s;
}

.brew-strip strong {
    font-weight: 700;
    color: #f59300;
}

.brew-arrow {
    display: inline-block;
    margin-left: 4px;
    color: #f59300;
    transition: transform .2s;
}

.brew-strip:hover, .brew-strip:focus {
    color: white;
    text-decoration: none;
    background-color: #0d2843;
}

.brew-strip:hover .brew-arrow {
    transform: translateX(4px);
}

/* ---------- Hero carousel ---------- */
.hero-carousel {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(10, 32, 54, .18);
}

/* 7/16 of the width matches the fill-1600x700 rendition, so wide screens show the whole image */
.hero-carousel .item {
    height: clamp(340px, 43.75vw, 700px);
    background-color: var(--brand-navy-dark);
}

.hero-carousel .item > .hero-img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 32, 54, .92) 0%, rgba(10, 32, 54, .85) 35%, rgba(10, 32, 54, .55) 55%, rgba(10, 32, 54, 0) 82%);
}

.hero-carousel .hero-caption {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 72px;
    width: min(560px, calc(100% - 144px));
    padding: 0;
    text-align: left;
    text-shadow: 0 1px 3px rgba(10, 32, 54, .6);
    transform: translateY(-50%);
}

.hero-caption::before {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    margin-bottom: 18px;
    background-color: var(--primary-red);
}

.hero-carousel .hero-caption h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.12;
    color: white;
}

.hero-caption p {
    max-width: 500px;
    margin: 0 0 22px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    color: white;
}

.hero-carousel .hero-caption .btn {
    padding: 10px 24px;
    font-size: 15px;
}

/* Crossfade between slides instead of Bootstrap's horizontal slide */
.hero-carousel.c-fade .carousel-inner > .item {
    transition: opacity .7s ease-in-out;
}

.hero-carousel.c-fade .carousel-inner > .item,
.hero-carousel.c-fade .carousel-inner > .item.next,
.hero-carousel.c-fade .carousel-inner > .item.prev,
.hero-carousel.c-fade .carousel-inner > .item.active.left,
.hero-carousel.c-fade .carousel-inner > .item.active.right {
    left: 0;
    transform: none;
}

.hero-carousel.c-fade .carousel-inner > .item.next,
.hero-carousel.c-fade .carousel-inner > .item.prev,
.hero-carousel.c-fade .carousel-inner > .item.active.left,
.hero-carousel.c-fade .carousel-inner > .item.active.right {
    opacity: 0;
}

.hero-carousel.c-fade .carousel-inner > .item.active,
.hero-carousel.c-fade .carousel-inner > .item.next.left,
.hero-carousel.c-fade .carousel-inner > .item.prev.right {
    opacity: 1;
}

.hero-carousel .carousel-control {
    z-index: 12;
    width: 64px;
    text-shadow: none;
    opacity: 1;
}

.hero-carousel .carousel-control.left,
.hero-carousel .carousel-control.right {
    background-image: none;
}

.hero-carousel .carousel-control:hover .glyphicon,
.hero-carousel .carousel-control:focus .glyphicon {
    background-color: var(--primary-red);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}

.hero-carousel .carousel-control .glyphicon {
    top: 50%;
    right: auto;
    left: 50%;
    width: 42px;
    height: 42px;
    margin-top: -21px;
    margin-left: -21px;
    font-size: 16px;
    line-height: 42px;
    border-radius: 50%;
    background-color: rgba(10, 32, 54, .6);
    transition: background-color .2s, box-shadow .2s;
}

.hero-carousel .carousel-indicators {
    bottom: 12px;
}

.hero-carousel .carousel-indicators li,
.hero-carousel .carousel-indicators .active {
    width: 28px;
    height: 20px;
    margin: 0 3px;
    border: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-radius: 2px;
    background-clip: padding-box;
    background-color: rgba(255, 255, 255, .45);
}

.hero-carousel .carousel-indicators .active {
    background-color: var(--primary-red);
}

@media (max-width: 767px) {
    .hero-section {
        padding: 16px 12px 20px;
    }

    .hero-carousel {
        border-radius: 8px;
    }

    .hero-carousel .item {
        height: 440px;
    }

    /* Darken from the top down so the photo shows above the bottom-anchored caption */
    .hero-overlay {
        background: linear-gradient(180deg, rgba(10, 32, 54, .25) 0%, rgba(10, 32, 54, .6) 30%, rgba(10, 32, 54, .92) 70%);
    }

    .hero-carousel .hero-caption {
        top: auto;
        bottom: 72px;
        left: 22px;
        width: calc(100% - 44px);
        transform: none;
    }

    .hero-caption::before {
        width: 40px;
        margin-bottom: 12px;
    }

    .hero-carousel .hero-caption h2 {
        margin-bottom: 10px;
        font-size: 25px;
    }

    .hero-caption p {
        display: -webkit-box;
        margin-bottom: 16px;
        overflow: hidden;
        font-size: 15px;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .hero-carousel .hero-caption .btn {
        padding: 9px 18px;
        font-size: 15px;
    }

    /* Arrows sit in the bottom corners, level with the indicators, so the caption gets the full width */
    .hero-carousel .carousel-control {
        top: auto;
        bottom: 16px;
        width: 34px;
        height: 34px;
    }

    .hero-carousel .carousel-control.left {
        left: 16px;
    }

    .hero-carousel .carousel-control.right {
        right: 16px;
    }

    .hero-carousel .carousel-control .glyphicon {
        top: 0;
        left: 0;
        width: 34px;
        height: 34px;
        margin: 0;
        font-size: 13px;
        line-height: 34px;
    }

    .hero-carousel .carousel-indicators {
        bottom: 18px;
        margin-bottom: 0;
    }

    .hero-carousel .carousel-indicators li,
    .hero-carousel .carousel-indicators .active {
        width: 20px;
        margin: 0 2px;
    }

    .brew-strip {
        font-size: 14px;
    }
}

/* ---------- Shared section components ---------- */
.home-section {
    padding: 72px 15px;
}

.home-section--alt {
    background-color: var(--surface-alt);
}

.home-section--dark {
    color: rgba(255, 255, 255, .8);
    background-color: var(--brand-navy);
}

.home-section--dark h2,
.home-section--dark h3 {
    color: white;
}

.home-section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Bootstrap row whose columns stretch to equal height; columns default to full width below their breakpoint */
.row-equal {
    display: flex;
    flex-wrap: wrap;
    row-gap: 24px;
}

.row-equal::before,
.row-equal::after {
    content: none;
}

:where(.row-equal > [class*="col-"]) {
    width: 100%;
}

.card-cta {
    margin-top: auto;
    padding-top: 16px;
    font-weight: 700;
    color: var(--secondary-blue);
}

.stretched-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 24px;
    margin-bottom: 32px;
}

.section-head h2 {
    margin: 0;
    font-size: 34px;
}

.section-intro {
    max-width: 640px;
    margin-top: 10px;
}

.section-eyebrow {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary-blue);
}

.home-section--dark .section-eyebrow {
    color: #5cbff0;
}

.section-link {
    font-weight: 700;
    white-space: nowrap;
}

.home-section--dark .section-link {
    color: white;
}

@media (max-width: 767px) {
    .home-section {
        padding: 48px 15px;
    }

    .section-head h2 {
        font-size: 26px;
    }
}

/* ---------- Products band (CMS nested_columns blocks) ---------- */
/* A section heading block placed directly before the product rows joins the same white band */
.home-page .body-content > .block-section_heading {
    padding: 72px 15px 0;
    background-color: white;
}

.home-page .body-content > .block-section_heading .section-head {
    margin-bottom: 20px;
}

.home-page .body-content > .block-nested_columns {
    padding: 12px 15px;
    background-color: white;
}

.home-page .body-content > .block-nested_columns:first-child,
.home-page .body-content > :not(.block-nested_columns) + .block-nested_columns {
    padding-top: 72px;
}

.home-page .body-content > .block-nested_columns:last-child {
    padding-bottom: 72px;
}

.home-page .body-content > .block-section_heading + .block-nested_columns {
    padding-top: 12px;
}

/* Kept separate so browsers without :has() still apply the rule above */
.home-page .body-content > .block-nested_columns:has(+ :not(.block-nested_columns)) {
    padding-bottom: 72px;
}

.home-page .body-content > .block-nested_columns .container-fluid {
    padding: 0;
}

.home-page .body-content > .block-nested_columns .row::before,
.home-page .body-content > .block-nested_columns .row::after {
    content: none;
}

.home-page .body-content > .block-nested_columns > .container-fluid > .row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 !important;
}

/* Product card */
.home-page .body-content > .block-nested_columns > .container-fluid > .row > [class*="col-"] {
    flex: 1 1 100%;
    float: none;
    width: auto;
    min-width: 0;
    padding: 28px 28px 24px !important;
    background-color: white;
    border-top: 4px solid var(--primary-red);
    border-radius: 8px;
    box-shadow: 0 0 0 1px #e3e8ee, 0 4px 18px rgba(15, 46, 74, .08);
}

.home-page .body-content > .block-nested_columns .heading-block {
    margin: 0 0 14px;
    font-size: 26px;
    text-align: left;
}

.home-page .body-content > .block-nested_columns section.block-nested_columns > .container-fluid > .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
    margin: 0;
    padding: 0 !important;
}

.home-page .body-content > .block-nested_columns section.block-nested_columns > .container-fluid > .row > [class*="col-"] {
    flex: 1 1 100%;
    float: none;
    width: auto;
    min-width: 0;
    padding: 0 !important;
}

.home-page .body-content > .block-nested_columns .block-paragraph {
    margin-bottom: 0;
    line-height: 1.6;
    color: var(--primary-dark-grey);
}

.home-page .body-content > .block-nested_columns .block-paragraph br + br {
    display: none;
}

.home-page .body-content > .block-nested_columns .block-paragraph a {
    display: inline-block;
    margin-top: 8px;
    font-weight: 700;
}

.home-page .body-content > .block-nested_columns .block-paragraph a::after {
    content: " \2192";
}

.home-page .body-content > .block-nested_columns .block-button > .container-fluid {
    justify-content: flex-start !important;
    margin-top: 18px;
}

.home-page .body-content > .block-nested_columns .block-button .btn {
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    white-space: normal;
    color: white;
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

.home-page .body-content > .block-nested_columns .block-button .btn:hover,
.home-page .body-content > .block-nested_columns .block-button .btn:focus,
.home-page .body-content > .block-nested_columns .block-button .btn:active {
    color: white;
    background-color: var(--secondary-red);
    border-color: var(--secondary-red);
}

/* Checkerboard of red and blue product cards: blue is the second card of the first row and the first card of the second row */
.home-page .body-content > .block-nested_columns:not(.block-nested_columns + .block-nested_columns) > .container-fluid > .row > [class*="col-"]:nth-child(2),
.home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(1) {
    border-top-color: var(--primary-blue);
}

.home-page .body-content > .block-nested_columns:not(.block-nested_columns + .block-nested_columns) > .container-fluid > .row > [class*="col-"]:nth-child(2) .block-button .btn,
.home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(1) .block-button .btn {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.home-page .body-content > .block-nested_columns:not(.block-nested_columns + .block-nested_columns) > .container-fluid > .row > [class*="col-"]:nth-child(2) .block-button .btn:hover,
.home-page .body-content > .block-nested_columns:not(.block-nested_columns + .block-nested_columns) > .container-fluid > .row > [class*="col-"]:nth-child(2) .block-button .btn:focus,
.home-page .body-content > .block-nested_columns:not(.block-nested_columns + .block-nested_columns) > .container-fluid > .row > [class*="col-"]:nth-child(2) .block-button .btn:active,
.home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(1) .block-button .btn:hover,
.home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(1) .block-button .btn:focus,
.home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(1) .block-button .btn:active {
    background-color: #0577ab;
    border-color: #0577ab;
}

/* Below 1200px the cards stack, so the second row follows the same red/blue order as the first */
@media (max-width: 1199px) {
    .home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(1) {
        border-top-color: var(--primary-red);
    }

    .home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(1) .block-button .btn {
        background-color: var(--primary-red);
        border-color: var(--primary-red);
    }

    .home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(1) .block-button .btn:hover,
    .home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(1) .block-button .btn:focus,
    .home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(1) .block-button .btn:active {
        background-color: var(--secondary-red);
        border-color: var(--secondary-red);
    }

    .home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(2) {
        border-top-color: var(--primary-blue);
    }

    .home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(2) .block-button .btn {
        background-color: var(--primary-blue);
        border-color: var(--primary-blue);
    }

    .home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(2) .block-button .btn:hover,
    .home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(2) .block-button .btn:focus,
    .home-page .body-content > .block-nested_columns + .block-nested_columns > .container-fluid > .row > [class*="col-"]:nth-child(2) .block-button .btn:active {
        background-color: #0577ab;
        border-color: #0577ab;
    }
}

.home-page .body-content > .block-nested_columns .block-image_with_text figure {
    margin: 0;
}

.home-page .body-content > .block-nested_columns .block-image_with_text img {
    display: block;
    max-height: 260px !important;
    width: auto;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 768px) {
    .home-page .body-content > .block-nested_columns section.block-nested_columns > .container-fluid > .row > [class*="col-"] {
        flex-basis: 0;
    }
}

@media (min-width: 1200px) {
    .home-page .body-content > .block-nested_columns > .container-fluid > .row > [class*="col-"] {
        flex-basis: 0;
    }
}

@media (max-width: 767px) {
    .home-page .body-content > .block-nested_columns:first-child,
    .home-page .body-content > :not(.block-nested_columns) + .block-nested_columns {
        padding-top: 48px;
    }

    .home-page .body-content > .block-section_heading {
        padding-top: 48px;
    }

    .home-page .body-content > .block-section_heading + .block-nested_columns {
        padding-top: 12px;
    }

    .home-page .body-content > .block-nested_columns:last-child {
        padding-bottom: 48px;
    }

    .home-page .body-content > .block-nested_columns:has(+ :not(.block-nested_columns)) {
        padding-bottom: 48px;
    }

    .home-page .body-content > .block-nested_columns > .container-fluid > .row > [class*="col-"] {
        padding: 22px 20px 20px !important;
    }
}

/* ---------- Legacy one-column blocks ---------- */
.home-page #main-row .block-one_column .block-paragraph * {
    width: auto;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 768px) {
    .home-page #main-row .block-one_column .block-paragraph * {
        width: 750px;
    }
}

@media (min-width: 992px) {
    .home-page #main-row .block-one_column .block-paragraph * {
        width: 970px;
    }
}

@media (min-width: 1200px) {
    .home-page #main-row .block-one_column .block-paragraph * {
        width: 1170px;
    }
}
