/**
 * Marketing Cards
 *
 * The wrapper reuses the explorer's .hfse-property-container, so it inherits
 * the responsive column width + gutter. These rules only style the inner
 * panel. Colors come from the --hrck-mc-* custom properties baked onto the
 * wrapper server-side. height:100% keeps the card the same height as its
 * neighbor listing cards; the reserved media aspect-ratio prevents reflow when
 * the image loads (no CLS).
 */

.hrck-marketing-card .hrck-mc-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--hrck-mc-bg, #0A386B);
    color: var(--hrck-mc-text, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/*
 * Stretched-link overlay: an absolutely-positioned anchor covering the whole
 * card panel. The visible CTA button sits above it (z-index) so it stays
 * independently clickable; valid HTML because the two anchors are siblings,
 * never nested.
 */
.hrck-marketing-card .hrck-mc-cardlink {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    box-shadow: none;
    font-size: 0;
    text-indent: -9999px;
}

.hrck-marketing-card.hrck-mc-has-cardlink {
    cursor: pointer;
}

.hrck-marketing-card.hrck-mc-has-cardlink .hrck-mc-cta:not(.hrck-mc-cardlink),
.hrck-marketing-card.hrck-mc-has-cardlink .hrck-mc-copy a {
    position: relative;
    z-index: 2;
}

/*
 * Cover background image. The operator-chosen colour overlay (--hrck-mc-bg-scrim,
 * an rgba baked server-side from the picker colour + opacity) is layered as the
 * FIRST background layer (painted as part of the element background, below all
 * content), so it never fights the stretched-link overlay or body z-index. The
 * default falls back to a 40% black scrim. The bg color from the base rule above
 * stays as the fallback behind transparent/loading images.
 */
.hrck-marketing-card.hrck-mc-has-bg-image .hrck-mc-inner {
    background-image:
        linear-gradient(var(--hrck-mc-bg-scrim, rgba(0, 0, 0, 0.4)), var(--hrck-mc-bg-scrim, rgba(0, 0, 0, 0.4))),
        var(--hrck-mc-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hrck-marketing-card .hrck-mc-media {
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.06);
}

.hrck-marketing-card .hrck-mc-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hrck-marketing-card .hrck-mc-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 8px;
    padding: 20px;
}

.hrck-marketing-card .hrck-mc-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.85;
}

.hrck-marketing-card .hrck-mc-title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.25;
    color: inherit;
}

.hrck-marketing-card .hrck-mc-copy {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.95;
}

.hrck-marketing-card .hrck-mc-copy a {
    color: inherit;
    text-decoration: underline;
}

.hrck-marketing-card .hrck-mc-cta {
    display: inline-block;
    margin-top: auto;
    align-self: flex-start;
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--hrck-mc-btn-bg, #ffffff);
    color: var(--hrck-mc-btn-text, #0A386B);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.hrck-marketing-card .hrck-mc-cta:hover,
.hrck-marketing-card .hrck-mc-cta:focus {
    opacity: 0.9;
}
