/**
 * Single Brand hero
 * Mirrors the Content Page Hero layout, themed per brand via the
 * Brand Color Scheme field (adds a .brandhero--{scheme} modifier).
 * --brandhero-bg    = banner background
 * --brandhero-wedge = angled accent bar + logo/photo seam
 */

.brandhero {
    --brandhero-bg: var(--color-navy);
    --brandhero-wedge: var(--color-brand-orange);
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
}

/* ---- Brand color schemes ------------------------------------------------ */
.brandhero--everflow   { --brandhero-bg: #00205B; --brandhero-wedge: #FF8200; }
.brandhero--baldor     { --brandhero-bg: #016199; --brandhero-wedge: #171717; }
.brandhero--everconnect{ --brandhero-bg: #003087; --brandhero-wedge: #FF8200; }
.brandhero--flexcraft  { --brandhero-bg: #171717; --brandhero-wedge: #FF8300; }
.brandhero--flextron   { --brandhero-bg: #1B75BB; --brandhero-wedge: #F7E100; }
.brandhero--pexflow    { --brandhero-bg: #171717; --brandhero-wedge: #EC1C2C; }
.brandhero--piers      { --brandhero-bg: #006937; --brandhero-wedge: #8DC63F; }
.brandhero--raven      { --brandhero-bg: #171717; --brandhero-wedge: #ED2924; }
.brandhero--pushlock   { --brandhero-bg: #171717; --brandhero-wedge: #FFD240; }
.brandhero--titanpress { --brandhero-bg: #171717; --brandhero-wedge: #E4002B; }

/* ---- Banner ------------------------------------------------------------- */
.brandhero-banner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr minmax(190px, 38%);
    align-items: stretch;
    min-height: 165px;
    max-height: 205px;
    background: var(--brandhero-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* ---- Content ------------------------------------------------------------ */
.brandhero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-3);
    padding: 32px;
}

.brandhero-breadcrumb ol {
    list-style: none;
    margin: 0 0 var(--space-2);
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--text-paragraph-sm);
    font-weight: 400;
}
.brandhero-breadcrumb li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.7);
}
.brandhero-breadcrumb li:not(:first-child)::before {
    content: "›";
    color: rgba(255, 255, 255, 0.45);
}
/* The "Home" link takes the brand accent colour (per Figma). */
.brandhero-breadcrumb a {
    color: var(--brandhero-wedge);
    text-decoration: underline;
}
.brandhero-breadcrumb a:hover { text-decoration: none; }
.brandhero-breadcrumb span[aria-current] { color: rgba(255, 255, 255, 0.85); }

.brandhero-title {
    margin: 0;
    font-size: var(--text-display-sm);
    font-weight: 800;
    color: var(--color-background);
}
.brandhero-copy {
    margin: 0;
    max-width: 750px;
    color: var(--color-background);
}

/* ---- Media (photo + wedge + logo) --------------------------------------- */
.brandhero-media {
    position: relative;
    /* No overflow:hidden — the photo/overlay self-clip via clip-path, and the
       skewed wedge needs to bleed past the left edge without being clipped. */
}
.brandhero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* diagonal left edge so the banner colour shows through the cut */
    clip-path: polygon(64px 0, 100% 0, 100% 100%, 0 100%);
    z-index: 1;
}

/* Light overlay over the photo so the (full-colour) brand logo reads on top */
.brandhero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    clip-path: polygon(64px 0, 100% 0, 100% 100%, 0 100%);
    pointer-events: none;
    z-index: 2;
}

/* Slanted accent bar straddling the diagonal seam (brand accent colour) */
.brandhero-wedge {
    position: absolute;
    top: 40px;
    bottom: 0;
    left: 30px;
    width: 30px;
    background: var(--brandhero-wedge);
    transform: skewX(-15deg);
    transform-origin: top;
    border-top-left-radius: 6px;
    z-index: 3;
}

/* Brand logo sitting directly over the (lightened) photo — no chip */
.brandhero-logo {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 72%;
}
.brandhero-logo img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 56px;
    object-fit: contain;
}

@media (min-width: 769px) and (max-width: 900px) {
    .brandhero-wedge { left: 20px; width: 30px; transform: skewX(-14deg); }
}

/* ---- Tablet / mobile ---------------------------------------------------- */
@media (max-width: 768px) {
    .brandhero-banner {
        grid-template-columns: 1fr;
        max-height: none;
    }
    .brandhero-content {
        padding: var(--space-10) var(--space-6);
    }
    /* Hide the whole media column (photo, wedge, overlay + logo) on mobile. */
    .brandhero-media {
        display: none;
    }
}
