/* ============================================================
   ONYX Hero Carousel — Main Stylesheet
   Matches onyxgfx.com font system: DM Sans (headings/body) + Inter (nav tabs)
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&family=Inter:wght@400;500;600;700&display=swap');

/* --- Reset & Container --- */
.onyx-hero-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0a1628;
    font-family: 'DM Sans', sans-serif;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.onyx-hero-carousel *,
.onyx-hero-carousel *::before,
.onyx-hero-carousel *::after {
    box-sizing: border-box;
}

/* --- Slides Wrapper --- */
.ohc-slides-wrapper {
    position: relative;
    width: 100%;
    height: 64vw; /* taller to fit overlaid nav at bottom */
    max-height: 920px;
    min-height: 580px;
}

/* --- Individual Slide --- */
.ohc-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 1;
}

.ohc-slide--active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Background gradient overlay (matches Figma: bottom fade + subtle overall darken) */
.ohc-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 71%, rgba(0,0,0,0.7) 88%),
                linear-gradient(90deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Override for slides with light backgrounds (like SupportCenter) */
.ohc-slide--light::after {
    background: none;
}

.ohc-slide--light .ohc-slide__tag,
.ohc-slide--light .ohc-slide__headline,
.ohc-slide--light .ohc-slide__subheadline,
.ohc-slide--light .ohc-slide__cta {
    font-family: 'DM Sans', sans-serif;
}

.ohc-slide--light .ohc-slide__tag { color: #feb014; }
.ohc-slide--light .ohc-slide__headline { color: #ffffff; }
.ohc-slide--light .ohc-slide__subheadline { color: rgba(255, 255, 255, 0.85); }

/* Background video */
.ohc-slide__video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

/* Dark overlay */
.ohc-slide__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1;
    pointer-events: none;
}

/* --- Slide Content Container --- */
.ohc-slide__content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 150px 100px 160px; /* 150px top for header clearance, 160px bottom for nav */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ohc-slide__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex: 1;
}

/* --- Text Content (Left Side) --- */
.ohc-slide__text {
    flex: 0 1 600px;
    max-width: 600px;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.ohc-slide--active .ohc-slide__text {
    opacity: 1;
    transform: translateY(0);
}

.ohc-slide__text--full {
    flex: 0 1 700px;
    max-width: 700px;
}

/* Tag / Label — DM Sans Bold, 18px, #feb014 (30% up from 14px) */
/* Tag uses H1 on first slide, P on others — reset all tag-specific margins */
h1.ohc-slide__tag,
h2.ohc-slide__tag,
p.ohc-slide__tag,
span.ohc-slide__tag,
.ohc-slide__tag {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #feb014;
    letter-spacing: 0.02em;
    margin: 0 0 14px 0;
    padding: 0;
    line-height: 1.4;
}

/* Headline — DM Sans Regular, 46px (30% up from 35px) */
/* All slides use H2 — reset any theme H2 defaults */
h2.ohc-slide__headline,
.ohc-slide__headline {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(30px, 3.2vw, 46px);
    font-weight: 400;
    line-height: 1.05;
    color: #ffffff;
    margin: 0 0 18px 0;
    padding: 0;
    letter-spacing: -0.01em;
}

/* Bold headline variant (for slides like Print Management) */
.ohc-slide__headline--bold {
    font-weight: 700;
}

/* Subheadline — DM Sans Regular, 20px (30% up from 15px) */
.ohc-slide__subheadline {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(16px, 1.4vw, 20px);
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 28px 0;
}

.ohc-slide__subheadline p {
    margin: 0 0 8px 0;
}

/* --- CTA Button — White pill, DM Sans Bold, 15px, black text --- */
.ohc-slide__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 28px;
    height: 46px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 40px;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 0;
    line-height: 46px;
}

/* Default: Solid white (matches Figma) */
.ohc-slide__cta--solid-white {
    color: #000000;
    background: #ffffff;
    border: none;
}

.ohc-slide__cta--solid-white:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    text-decoration: none;
}

/* Outline white */
.ohc-slide__cta--outline-white {
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    background: transparent;
}

.ohc-slide__cta--outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
    text-decoration: none;
}

/* Solid yellow */
.ohc-slide__cta--solid-yellow {
    color: #0a1628;
    background: #feb014;
    border: none;
}

.ohc-slide__cta--solid-yellow:hover {
    background: #e69f0e;
    color: #0a1628;
    text-decoration: none;
}

/* Outline yellow */
.ohc-slide__cta--outline-yellow {
    color: #feb014;
    border: 1.5px solid #feb014;
    background: transparent;
}

.ohc-slide__cta--outline-yellow:hover {
    background: rgba(254, 176, 20, 0.1);
    color: #feb014;
    text-decoration: none;
}

/* Custom CTA — colors set via inline style, arrow via CSS variable */
.ohc-slide__cta--custom {
    --ohc-arrow-color: #000000;
}

.ohc-slide__cta--custom:hover {
    opacity: 0.9;
    text-decoration: none;
}

.ohc-slide__cta--custom .ohc-cta-arrow path {
    stroke: var(--ohc-arrow-color);
}

.ohc-cta-arrow {
    transition: transform 0.3s ease;
}

.ohc-slide__cta:hover .ohc-cta-arrow {
    transform: translateX(3px);
}

/* --- Social Proof — 16px (30% up from 12px) --- */
.ohc-slide__social-proof {
    margin-top: 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    max-width: 400px;
}

/* --- Badges --- */
.ohc-slide__badges {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.ohc-slide__badge {
    height: 34px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
}

/* --- Right Side Media --- */
.ohc-slide__media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease 0.35s, transform 0.7s ease 0.35s;
}

.ohc-slide--active .ohc-slide__media {
    opacity: 1;
    transform: translateX(0);
}

.ohc-slide__media-img {
    max-width: 100%;
    max-height: 520px;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.ohc-slide__media--right-bleed {
    margin-right: -100px;
}

.ohc-slide__media--center {
    justify-content: center;
}

.ohc-slide__media--background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.ohc-slide__media--background .ohc-slide__media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ohc-slide__extra {
    margin-top: 16px;
}

/* --- Right Column (media + feature boxes together) --- */
.ohc-slide__right-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 2;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease 0.35s, transform 0.7s ease 0.35s;
}

.ohc-slide--active .ohc-slide__right-col {
    opacity: 1;
    transform: translateX(0);
}

.ohc-slide__right-col .ohc-slide__media {
    opacity: 1;
    transform: none;
    transition: none;
}

.ohc-slide__right-col .ohc-slide__feature-boxes {
    width: 100%;
    margin-top: 8px;
}

/* --- YouTube / Video Embed (16:9 responsive) --- */
.ohc-slide__video-embed {
    position: relative;
    width: 560px;
    min-width: 400px;
    padding-bottom: 315px; /* 560 * 9/16 = 315 */
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.ohc-slide__video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Feature Boxes — flow within slide content, align right --- */
.ohc-slide__feature-boxes {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    justify-content: flex-end;
    z-index: 3;
}

.ohc-feature-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: #042146;
    border: 1px solid #2A4A83;
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.3s ease, border-color 0.3s ease;
    min-width: 260px;
}

.ohc-feature-box:hover {
    background: #0a2d5c;
    border-color: #3a5a93;
    color: #ffffff;
    text-decoration: none;
}

.ohc-feature-box__icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.ohc-feature-box__text {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    color: #ffffff;
}


/* ============================================================
   BOTTOM NAVIGATION TABS (Desktop)
   Overlays the bottom of the hero with a dark gradient
   Font: Inter for nav items (matches Figma)
   ============================================================ */
.ohc-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.45) 40%, rgba(10, 22, 40, 0.7) 100%);
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ohc-nav__inner {
    display: flex;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 93px;
    gap: 0;
    align-items: stretch;
}

.ohc-nav__tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px 7px;
    margin: 0;
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    text-align: left;
    color: #b6b6b6;
    transition: color 0.3s ease, background 0.3s ease;
    position: relative;
    outline: none;
    min-height: 100px;
}

.ohc-nav__tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.25);
}

.ohc-nav__tab--active {
    color: #ffffff;
}

.ohc-nav__tab-content {
    flex: 1;
}

/* Nav tab title — Inter Bold, 13px */
.ohc-nav__tab-title {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 20px;
    color: inherit;
}

.ohc-nav__tab--active .ohc-nav__tab-title {
    color: #ffffff;
}

/* Nav tab description — Inter Regular, 14px */
.ohc-nav__tab-desc {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: inherit;
}

.ohc-nav__tab--active .ohc-nav__tab-desc {
    color: rgba(255, 255, 255, 0.85);
}

/* --- Progress Bar --- */
.ohc-nav__progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 12px;
}

.ohc-nav__progress-bar {
    width: 0%;
    height: 100%;
    background: #feb014;
    border-radius: 2px;
    transition: none;
}

.ohc-nav__progress-bar--active {
    animation: ohc-progress-fill 8s linear forwards;
}

@keyframes ohc-progress-fill {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes ohc-fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}


/* ============================================================
   MOBILE PROGRESS BARS
   ============================================================ */
.ohc-mobile-nav {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 12px 20px 16px;
    gap: 6px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
}

.ohc-mobile-nav__bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 2px;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    outline: none;
}

.ohc-mobile-nav__progress {
    width: 0%;
    height: 100%;
    background: #feb014;
    border-radius: 2px;
    transition: none;
}

.ohc-mobile-nav__progress--active {
    animation: ohc-progress-fill 8s linear forwards;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Large screens: keep text sizes but tighten layout */
@media (max-width: 1400px) {
    .ohc-slide__content {
        padding: 0 60px;
        padding-bottom: 150px;
    }

    .ohc-slide__inner {
        padding-top: 70px;
    }

    .ohc-slide__text {
        flex: 0 1 520px;
        max-width: 520px;
    }

    .ohc-nav__inner {
        padding: 0 60px;
    }

    .ohc-slide__social-proof {
        font-size: 13px;
        line-height: 1.6;
    }

    .ohc-slide__video-embed {
        width: 400px;
        min-width: 300px;
        padding-bottom: 225px;
    }
}

/* Tablet: 1024px and below */
@media (max-width: 1024px) {
    .ohc-slide__content {
        padding: 0 40px;
        padding-bottom: 140px;
    }

    .ohc-slide__inner {
        padding-top: 60px;
        gap: 30px;
    }

    .ohc-nav__inner {
        padding: 0 40px;
    }

    .ohc-slide__text {
        flex: 0 1 450px;
        max-width: 450px;
    }

    .ohc-slide__tag {
        font-size: 15px;
    }

    .ohc-slide__headline {
        font-size: clamp(26px, 2.8vw, 36px);
    }

    .ohc-slide__subheadline {
        font-size: 16px;
    }

    .ohc-slide__media--right-bleed {
        margin-right: -40px;
    }

    .ohc-slide__video-embed {
        width: 400px;
        min-width: 300px;
        padding-bottom: 225px;
    }

    .ohc-slide__social-proof {
        font-size: 12px;
        line-height: 1.5;
    }

    .ohc-feature-box {
        min-width: 220px;
        padding: 12px 16px;
        font-size: 13px;
    }

    .ohc-nav__tab {
        min-height: 90px;
        padding: 12px 6px;
    }

    .ohc-nav__tab-title {
        font-size: 12px;
    }

    .ohc-nav__tab-desc {
        font-size: 12px;
    }
}

/* Mobile: 768px and below */
@media (max-width: 768px) {
    /* Fixed height on mobile */
    .ohc-slides-wrapper {
        height: 100vh !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    .ohc-slide {
        position: absolute !important;
        height: 100% !important;
        overflow: auto !important;
        transition: none !important;
    }

    .ohc-slide--active {
        overflow: visible !important;
    }

    .ohc-slide__content {
        padding: 20px 2.5vw 20px !important;
        height: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* Stack vertically, all centered */
    .ohc-slide__inner {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 20px !important;
        padding-top: 16px !important;
        padding-bottom: 10px !important;
        flex: none !important;
        text-align: center !important;
    }

    .ohc-slide__text {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        order: 1;
        opacity: 1 !important;
        transform: none !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .ohc-slide__text--has-image {
        width: 100% !important;
        max-width: 100% !important;
    }

    .ohc-slide__tag {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    .ohc-slide__subheadline {
        margin-bottom: 16px !important;
    }

    .ohc-slide__social-proof {
        text-align: center !important;
    }

    .ohc-slide__badges {
        justify-content: center !important;
    }

    /* Right column stacks below text, centered */
    .ohc-slide__right-col {
        width: 100% !important;
        order: 2;
        opacity: 1 !important;
        transform: none !important;
        align-items: center !important;
    }

    /* Media stacks below text */
    .ohc-slide__media {
        position: relative !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        opacity: 1 !important;
        order: 2;
        flex: none;
    }

    .ohc-slide--active .ohc-slide__media {
        transform: none !important;
        opacity: 1 !important;
    }

    .ohc-slide__media-img {
        max-height: 220px;
        max-width: 100%;
        width: auto;
    }

    .ohc-slide__video-embed {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding-bottom: 56.25% !important; /* 16:9 */
    }

    .ohc-slide__media--right-bleed {
        margin-right: 0;
    }

    .ohc-slide__headline {
        font-size: clamp(24px, 5.5vw, 32px) !important;
    }

    .ohc-slide__subheadline {
        font-size: 15px;
    }

    .ohc-slide__cta {
        height: 42px;
        padding: 0 24px;
        font-size: 14px;
        line-height: 42px;
    }

    .ohc-slide__feature-boxes {
        position: relative;
        bottom: auto;
        right: auto;
        flex-direction: column;
        gap: 10px;
        order: 3;
    }

    .ohc-feature-box {
        min-width: auto;
        padding: 12px 16px;
    }

    .ohc-slide__feature-boxes {
        display: none !important;
    }

    .ohc-feature-boxes--show-mobile {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .ohc-feature-box {
        justify-content: center !important;
        text-align: center !important;
    }

    .ohc-slide__social-proof {
        font-size: 13px !important;
    }

    .ohc-slide__media-img {
        margin: 0 auto !important;
        display: block !important;
    }

    /* Hide desktop nav, show mobile bars */
    .ohc-nav {
        display: none !important;
    }

    .ohc-mobile-nav {
        display: flex !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        padding: 22px 20px 26px !important;
    }
}

/* Small mobile: 480px and below */
@media (max-width: 480px) {
    .ohc-slide__headline {
        font-size: clamp(20px, 5.5vw, 26px) !important;
    }

    .ohc-slide__tag {
        font-size: 12px !important;
    }

    .ohc-slide__social-proof {
        display: none;
    }

    .ohc-slide__badges {
        display: none;
    }
}


/* ============================================================
   ACCESSIBILITY & REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .ohc-slide {
        transition: opacity 0.1s ease, visibility 0.1s ease;
    }

    .ohc-slide__text,
    .ohc-slide__media {
        transition: none;
        transform: none;
        opacity: 1;
    }

    .ohc-nav__progress-bar--active,
    .ohc-mobile-nav__progress--active {
        animation-duration: 0.1s;
    }
}


/* ============================================================
   SITEORIGIN BUILDER EDITOR PREVIEW
   ============================================================ */
.so-panels-dialog .onyx-hero-carousel {
    max-height: 600px;
}

.so-panels-dialog .ohc-slides-wrapper {
    max-height: 400px;
}
