/* Hero Articles Carousel — styled to match Figma node 22392:955 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Fraunces:ital,opsz,wght@0,9..144,300;1,9..144,400&display=swap');

.mcp-hero-articles-carousel {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: var(--hero-height, 80vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mcp-hero-articles-carousel .hm-hero-slides {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: var(--hero-height, 80vh);
    /* Stack all slides in a single grid cell instead of absolute positioning.
       The cell (and thus the hero) grows to fit the tallest slide's content,
       so on short viewports content is never clipped — it can scroll. */
    display: grid;
    grid-template-columns: 1fr;
}

/* Each slide also carries .brxe-section: strip the theme section padding /
   max-width so the full-bleed background + absolute positioning are kept. */
.mcp-hero-articles-carousel .hm-hero-slide.brxe-section {
    max-width: none;
    align-items: stretch;
}

.mcp-hero-articles-carousel .hm-hero-slide {
    /* All slides share the same grid cell (crossfade), but stay in flow so the
       hero height follows the content instead of a fixed absolute box. */
    grid-area: 1 / 1 / 2 / 2;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    background-size: cover;
    background-position: center center;
}

.mcp-hero-articles-carousel .hm-hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
    z-index: 0;
}

.mcp-hero-articles-carousel .hm-hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.mcp-hero-articles-carousel .hm-hero-slide__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Tagrow */
.mcp-hero-articles-carousel .hm-hero-tagrow {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mcp-hero-articles-carousel .hm-hero-tagdash {
    width: 32px;
    height: 1px;
    background: #6b1419;
    display: inline-block;
    flex-shrink: 0;
}

.mcp-hero-articles-carousel .hm-hero-tagred,
.mcp-hero-articles-carousel .hm-hero-tagdot,
.mcp-hero-articles-carousel .hm-hero-tagloc {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-weight: 700;
    font-size: 11px;
    line-height: 17px;
    letter-spacing: 1.54px;
    text-transform: uppercase;
}

.mcp-hero-articles-carousel .hm-hero-tagred { color: #6b1419; }
.mcp-hero-articles-carousel .hm-hero-tagdot { color: #fff; opacity: 0.5; }
.mcp-hero-articles-carousel .hm-hero-tagloc { color: #fff; opacity: 0.85; }

/* Title */
.mcp-hero-articles-carousel .hm-hero-title {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 76px;
    line-height: 76px;
    letter-spacing: -2.28px;
    color: #fff;
    margin: 0;
    max-width: 920px;
    font-variation-settings: 'SOFT' 0, 'WONK' 1;
}

/* Title link — keep the heading look, just make it clickable */
.mcp-hero-articles-carousel .hm-hero-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}
.mcp-hero-articles-carousel .hm-hero-title a:hover { opacity: 0.85; }

/* Subtitle */
.mcp-hero-articles-carousel .hm-hero-subtitle {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 21px;
    line-height: 30.45px;
    letter-spacing: -0.075px;
    color: #fff;
    opacity: 0.9;
    margin: 0;
    max-width: 920px;
    font-variation-settings: 'SOFT' 0, 'WONK' 1;
}

/* Actions block */
.mcp-hero-articles-carousel .hm-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
    margin-top: 10px;
}

/* CTA */
.mcp-hero-articles-carousel .hm-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0 4px;
    border-bottom: 1px solid #fff;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-weight: 400;
    font-size: 11px;
    line-height: 17px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
}

.mcp-hero-articles-carousel .hm-hero-cta:hover { opacity: 0.85; }

/* Controls */
.mcp-hero-articles-carousel .hm-hero-controls {
    display: flex;
    gap: 18px;
    align-items: center;
    height: 36px;
}

/* Counter */
.mcp-hero-articles-carousel .hm-hero-counter {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-size: 12px;
    line-height: 18.6px;
    letter-spacing: 0.48px;
    color: #fff;
    white-space: nowrap;
}

.mcp-hero-articles-carousel .hm-hero-counter strong { font-weight: 700; }
.mcp-hero-articles-carousel .hm-hero-counter .muted { font-weight: 400; color: rgba(255, 255, 255, 0.4); }

/* Progress dots (horizontal bars) */
.mcp-hero-articles-carousel .hm-hero-progress {
    display: flex;
    gap: 6px;
    align-items: center;
    height: 4px;
}

.mcp-hero-articles-carousel .hm-hero-progress span {
    height: 4px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.3s, width 0.3s;
    display: inline-block;
    width: 28px;
    border: 0;
    padding: 0;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.mcp-hero-articles-carousel .hm-hero-progress span.on {
    width: 64px;
    background: rgba(255, 255, 255, 0.35);
}

/* Loading fill bar inside active dot — runs over the autoplay duration */
.mcp-hero-articles-carousel .hm-hero-progress span .fill {
    display: block;
    position: absolute;
    inset: 0;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left center;
    border-radius: inherit;
}

.mcp-hero-articles-carousel .hm-hero-slide.is-active .hm-hero-progress span.on .fill {
    animation: hm-progress-fill var(--auto-ms, 6000ms) linear forwards;
}

@keyframes hm-progress-fill {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* Arrows */
.mcp-hero-articles-carousel .hm-hero-arrows {
    display: flex;
    gap: 4px;
    height: 36px;
}

.mcp-hero-articles-carousel .hm-hero-arrows button {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #6b1419;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 1px;
    transition: background 0.2s;
}

.mcp-hero-articles-carousel .hm-hero-arrows button:hover { background: #f5f5f5; }
.mcp-hero-articles-carousel .hm-hero-arrows svg { width: 16px; height: 16px; }

/* Byline (with top divider) */
.mcp-hero-articles-carousel .hm-hero-byline {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    padding-top: 21px;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-weight: 400;
    font-size: 13px;
    line-height: 20.15px;
    letter-spacing: 0.52px;
    color: #fff;
    opacity: 0.9;
    margin-top: 0;
    align-self: stretch;
}

.mcp-hero-articles-carousel .hm-hero-byline .star { color: #6b1419; }
.mcp-hero-articles-carousel .hm-hero-byline .name {
    font-weight: 700;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
    .mcp-hero-articles-carousel .hm-hero-title { font-size: 44px; line-height: 44px; letter-spacing: -1.3px; }
    .mcp-hero-articles-carousel .hm-hero-subtitle { font-size: 16px; line-height: 24px; }
    .mcp-hero-articles-carousel .hm-hero-actions { gap: 28px; }
    .mcp-hero-articles-carousel .hm-hero-byline { font-size: 11px; line-height: 17px; }

    /* Mobile: move the arrows onto their own row, below the progress bar */
    .mcp-hero-articles-carousel .hm-hero-controls {
        flex-wrap: wrap;
        height: auto;
        row-gap: 18px;
    }
    .mcp-hero-articles-carousel .hm-hero-arrows {
        flex-basis: 100%;
    }
}

/* Short viewports (landscape laptops, split screens): shrink the type and
   spacing so the whole slide fits without needing much scroll. */
@media (max-height: 760px) {
    .mcp-hero-articles-carousel .hm-hero-subtitle { font-size: 17px; line-height: 25px; }
    .mcp-hero-articles-carousel .hm-hero-actions { gap: 22px; margin-top: 4px; }
}
