/* ============================================================================
   THINKSTV LED — public hero carousel
   ============================================================================

   Layout and movement only. Every colour, size, font and spacing value comes
   from the CMS at runtime as a custom property written by hero.js into a
   generated <style> element. Nothing here should hard-code a brand colour.

   The variables this file expects (all set by hero.js):
     --hero-heading  --hero-subheading  --hero-description
     --hero-btn-*    --hero-max-width   --hero-pad-*
     --hero-radius   --hero-shadow      --hero-icon-*
     --hero-align    --hero-justify     --hero-transition-ms
     --hero-h1-size  --hero-subtitle-size  --hero-body-size  --hero-button-size

   Breakpoints match the rest of the site: 1200 / 1024 / 768 / 480.
   ========================================================================= */

.hero-section {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 620px;
    background: #05070d;
    border-radius: var(--hero-radius, 0);
    box-shadow: var(--hero-shadow, none);

    /* Fallbacks so the section is never unstyled if the API is slow. */
    --hero-font-stack: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --hero-transition-ms: 600ms;
}

.hero-section[hidden] { display: none; }

.hero-track {
    position: relative;
    display: grid;
    min-height: inherit;
}

/* Every slide occupies the same grid cell, so they stack. Only the active one
   is visible; the others stay in the DOM for the crossfade. */
.hero-slide {
    grid-area: 1 / 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: var(--hero-justify, center);
    align-items: var(--hero-align, flex-start);
    min-height: 620px;
    padding: var(--hero-pad-top, 120px) var(--hero-pad-right, 64px)
             var(--hero-pad-bottom, 120px) var(--hero-pad-left, 64px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--hero-transition-ms) ease,
                visibility var(--hero-transition-ms) ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

/* The slide variant moves horizontally instead of fading. */
.hero-section[data-transition="slide"] .hero-slide {
    transform: translateX(6%);
    transition: opacity var(--hero-transition-ms) ease,
                transform var(--hero-transition-ms) ease,
                visibility var(--hero-transition-ms) ease;
}

.hero-section[data-transition="slide"] .hero-slide.is-active {
    transform: translateX(0);
}

.hero-section[data-transition="none"] .hero-slide {
    transition: none;
}

/* ------------------------------------------------------------- BACKGROUND */

.hero-slide__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-repeat: no-repeat;
    transform-origin: center;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.hero-slide__media--empty { background: #0b1020; }

.hero-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Sits above the background but below the copy, so the whole slide is
   clickable without nesting a link inside a link. */
.hero-slide__cover {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* ------------------------------------------------------------------ COPY */

.hero-slide__inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--hero-max-width, 1320px);
    display: flex;
    flex-direction: column;
    align-items: var(--hero-align, flex-start);
    text-align: left;
}

.hero-section [style*="--hero-align:center"] .hero-slide__inner,
.hero-slide__inner[data-align="center"] { text-align: center; }

.hero-slide__subtitle {
    margin: 0 0 12px;
    color: var(--hero-subheading, #4DA3FF);
}

.hero-slide__title {
    margin: 0 0 20px;
    color: var(--hero-heading, #FFFFFF);
    max-width: 18ch;
}

.hero-slide__description {
    margin: 0 0 32px;
    color: var(--hero-description, #E6E6E6);
    max-width: 56ch;
}

/* ---------------------------------------------------------------- BUTTONS */

.hero-slide__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-slide__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--hero-btn-radius, 8px);
    color: var(--hero-btn-text, #FFFFFF);
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.hero-slide__button--primary {
    background: var(--hero-btn-primary, #2563EB);
}

.hero-slide__button--primary:hover {
    background: var(--hero-btn-primary-hover, #3B82F6);
}

.hero-slide__button--secondary {
    background: var(--hero-btn-secondary, #0F172A);
    border: var(--hero-btn-border, 1px solid #FFFFFF);
}

.hero-slide__button--secondary:hover {
    background: var(--hero-btn-secondary-hover, #1E293B);
}

/* ----------------------------------------------------------- FEATURE ROW */

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hero-icon-gap, 24px);
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--hero-description, #E6E6E6);
}

.hero-feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--hero-icon-size, 40px);
    height: var(--hero-icon-size, 40px);
    border-radius: 50%;
    background: var(--hero-icon-bg, rgba(255, 255, 255, 0.08));
    color: var(--hero-icon-color, #FFFFFF);
    transition: color 160ms ease;
}

.hero-feature:hover .hero-feature__icon { color: var(--hero-icon-hover, #4DA3FF); }

.hero-feature__text { display: flex; flex-direction: column; }
.hero-feature__title { color: var(--hero-heading, #FFFFFF); font-size: 15px; }
.hero-feature__subtitle { font-size: 13px; opacity: 0.8; }

/* --------------------------------------------------------------- CONTROLS */

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.hero-arrow:hover { background: rgba(0, 0, 0, 0.6); }
.hero-arrow--prev { left: 20px; }
.hero-arrow--next { right: 20px; }

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 160ms ease, width 160ms ease;
}

.hero-dot.is-active {
    width: 28px;
    border-radius: 5px;
    background: #FFFFFF;
}

/* ------------------------------------------------------------ BREAKPOINTS */

@media (max-width: 1200px) {
    .hero-section, .hero-slide { min-height: 560px; }
}

@media (max-width: 1024px) {
    .hero-section, .hero-slide { min-height: 480px; }
    .hero-slide {
        padding-left: calc(var(--hero-pad-left, 64px) * 0.6);
        padding-right: calc(var(--hero-pad-right, 64px) * 0.6);
    }
    .hero-slide__title { max-width: 22ch; }
}

@media (max-width: 768px) {
    .hero-section, .hero-slide { min-height: 420px; }
    .hero-slide {
        padding-top: calc(var(--hero-pad-top, 120px) * 0.5);
        padding-bottom: calc(var(--hero-pad-bottom, 120px) * 0.5);
    }
    .hero-arrow { width: 40px; height: 40px; }
    .hero-arrow--prev { left: 10px; }
    .hero-arrow--next { right: 10px; }
    .hero-features { gap: 16px; }
}

@media (max-width: 480px) {
    .hero-section, .hero-slide { min-height: 380px; }
    .hero-slide { padding-left: 20px; padding-right: 20px; }
    .hero-slide__title, .hero-slide__description { max-width: 100%; }
    .hero-slide__buttons { width: 100%; }
    .hero-slide__button { flex: 1 1 auto; }
    .hero-arrow { display: none; }        /* swipe instead, arrows crowd it */
}

/* Someone who has asked their system for less motion gets no crossfade and no
   autoplay; hero.js handles the autoplay half of that. */
@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; }
}
