/*
 * GD Hero widget
 * Depends on gd-colors.css, gd-header.css, gd-button.css and gd-breadcrumb-row.css.
 */

.gd-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Full-bleed: break out of the Elementor container to the viewport edges */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: clamp(400px, 50vw, 520px);
    /* Bottom padding keeps the content clear of the breadcrumb row */
    padding: clamp(3.5rem, 8vw, 5.5rem) clamp(1.25rem, 4vw, 2rem) clamp(4.5rem, 8vw, 6rem);
    background-color: #1e293b;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    text-align: center;
}

/* 100vw includes the scrollbar width; clip the overflow without creating a scroll container */
body:has(.gd-hero) {
    overflow-x: clip;
}

/* About 60% of the default height; the top padding is reduced as well so the content still fits */
.gd-hero--thin {
    min-height: clamp(216px, 27.6vw, 264px);
    padding-top: clamp(6rem, 12vw, 7.3rem);
}

.gd-hero--xl {
    min-height: clamp(440px, 70vh, 900px);
}

/* Gradient overlay, so the title and breadcrumbs stay readable on bright images: darkest at the bottom */
.gd-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0.6) 100%);
}

.gd-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 48rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Full content width: no max-width, limited by the parents */
.gd-hero--content-full .gd-hero__inner {
    max-width: none;
}

/* Heading sizes for this band (colours come from GD Header) */
.gd-hero .gd-header--pre-title {
    margin-bottom: 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.gd-hero .gd-header--h1 {
    margin-bottom: 0.75rem;
    font-size: clamp(1.9rem, 4vw, 2.35rem);
    line-height: 1.15;
}

.gd-hero__text {
    margin: 0 auto;
    font-family: "versostest", sans-serif;
    font-size: clamp(0.98rem, 1.8vw, 1.08rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
}

.gd-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.35rem;
}

.gd-hero .gd-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
}

/* Breadcrumb row sits on the bottom edge of the hero (-1px hides a hairline gap) */
.gd-hero__crumbs {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: 2;
}

/* Yoast breadcrumb trail inside the row: blue links, current page in the row text colour */
.gd-hero .gd-breadcrumb-row__segment--text p {
    margin: 0;
}

.gd-hero .gd-breadcrumb-row__segment--text a {
    color: var(--gd-blue);
    text-decoration: none;
}

.gd-hero .gd-breadcrumb-row__segment--text a:hover {
    text-decoration: underline;
}
