/**
 * Capnis Global Slider System — cit.local
 * Unified Cinematic & WebGL Showcase Interaction Engine
 */

:root {
    --capnis-slider-ease: cubic-bezier(0.77, 0, 0.175, 1);
    --capnis-slider-duration: 900ms;
    --capnis-slider-text-color: #ffffff;
    --capnis-slider-sub-color: rgba(255, 255, 255, 0.85);
    --capnis-slider-accent: #ff4d4d;
}

/* ==========================================================================
   Home WebGL Showcase Slider (#capnis-home-webgl-showcase)
   ========================================================================== */

#capnis-home-webgl-showcase,
.port-showcase-slider-main-area {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #000000;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.port-showcase-slider-spaces {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 650px;
}

.port-showcase-slider-wrap,
.capnis-webgl-showcase-swiper {
    position: relative;
    width: 100%;
    height: 100%;
}

.capnis-webgl-showcase-swiper .swiper-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 650px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fullscreen Background Layer */
.port-showcase-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.08);
    transition: transform 1.2s var(--capnis-slider-ease), filter 1.2s var(--capnis-slider-ease);
    will-change: transform;
    z-index: 1;
}

.swiper-slide-active .port-showcase-slide-bg {
    transform: scale(1);
}

/* Dark Cinematic Overlay */
.capnis-showcase-backdrop-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.78) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Centered Content */
.port-showcase-slider-item {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
}

.port-showcase-slider-content {
    position: relative;
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
    z-index: 10;
}

/* Subtitle / Kicker Badge */
.port-showcase-slider-subtitle {
    display: inline-block;
    max-width: 860px;
    font-family: 'Inter', var(--tp-ff-body, sans-serif);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--capnis-slider-sub-color);
    margin: 0 auto 24px auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 700ms var(--capnis-slider-ease), transform 700ms var(--capnis-slider-ease);
    transition-delay: 100ms;
}

.swiper-slide-active .port-showcase-slider-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* Massive Headline */
.port-showcase-slider-title {
    font-family: 'Poppins', 'Inter', var(--tp-ff-heading, sans-serif);
    font-size: clamp(3.2rem, 8.5vw, 8.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-transform: capitalize;
    margin: 0;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.port-showcase-slider-title span {
    display: inline-block;
    color: #ffffff;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 850ms var(--capnis-slider-ease), transform 850ms var(--capnis-slider-ease);
    transition-delay: 200ms;
}

.swiper-slide-active .port-showcase-slider-title span {
    opacity: 1;
    transform: translateY(0);
}

.port-showcase-slider-title:hover span {
    color: rgba(255, 255, 255, 0.9);
}

/* Bottom Navigation Controls */
.tp-showcase-arrow-box {
    position: absolute;
    bottom: 45px;
    left: 0;
    right: 0;
    z-index: 99;
    width: 100%;
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

@media (max-width: 767px) {
    .tp-showcase-arrow-box {
        padding: 0 20px;
        bottom: 30px;
    }
}

.tp-showcase-arrow-left {
    flex: 1 1 0%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 10;
}

.tp-showcase-arrow-right {
    flex: 1 1 0%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: 0;
    z-index: 10;
}

.tp-showcase-arrow-box button,
.tp-showcase__button-prev,
.tp-showcase__button-next {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.tp-showcase-arrow-box button:hover {
    color: #ffffff;
    opacity: 0.8;
}

.tp-showcase__button-prev .capnis-nav-arrow {
    transition: transform 0.35s var(--capnis-slider-ease);
}

.tp-showcase__button-prev:hover .capnis-nav-arrow {
    transform: translateX(-5px);
}

.tp-showcase__button-next .capnis-nav-arrow {
    transition: transform 0.35s var(--capnis-slider-ease);
}

.tp-showcase__button-next:hover .capnis-nav-arrow {
    transform: translateX(5px);
}

/* Social links in center bottom */
.port-showcase-slider-social {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 10;
}

.port-showcase-slider-social a {
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.85;
    text-decoration: none;
}

.port-showcase-slider-social a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* ==========================================================================
   Product Detail & Parallax Showcase Extensions
   ========================================================================== */

.capnis-product-detail-showcase {
    position: relative;
    background-color: #000000;
}

.capnis-product-detail-showcase-swiper .tp-showcase-slider-bg {
    min-height: 80vh;
}

.capnis-slider-kicker {
    display: inline-block;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--capnis-slider-sub-color);
    margin-bottom: 20px;
}

/* ==========================================================================
   Header Top Bar Wording Visibility Over Dark Showcase Hero
   ========================================================================== */

body.capnis-home-page #header-sticky:not(.header-sticky) .tp-header-menu > nav > ul > li > a,
body:has(#capnis-home-webgl-showcase) #header-sticky:not(.header-sticky) .tp-header-menu > nav > ul > li > a,
body:has(.port-showcase-slider-main-area) #header-sticky:not(.header-sticky) .tp-header-menu > nav > ul > li > a {
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

body.capnis-home-page #header-sticky:not(.header-sticky) .tp-header-dropdown nav ul li.has-dropdown::after,
body:has(#capnis-home-webgl-showcase) #header-sticky:not(.header-sticky) .tp-header-dropdown nav ul li.has-dropdown::after,
body:has(.port-showcase-slider-main-area) #header-sticky:not(.header-sticky) .tp-header-dropdown nav ul li.has-dropdown::after {
    color: #ffffff !important;
}

body.capnis-home-page #header-sticky:not(.header-sticky) .capnis-theme-toggle,
body:has(#capnis-home-webgl-showcase) #header-sticky:not(.header-sticky) .capnis-theme-toggle,
body:has(#capnis-home-thumb-hero) #header-sticky:not(.header-sticky) .capnis-theme-toggle,
body:has(.port-showcase-slider-main-area) #header-sticky:not(.header-sticky) .capnis-theme-toggle {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.capnis-home-page #header-sticky:not(.header-sticky) .capnis-theme-toggle:hover,
body:has(#capnis-home-webgl-showcase) #header-sticky:not(.header-sticky) .capnis-theme-toggle:hover,
body:has(#capnis-home-thumb-hero) #header-sticky:not(.header-sticky) .capnis-theme-toggle:hover,
body:has(.port-showcase-slider-main-area) #header-sticky:not(.header-sticky) .capnis-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

body.capnis-home-page #header-sticky:not(.header-sticky) .logo-white,
body:has(#capnis-home-webgl-showcase) #header-sticky:not(.header-sticky) .logo-white,
body:has(.port-showcase-slider-main-area) #header-sticky:not(.header-sticky) .logo-white {
    display: block !important;
}

body.capnis-home-page #header-sticky:not(.header-sticky) .logo-black,
body:has(#capnis-home-webgl-showcase) #header-sticky:not(.header-sticky) .logo-black,
body:has(.port-showcase-slider-main-area) #header-sticky:not(.header-sticky) .logo-black {
    display: none !important;
}

body.capnis-home-page #header-sticky:not(.header-sticky).tp-header-border,
body:has(#capnis-home-webgl-showcase) #header-sticky:not(.header-sticky).tp-header-border,
body:has(.port-showcase-slider-main-area) #header-sticky:not(.header-sticky).tp-header-border {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* ==========================================================================
   AI Solution & Service Detail Hero Showcase Slider
   ========================================================================== */

.capnis-ais-detail-hero-showcase {
    position: relative;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    background-color: #000000;
}

.capnis-ais-detail-hero-showcase .port-showcase-slider-spaces {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
}

.capnis-ais-detail-hero-showcase .capnis-webgl-showcase-swiper .swiper-slide,
.capnis-ais-detail-hero-showcase .port-showcase-slider-item {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.capnis-ais-detail-hero-showcase .port-showcase-slider-content {
    position: relative;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
    /* Optical vertical centering offset accounting for bottom nav controls and header */
    transform: translateY(-28px);
    z-index: 10;
}

/* Subtitle / Kicker Badge */
.capnis-ais-detail-hero-showcase .port-showcase-slider-subtitle {
    display: inline-block;
    max-width: 860px;
    font-family: 'Inter', var(--tp-ff-body, sans-serif);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: var(--capnis-slider-sub-color);
    margin: 0 auto 16px auto;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms var(--capnis-slider-ease), transform 700ms var(--capnis-slider-ease);
    transition-delay: 100ms;
}

.swiper-slide-active .port-showcase-slider-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* AI Solution Title */
.capnis-ais-detail-hero-showcase .port-showcase-slider-title {
    font-family: 'Poppins', 'Inter', var(--tp-ff-heading, sans-serif);
    font-size: clamp(2.4rem, 4.8vw, 4.4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #ffffff;
    text-transform: capitalize;
    margin: 0 auto 18px auto;
    max-width: 880px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.capnis-ais-detail-hero-showcase .port-showcase-slider-title span {
    display: inline-block;
    color: #ffffff;
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 800ms var(--capnis-slider-ease), transform 800ms var(--capnis-slider-ease);
    transition-delay: 200ms;
}

.swiper-slide-active .port-showcase-slider-title span {
    opacity: 1;
    transform: translateY(0);
}

/* Slide Description Paragraph */
.port-showcase-slider-desc {
    font-family: 'Inter', var(--tp-ff-body, sans-serif);
    font-size: clamp(0.95rem, 1.15vw, 1.12rem);
    font-weight: 400;
    line-height: 1.62;
    color: rgba(255, 255, 255, 0.88);
    max-width: 680px;
    margin: 0 auto 24px auto;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 750ms var(--capnis-slider-ease), transform 750ms var(--capnis-slider-ease);
    transition-delay: 280ms;
}

.swiper-slide-active .port-showcase-slider-desc {
    opacity: 1;
    transform: translateY(0);
}

/* Slide CTA Button Wrap */
.port-showcase-slider-btn-wrap {
    margin-top: 0;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 750ms var(--capnis-slider-ease), transform 750ms var(--capnis-slider-ease);
    transition-delay: 360ms;
}

.swiper-slide-active .port-showcase-slider-btn-wrap {
    opacity: 1;
    transform: translateY(0);
}

.port-showcase-slider-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 30px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.35s ease;
    text-decoration: none;
    cursor: pointer;
}

.port-showcase-slider-btn:hover {
    background: #ffffff;
    color: #0b0f19 !important;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(255, 255, 255, 0.25);
}

.port-showcase-slider-btn svg {
    transition: transform 0.3s ease;
}

.port-showcase-slider-btn:hover svg {
    transform: translate(2px, -2px);
}

@media (max-width: 991px) {
    .capnis-ais-detail-hero-showcase,
    .capnis-ais-detail-hero-showcase .port-showcase-slider-spaces,
    .capnis-ais-detail-hero-showcase .capnis-webgl-showcase-swiper .swiper-slide,
    .capnis-ais-detail-hero-showcase .port-showcase-slider-item {
        min-height: 560px;
    }

    .capnis-ais-detail-hero-showcase .port-showcase-slider-content {
        transform: translateY(-16px);
    }
}

@media (max-width: 575px) {
    .capnis-ais-detail-hero-showcase,
    .capnis-ais-detail-hero-showcase .port-showcase-slider-spaces,
    .capnis-ais-detail-hero-showcase .capnis-webgl-showcase-swiper .swiper-slide,
    .capnis-ais-detail-hero-showcase .port-showcase-slider-item {
        min-height: 480px;
    }

    .capnis-ais-detail-hero-showcase .port-showcase-slider-content {
        transform: translateY(-10px);
    }

    .capnis-ais-detail-hero-showcase .port-showcase-slider-subtitle {
        font-size: 12px;
        letter-spacing: 1.5px;
        margin-bottom: 12px;
    }
}

/* Center Counter & Scroll Indicator */
.capnis-slider-counter-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.capnis-slider-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 6px 16px;
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.capnis-slider-counter-current {
    color: #ffffff;
}

.capnis-slider-counter-sep {
    color: rgba(255, 255, 255, 0.4);
}

.capnis-slider-counter-total {
    color: rgba(255, 255, 255, 0.65);
}

.capnis-showcase-scroll-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 7px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.capnis-showcase-scroll-indicator:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.capnis-scroll-mouse {
    display: inline-block;
    width: 13px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    position: relative;
}

.capnis-scroll-wheel {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 4px;
    background-color: #ffffff;
    border-radius: 2px;
    animation: capnisMouseWheel 1.6s infinite ease-in-out;
}

@keyframes capnisMouseWheel {
    0% { opacity: 1; transform: translate(-50%, 0); }
    50% { opacity: 0.3; transform: translate(-50%, 5px); }
    100% { opacity: 0; transform: translate(-50%, 8px); }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .port-showcase-slide-bg,
    .port-showcase-slider-subtitle,
    .port-showcase-slider-title span,
    .port-showcase-slider-desc,
    .port-showcase-slider-btn-wrap,
    .tp-showcase-slider-bg {
        transition: opacity 0.3s ease !important;
        transform: none !important;
    }
}
