/* Shared marketing-page building blocks: hero, feature cards, CTA band, blue cards, and the
   download / testimonials / contact / footer partials. Loaded per page (home, employers, brokers, tpas)
   after style.css; pages that don't load it keep the legacy styles. */

:root {
    --hw-ink: #242E49;
    --hw-muted: #5D6A85;
    --hw-blue: #1678F2;
    --hw-blue-deep: #0F67FE;
    --hw-surface: #F2F5F9;
    --hw-tint: #EAF3FF;
    --hw-radius-lg: 24px;
    /* Horizontal inset of the rounded section cards inside the 1170px body */
    --hw-card-inset: 16px;
    /* Inner padding of the section cards */
    --hw-card-pad: clamp(24px, 5vw, 64px);
    /* Vertical rhythm between sections */
    --hw-space: clamp(56px, 8vw, 104px);
    --hw-blue-gradient: linear-gradient(135deg, #1678F2 0%, #0F67FE 55%, #0A4FCF 100%);
    --hw-font: 'Plus Jakarta Sans', sans-serif;
}

/* The hero backdrop is 100vw wide; clip it instead of allowing a horizontal scrollbar */
body {
    overflow-x: hidden;
    overflow-x: clip;
}

/* ===================== Section heading ===================== */

.section-head {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
}

.section-eyebrow {
    margin: 0 0 10px;
    font-family: var(--hw-font);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hw-blue);
}

.section-title {
    margin: 0;
    font-family: var(--hw-font);
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--hw-ink);
}

/* Even out multi-line headings (avoids a single orphaned word) */
.section-title,
.page-hero h1.brand-heading,
.cta-band h2 {
    text-wrap: balance;
}

/* ===================== Blue card surface ===================== */

.blue-card,
section#download,
section#contact {
    position: relative;
    overflow: hidden;
    border-radius: var(--hw-radius-lg);
    background: var(--hw-blue-gradient);
    box-shadow: 0 24px 48px -24px rgba(15, 103, 254, 0.45);
}

/* Soft highlight in the top-right corner */
.blue-card::before,
section#download::before,
section#contact::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.14), transparent);
    pointer-events: none;
}

/* Keep card content above the highlight */
.blue-card > * {
    position: relative;
}

/* ===================== Page hero ===================== */

section.page-hero {
    position: relative;
    isolation: isolate;
}

/* Full-bleed: centered on the body and widened to the viewport */
.page-hero .hero-backdrop {
    position: absolute;
    z-index: -1;
    top: calc(-1 * var(--nav-h));
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    overflow: hidden;
    /* Fade into the page background (no hard bottom edge) */
    -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
    background:
        radial-gradient(ellipse 60% 55% at 80% 30%, rgba(22, 120, 242, 0.14), transparent 65%),
        radial-gradient(ellipse 45% 40% at 10% 85%, rgba(15, 103, 254, 0.08), transparent 60%),
        var(--hw-surface);
}

.page-hero .hero-backdrop .background-image {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

.page-hero .hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 48px;
    height: auto;
    min-height: min(720px, calc(100vh - var(--nav-h)));
    padding: 48px 24px 64px;
    overflow: visible;
}

.page-hero .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 600px;
    animation: hero-rise 0.7s ease-out both;
}

.page-hero .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0 0 20px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(22, 120, 242, 0.1);
    font-family: var(--hw-font);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: var(--hw-blue);
}

.page-hero h1.brand-heading {
    margin: 0;
    padding: 0;
    font-family: var(--hw-font);
    font-size: clamp(32px, 4.2vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-align: left;
    text-transform: none;
    color: var(--hw-ink);
}

.page-hero .intro-text {
    max-width: 32rem;
    margin: 20px 0 32px;
    font-family: var(--hw-font);
    font-size: clamp(17px, 1.5vw, 19px);
    font-weight: 400;
    line-height: 1.6;
    color: var(--hw-muted);
}

.page-hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    margin: 0;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: var(--hw-font);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hw-btn:hover,
.hw-btn:focus {
    text-decoration: none;
    transform: translateY(-2px);
}

.hw-btn img {
    display: block;
    width: 18px;
    height: 18px;
}

.hw-btn--primary {
    background: var(--hw-blue);
    color: #fff;
    box-shadow: 0 10px 24px rgba(22, 120, 242, 0.3);
}

.hw-btn--primary:hover,
.hw-btn--primary:focus {
    background: var(--hw-blue-deep);
    color: #fff;
    box-shadow: 0 14px 28px rgba(22, 120, 242, 0.36);
}

.hw-btn--secondary {
    border-color: rgba(36, 46, 73, 0.14);
    background: #fff;
    color: var(--hw-ink);
}

.hw-btn--secondary:hover,
.hw-btn--secondary:focus {
    border-color: var(--hw-blue);
    color: var(--hw-blue);
}

/* White button for use on blue cards */
.hw-btn--light {
    background: #fff;
    color: var(--hw-blue);
}

.hw-btn--light:hover,
.hw-btn--light:focus {
    background: var(--hw-tint);
    color: var(--hw-blue-deep);
}

.page-hero .hero-media {
    display: flex;
    justify-content: center;
    animation: hero-rise 0.85s 0.12s ease-out both;
}

.page-hero .hero-media img {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    filter: drop-shadow(0 28px 48px rgba(36, 46, 73, 0.18));
}

/* Portrait photos (solution pages) read better a bit smaller */
.page-hero--photo .hero-media img {
    max-width: 400px;
}

@keyframes hero-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================== Feature cards ===================== */

section.feature-section {
    padding: var(--hw-space) var(--hw-card-inset) 0;
    background: transparent;
}

.feature-section .feature-inner {
    max-width: 1040px;
    margin: 0 auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.feature-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
    padding: 28px;
    border: 1px solid rgba(36, 46, 73, 0.06);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(36, 46, 73, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(22, 120, 242, 0.2);
    box-shadow: 0 16px 32px rgba(36, 46, 73, 0.08);
    transform: translateY(-3px);
}

.feature-card .feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: var(--hw-tint);
}

.feature-card .feature-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.feature-card h3 {
    margin: 0 0 8px;
    font-family: var(--hw-font);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--hw-ink);
}

.feature-card p {
    margin: 0;
    font-family: var(--hw-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--hw-muted);
}

/* ===================== CTA band ===================== */

section.cta-band {
    padding: var(--hw-space) var(--hw-card-inset) 0;
}

.cta-band .cta-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 40px 48px;
    border: 1px solid rgba(22, 120, 242, 0.14);
    border-radius: var(--hw-radius-lg);
    background: linear-gradient(135deg, #FFFFFF 0%, var(--hw-tint) 100%);
}

.cta-band h2 {
    margin: 0;
    font-family: var(--hw-font);
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--hw-ink);
}

.cta-band p {
    margin: 8px 0 0;
    font-family: var(--hw-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--hw-muted);
}

.cta-band .hw-btn {
    flex: 0 0 auto;
}

/* ===================== Download (partials: download / download2) ===================== */

section#download {
    margin: var(--hw-space) var(--hw-card-inset) 0;
    padding: 0;
}

/* download2 variant keeps its indigo identity, as a gradient */
section#download.download-newcolor {
    background: linear-gradient(135deg, #2F33C9 0%, #2021A3 55%, #17187A 100%) !important;
    box-shadow: 0 24px 48px -24px rgba(32, 33, 163, 0.5);
}

section#download > .container {
    position: relative;
    width: 100%;
    max-width: none;
    padding: 0 var(--hw-card-pad);
}

section#download .row {
    display: flex;
    align-items: center;
}

section#download .row > .col-md-6:first-child {
    align-self: flex-end;
}

section#download .row > .col-md-6:first-child img {
    display: block;
    max-width: 480px;
    margin: 40px auto 0;
}

section#download .download-panel {
    margin: 56px 0;
}

section#download .download-panel > p {
    margin: 0 0 12px;
    font-family: var(--hw-font);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

section#download h2 {
    width: 100%;
    max-width: 460px;
    margin: 0 0 28px;
    font-family: var(--hw-font);
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
}

section#download .buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

section#download .DownloadButton {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    margin: 0;
    padding: 0 22px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    font-family: var(--hw-font);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

section#download .DownloadButton:hover,
section#download .DownloadButton:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: translateY(-2px);
}

section#download a img {
    width: 18px;
    margin: 0;
}

/* ===================== Testimonials (partial) ===================== */

/* Transparent so it doesn't paint over the previous card's shadow */
section#testimonials.content-section {
    padding: var(--hw-space) 0 0;
    background: transparent;
}

section#testimonials .testimonials-inner {
    padding: 0 var(--hw-card-inset);
}

/* Equal-height cards across the carousel row */
section#testimonials .owl-stage {
    display: flex;
}

section#testimonials .owl-item {
    display: flex;
}

section#testimonials #owl-testimonials .item {
    width: 100%;
    min-height: 0;
}

/* ===================== Contact (partial) ===================== */

section#contact {
    margin: var(--hw-space) var(--hw-card-inset) 0;
    padding: var(--hw-card-pad) 0;
}

section#contact > .container {
    position: relative;
    width: 100%;
    max-width: none;
    padding: 0 var(--hw-card-pad);
}

section#contact .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -24px;
}

section#contact .row > [class*='col-'] {
    width: 50%;
    margin-left: 0;
    padding: 0 24px;
}

section#contact h1 {
    margin: 0 0 16px;
    font-family: var(--hw-font);
    font-size: clamp(32px, 3.6vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

section#contact h3 {
    margin: 0 0 12px;
    font-family: var(--hw-font);
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-transform: none;
}

section#contact p {
    margin: 0;
    font-family: var(--hw-font);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

section#contact .contact-details {
    margin-top: 28px;
}

section#contact .contact-details h4 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    font-family: var(--hw-font);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

section#contact .form-group {
    margin-bottom: 14px;
}

section#contact .input-group .form-control,
section#contact .form-control {
    height: 50px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 12px !important;
    box-shadow: none;
    font-family: var(--hw-font);
    font-size: 16px;
    color: var(--hw-ink);
}

section#contact .input-group textarea.form-control {
    height: auto;
    min-height: 132px;
    resize: vertical;
}

section#contact .form-control:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

section#contact .form-control::placeholder {
    color: #8A94A8;
    font-weight: 400;
}

section#contact .btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    font-family: var(--hw-font);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--hw-blue);
}

section#contact .btn-custom:hover,
section#contact .btn-custom:focus {
    background: var(--hw-tint);
    color: var(--hw-blue-deep);
}

section#contact .alert {
    border-radius: 12px;
}

/* ===================== Footer (partial) ===================== */

/* Transparent so it doesn't paint over the contact card's shadow */
footer {
    padding: 32px 0 40px;
    background: transparent;
}

footer ul.footer-social {
    margin-top: 12px;
}

footer ul.footer-social li {
    margin: 0 6px;
}

footer ul.footer-social li a {
    display: inline-flex;
    padding: 6px;
    border-radius: 50%;
}

footer ul.footer-social li a:hover {
    background: rgba(22, 120, 242, 0.08);
}

/* ===================== Responsive ===================== */

@media only screen and (max-width: 991px) {
    .page-hero .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        min-height: 0;
        padding: 40px 16px 48px;
        text-align: center;
    }

    .page-hero .hero-copy {
        align-items: center;
        max-width: 620px;
        margin: 0 auto;
    }

    .page-hero h1.brand-heading {
        text-align: center;
    }

    .page-hero .hero-actions {
        justify-content: center;
    }

    .page-hero .hero-media img {
        max-width: 440px;
    }

    .page-hero--photo .hero-media img {
        max-width: 300px;
    }

    .feature-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cta-band .cta-band-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 32px;
    }

    section#download .row {
        flex-direction: column-reverse;
    }

    section#download .row > [class*='col-'] {
        width: 100%;
    }

    section#download .download-panel {
        align-items: center;
        margin: 48px 0 0;
        text-align: center;
    }

    section#download h2 {
        margin-left: auto;
        margin-right: auto;
    }

    section#download .buttons {
        justify-content: center;
    }

    section#download .row > .col-md-6:first-child img {
        max-width: 360px;
    }

    section#contact .row > [class*='col-'] {
        width: 100%;
    }

    section#contact .row > [class*='col-']:first-child {
        margin-bottom: 32px;
    }
}

@media only screen and (max-width: 767px) {
    :root {
        --hw-card-inset: 12px;
    }

    .section-head {
        margin-bottom: 28px;
    }

    .feature-grid,
    .feature-grid--3 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* Compact cards: icon left, text right */
    .feature-card {
        display: grid;
        grid-template-columns: 56px minmax(0, 1fr);
        column-gap: 16px;
        padding: 20px;
    }

    .feature-card .feature-icon {
        grid-row: span 2;
        width: 56px;
        height: 56px;
        margin: 0;
        border-radius: 14px;
    }

    .feature-card .feature-icon img {
        width: 34px;
        height: 34px;
    }

    .feature-card h3 {
        font-size: 18px;
    }

    .feature-card p {
        font-size: 15px;
    }

    .cta-band .cta-band-inner {
        padding: 24px;
    }
}

@media only screen and (max-width: 480px) {
    .page-hero .hero-actions {
        flex-direction: column;
        align-self: stretch;
    }

    .page-hero .hero-actions .hw-btn,
    .cta-band .hw-btn {
        width: 100%;
    }

    .cta-band .cta-band-inner {
        align-items: stretch;
    }

    section#download .buttons {
        flex-direction: column;
        align-self: stretch;
    }

    section#download .DownloadButton {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-hero .hero-copy,
    .page-hero .hero-media {
        animation: none;
    }

    .hw-btn,
    .feature-card,
    section#download .DownloadButton {
        transition: none;
    }

    .hw-btn:hover,
    .feature-card:hover,
    section#download .DownloadButton:hover {
        transform: none;
    }
}
