/**
 * Products Scrollytelling Styles
 * Scrollytelling layout with CSS animations
 *
 * @package    ComLink
 * @subpackage Theme/CSS
 * @since      1.0.0
 */

/* === CSS VARIABLES === */
:root {
    /* Primary - ComLink Green */
    --cl-primary: #00ff88;
    --cl-primary-dark: #00cc6a;
    --cl-primary-light: #33ff9f;
    --cl-primary-glow: rgba(0, 255, 136, 0.3);
    --cl-primary-subtle: rgba(0, 255, 136, 0.1);

    /* Background */
    --cl-bg-dark: #0a0f1a;
    --cl-bg-darker: #060a12;
    --cl-bg-card: rgba(255, 255, 255, 0.03);
    --cl-bg-card-hover: rgba(255, 255, 255, 0.06);

    /* Accent */
    --cl-accent: #00d4ff;
    --cl-software: #a855f7;

    /* Text */
    --cl-text: #ffffff;
    --cl-text-muted: rgba(255, 255, 255, 0.7);
    --cl-text-subtle: rgba(255, 255, 255, 0.5);

    /* Border */
    --cl-border: rgba(0, 255, 136, 0.15);
    --cl-border-hover: rgba(0, 255, 136, 0.35);

    /* Spacing */
    --cl-section-padding: clamp(60px, 10vw, 120px);
    --cl-container-max: 1200px;

    /* Typography */
    --cl-font: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === RESET & BASE === */
.comlink-scrollytelling * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.comlink-scrollytelling {
    font-family: var(--cl-font);
    background: var(--cl-bg-dark);
    color: var(--cl-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Override any WordPress/Flatsome body padding that creates gap above hero */
body.comlink-scrollytelling,
html body.comlink-scrollytelling {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Ensure header overlays content (fixed positioning) */
body.comlink-scrollytelling .story-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

/* Lenis smooth scroll */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* === FLOATING DECORATIVE SHAPES === */
.floating-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    will-change: transform;
}

/* Floating Circles */
.floating-circle {
    border-radius: 50%;
    background: radial-gradient(circle, var(--cl-primary-glow) 0%, transparent 70%);
    filter: blur(40px);
}

.floating-circle--1 {
    width: 400px;
    height: 400px;
    top: 10%;
    left: -10%;
    opacity: 0.4;
}

.floating-circle--2 {
    width: 300px;
    height: 300px;
    top: 40%;
    right: -5%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.3) 0%, transparent 70%);
    opacity: 0.5;
}

.floating-circle--3 {
    width: 250px;
    height: 250px;
    bottom: 20%;
    left: 10%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
    opacity: 0.4;
}

/* Floating Lines */
.floating-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cl-primary), transparent);
    opacity: 0.3;
}

.floating-line--1 {
    width: 300px;
    top: 25%;
    left: 5%;
    transform: rotate(-15deg);
}

.floating-line--2 {
    width: 200px;
    top: 60%;
    right: 10%;
    transform: rotate(25deg);
}

/* Floating Blobs */
.floating-blob {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    background: linear-gradient(135deg, var(--cl-primary-subtle), rgba(0, 212, 255, 0.1));
    filter: blur(60px);
    opacity: 0.5;
}

.floating-blob--1 {
    width: 500px;
    height: 500px;
    top: -10%;
    right: 20%;
}

.floating-blob--2 {
    width: 400px;
    height: 400px;
    bottom: 10%;
    right: -5%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(0, 255, 136, 0.1));
}

/* Floating Grid */
.floating-grid {
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
}

/* === PARALLAX LAYERS === */
.parallax-layer {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.parallax-layer--1 {
    z-index: 1;
}

.parallax-layer--2 {
    z-index: 2;
}

.parallax-layer--3 {
    z-index: 3;
}

/* === CONTAINER === */
.story-container {
    max-width: var(--cl-container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* === HEADER === */
.story-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}

.story-header.scrolled {
    background: rgba(10, 15, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.story-header__logo img {
    height: 60px;
    width: auto;
    transition: all 0.3s ease;
    animation: logoBreathing 3s ease-in-out infinite;
}

.story-header__logo:hover img {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 1))
            drop-shadow(0 0 25px rgba(255, 255, 255, 1))
            drop-shadow(0 0 50px rgba(255, 255, 255, 0.9))
            drop-shadow(0 0 90px rgba(255, 255, 255, 0.7))
            drop-shadow(0 0 140px rgba(255, 255, 255, 0.5))
            drop-shadow(0 5px 20px rgba(0, 0, 0, 0.6));
}

.story-header.scrolled .story-header__logo img {
    height: 50px;
}

/* Logo breathing animation */
@keyframes logoBreathing {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 1))
                drop-shadow(0 0 15px rgba(255, 255, 255, 0.9))
                drop-shadow(0 0 35px rgba(255, 255, 255, 0.7))
                drop-shadow(0 0 60px rgba(255, 255, 255, 0.5))
                drop-shadow(0 0 100px rgba(255, 255, 255, 0.3))
                drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1))
                drop-shadow(0 0 20px rgba(255, 255, 255, 1))
                drop-shadow(0 0 45px rgba(255, 255, 255, 0.85))
                drop-shadow(0 0 80px rgba(255, 255, 255, 0.65))
                drop-shadow(0 0 130px rgba(255, 255, 255, 0.4))
                drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    }
}

.story-header__nav {
    display: flex;
    gap: 32px;
}

.story-header__nav a {
    color: var(--cl-text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.story-header__nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cl-primary);
    transition: width 0.3s ease;
}

.story-header__nav a:hover,
.story-header__nav a.active {
    color: var(--cl-primary);
}

.story-header__nav a:hover::after,
.story-header__nav a.active::after {
    width: 100%;
}

.story-header__menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.story-header__menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--cl-text);
    transition: all 0.3s ease;
}

/* Scroll indicator removed - using Bento Grid layout instead */

/* === HERO SECTION === */
.story-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--cl-section-padding) 24px;
    padding-top: 100px; /* Account for fixed header height */
    position: relative;
    overflow: hidden;
    margin-top: 0 !important; /* Ensure hero starts at top */
}

.story-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.story-hero__gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 255, 136, 0.2) 0%, transparent 50%);
}

.story-hero__gradient-2 {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 212, 255, 0.15) 0%, transparent 50%);
}

.story-hero__gradient-3 {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 30% at 20% 60%, rgba(168, 85, 247, 0.12) 0%, transparent 50%);
}

/* === VIDEO BACKGROUND FOR HERO === */
.story-hero__video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
    pointer-events: none;
}

/* Gradient overlays stay on top of video */
.story-hero__gradient,
.story-hero__gradient-2,
.story-hero__gradient-3 {
    z-index: 1;
}

.story-hero__content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.story-hero__badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--cl-primary-subtle);
    border: 1px solid var(--cl-border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--cl-primary);
    margin-bottom: 24px;
}

.story-hero__title {
    font-size: clamp(36px, 7vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.story-hero__title .text-gradient {
    background: linear-gradient(135deg, var(--cl-primary) 0%, var(--cl-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.story-hero__subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--cl-text-muted);
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.story-hero__stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.story-stat {
    text-align: center;
}

.story-stat__number {
    display: block;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    color: var(--cl-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.story-stat__label {
    font-size: 14px;
    color: var(--cl-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.story-hero__scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--cl-text-subtle);
    font-size: 13px;
}

.story-scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--cl-primary);
    border-bottom: 2px solid var(--cl-primary);
    transform: rotate(45deg);
    animation: scrollArrow 2s ease-in-out infinite;
}

/* === PRODUCT SECTIONS === */
.story-section {
    padding: var(--cl-section-padding) 24px;
    position: relative;
}

.story-section__header {
    text-align: center;
    margin-bottom: 64px;
}

.story-section__number {
    display: inline-block;
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 800;
    color: rgba(0, 255, 136, 0.1);
    line-height: 1;
    margin-bottom: -20px;
}

.story-section__title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}

.story-section__title .text-gradient {
    background: linear-gradient(135deg, var(--cl-primary) 0%, var(--cl-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.story-section__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--cl-primary), var(--cl-accent));
    margin: 16px auto 0;
    border-radius: 2px;
}

.story-section__desc {
    font-size: clamp(15px, 1.5vw, 18px);
    color: var(--cl-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* === PRODUCT GRIDS === */

/* Default Grid */
.story-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Staggered Grid (Section 1) - 3 trên, 2 dưới lệch */
.story-section--staggered .story-products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.story-section--staggered .story-product-card {
    grid-column: span 2;
}

/* Hàng dưới 2 cards căn giữa lệch */
.story-section--staggered .story-product-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.story-section--staggered .story-product-card:nth-child(5) {
    grid-column: 4 / span 2;
}

/* Split Screen (Section 2) */
.story-section--split {
    position: relative;
    z-index: 1;
}

.story-section--split .story-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.story-section--split .story-section__sticky {
    position: sticky;
    top: 120px;
    align-self: start;
    z-index: 1;
}

.story-section--split .story-products-grid {
    position: relative;
    z-index: 2;
}

.story-section--split .story-products-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Bento Grid (Section 3) */
.story-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(160px, auto);
    gap: 20px;
}

.story-bento-card--wide {
    grid-column: span 2;
}

.story-bento-card--tall {
    grid-row: span 2;
}

/* Feature Cards (Section 4) */
.story-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.story-feature-card {
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    text-decoration: none;
    color: var(--cl-text);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.story-feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.story-feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--cl-border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 60px var(--cl-primary-subtle);
}

.story-feature-card:hover::before {
    opacity: 1;
}

.story-feature-card__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    position: relative;
}

.story-feature-card__desc {
    font-size: 14px;
    color: var(--cl-text-muted);
    margin-bottom: 16px;
    position: relative;
}

.story-feature-card__link {
    font-size: 14px;
    color: var(--cl-primary);
    font-weight: 500;
    position: relative;
}

/* AI Section - Category Groups */
.story-ai-section .story-ai-groups {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.story-ai-group {
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 24px;
    padding: 32px;
}

.story-ai-group__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cl-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cl-border);
}

.story-ai-group__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* === PRODUCT CARD === */
.story-product-card {
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: var(--cl-text);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.08) 0%, transparent 50%, rgba(0, 212, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.story-product-card:hover {
    transform: translateY(-6px) scale(1.02);
    background: var(--cl-bg-card-hover);
    border-color: var(--cl-border-hover);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25), 0 0 40px var(--cl-primary-subtle);
}

.story-product-card:hover::before {
    opacity: 1;
}

.story-product-card__tag {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.story-product-card__tag--hardware {
    background: rgba(0, 255, 136, 0.15);
    color: var(--cl-primary);
}

.story-product-card__tag--software {
    background: rgba(168, 85, 247, 0.15);
    color: var(--cl-software);
}

.story-product-card__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
}

.story-product-card__desc {
    font-size: 14px;
    color: var(--cl-text-muted);
    margin-bottom: 16px;
    flex-grow: 1;
    position: relative;
}

.story-product-card__link {
    font-size: 14px;
    color: var(--cl-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: gap 0.3s ease;
}

.story-product-card:hover .story-product-card__link {
    gap: 12px;
}

/* === BENTO CARD === */
.story-bento-card {
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 20px;
    padding: 28px;
    text-decoration: none;
    color: var(--cl-text);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.story-bento-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--cl-border-hover);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 0 60px var(--cl-primary-subtle);
}

.story-bento-card:hover::before {
    opacity: 1;
}

.story-bento-card__tag {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.story-bento-card__tag--hardware {
    background: rgba(0, 255, 136, 0.15);
    color: var(--cl-primary);
}

.story-bento-card__tag--software {
    background: rgba(168, 85, 247, 0.15);
    color: var(--cl-software);
}

.story-bento-card__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
}

.story-bento-card__desc {
    font-size: 14px;
    color: var(--cl-text-muted);
    margin-bottom: 12px;
    position: relative;
}

.story-bento-card__link {
    font-size: 14px;
    color: var(--cl-primary);
    font-weight: 500;
    position: relative;
}

/* Bento card sizes */
.story-bento-card--tall .story-bento-card__title {
    font-size: 24px;
}

.story-bento-card--wide .story-bento-card__title {
    font-size: 22px;
}

/* === AI CARD === */
.story-ai-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: var(--cl-text);
    transition: all 0.3s ease;
}

.story-ai-card:hover {
    background: rgba(0, 255, 136, 0.05);
    border-color: var(--cl-border);
    transform: translateY(-4px);
}

.story-ai-card__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.story-ai-card__desc {
    font-size: 13px;
    color: var(--cl-text-muted);
}

/* === FOOTER === */
.story-footer {
    padding: 80px 24px 40px;
    background: var(--cl-bg-darker);
    border-top: 1px solid var(--cl-border);
}

.story-footer__content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: var(--cl-container-max);
    margin: 0 auto 60px;
}

.story-footer__office {
    text-align: center;
}

.story-footer__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cl-primary-subtle);
    border-radius: 12px;
}

.story-footer__icon svg {
    width: 24px;
    height: 24px;
    stroke: #a855f7;
}

.story-footer__office h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #00ff88;
}

.story-footer__office p {
    font-size: 14px;
    color: var(--cl-text-muted);
    line-height: 1.6;
}

.story-footer__bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--cl-border);
    max-width: var(--cl-container-max);
    margin: 0 auto;
}

.story-footer__social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.story-footer__social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.story-footer__social a:hover {
    background: var(--cl-primary);
    border-color: var(--cl-primary);
    transform: translateY(-4px);
}

.story-footer__social svg {
    width: 20px;
    height: 20px;
    fill: var(--cl-text-muted);
    transition: fill 0.3s ease;
}

.story-footer__social a:hover svg {
    fill: var(--cl-bg-dark);
}

.story-footer__copyright {
    font-size: 14px;
    color: var(--cl-text-subtle);
}

/* === 3D CARD EFFECTS === */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

[data-tilt-container] {
    perspective: 1000px;
}

[data-tilt] {
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

/* Section number parallax styling */
.story-section__number[data-parallax-speed] {
    display: inline-block;
    will-change: transform;
}

/* Hero content fade on scroll */
[data-parallax-fade] {
    will-change: transform, opacity;
}

/* Stagger reveal for cards */
.story-products-grid .story-product-card,
.story-bento-grid .story-bento-card,
.story-feature-grid .story-feature-card,
.story-ai-group__grid .story-ai-card {
    will-change: transform, opacity;
}

/* Smooth transition for all parallax elements */
[data-parallax-speed] {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translate3d(-40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes scrollArrow {
    0%, 100% {
        opacity: 1;
        transform: rotate(45deg) translate(0, 0);
    }
    50% {
        opacity: 0.5;
        transform: rotate(45deg) translate(8px, 8px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--cl-primary-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--cl-primary-glow), 0 0 60px rgba(0, 255, 136, 0.2);
    }
}

/* Animation classes */
[data-animate] {
    opacity: 0;
}

[data-animate].is-visible {
    animation-fill-mode: forwards;
}

[data-animate="fadeInUp"].is-visible {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

[data-animate="fadeInScale"].is-visible {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

[data-animate="slideInLeft"].is-visible {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

[data-animate="slideInRight"].is-visible {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* === RESPONSIVE === */

/* Tablet Landscape */
@media (max-width: 1200px) {
    .story-section--staggered .story-products-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }

    .story-bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .story-feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait */
@media (max-width: 991px) {
    /* Reduce floating shapes on tablet */
    .floating-circle--2,
    .floating-circle--3,
    .floating-blob--2,
    .floating-line--2 {
        display: none;
    }

    .floating-circle--1,
    .floating-blob--1 {
        opacity: 0.2;
    }

    /* Staggered grid: 2 cột cho tablet */
    .story-section--staggered .story-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-section--staggered .story-product-card {
        grid-column: span 1;
    }

    .story-section--staggered .story-product-card:nth-child(4),
    .story-section--staggered .story-product-card:nth-child(5) {
        grid-column: span 1;
    }

    /* Card thứ 5 căn giữa */
    .story-section--staggered .story-product-card:nth-child(5) {
        grid-column: 1 / -1;
        max-width: 50%;
        margin: 0 auto;
    }

    .story-section--split .story-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .story-section--split .story-section__sticky {
        position: static;
    }

    .story-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-bento-card--wide {
        grid-column: span 2;
    }

    .story-bento-card--tall {
        grid-row: span 1;
    }

    .story-footer__content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .story-scroll-indicator {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --cl-section-padding: 60px;
    }

    /* Hide floating shapes on mobile for performance */
    .floating-shapes {
        display: none;
    }

    /* Reduce parallax intensity on mobile */
    .parallax-layer {
        transform: none !important;
    }

    .story-header__nav {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 15, 26, 0.98);
        padding: 24px;
        flex-direction: column;
        gap: 16px;
        border-bottom: 1px solid var(--cl-border);
    }

    .story-header__nav.open {
        display: flex;
    }

    .story-header__menu-btn {
        display: flex;
    }

    .story-hero__stats {
        gap: 24px;
    }

    .story-hero__scroll-hint {
        display: none;
    }

    /* Staggered grid: 1 cột cho mobile */
    .story-section--staggered .story-products-grid {
        grid-template-columns: 1fr;
    }

    .story-section--staggered .story-product-card,
    .story-section--staggered .story-product-card:nth-child(4),
    .story-section--staggered .story-product-card:nth-child(5) {
        grid-column: span 1;
        max-width: 100%;
        margin: 0;
    }

    .story-bento-grid {
        grid-template-columns: 1fr;
    }

    .story-bento-card--wide,
    .story-bento-card--tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .story-feature-grid {
        grid-template-columns: 1fr;
    }

    .story-ai-group__grid {
        grid-template-columns: 1fr;
    }

    .story-product-card {
        padding: 20px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .story-container {
        padding: 0 16px;
    }

    .story-section {
        padding: 48px 16px;
    }

    .story-hero__title {
        font-size: 32px;
    }

    .story-section__title {
        font-size: 24px;
    }

    .story-section--horizontal .story-product-card {
        flex: 0 0 240px;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-animate] {
        opacity: 1;
    }

    /* Hide floating shapes */
    .floating-shapes {
        display: none;
    }

    /* Hide video for users who prefer reduced motion */
    .story-hero__video {
        display: none;
    }

    /* Disable parallax transforms */
    .parallax-layer,
    [data-parallax-speed],
    [data-parallax-fade] {
        transform: none !important;
    }

    /* Show all cards without animation */
    .story-product-card,
    .story-bento-card,
    .story-feature-card,
    .story-ai-card {
        opacity: 1;
        transform: none;
    }
}

/* Focus states */
a:focus,
button:focus {
    outline: 2px solid var(--cl-primary);
    outline-offset: 2px;
}

/* Performance */
.story-hero__gradient,
.story-product-card,
.story-bento-card,
.story-feature-card,
.story-ai-card {
    will-change: transform;
}

/* ================================================================
   HYBRID BENTO GRID LAYOUT - NEW STYLES
   ================================================================ */

/* === SEARCH BAR - Icon Outside Design === */
.product-search-section {
    padding: 60px 24px 40px;
    position: relative;
    z-index: 10;
}

.product-search-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.product-search__icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.product-search__icon {
    width: 32px;
    height: 32px;
    stroke: #a855f7;
    transition: all 0.3s ease;
}

.product-search-wrapper:focus-within .product-search__icon {
    stroke: #c084fc;
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

.product-search__input-wrapper {
    position: relative;
    flex: 1;
}

.product-search__input,
input.product-search__input,
input[type="text"].product-search__input,
.comlink-scrollytelling .product-search__input,
.comlink-scrollytelling input.product-search__input {
    width: 100% !important;
    padding: 18px 28px !important;
    background-color: var(--cl-bg-dark) !important;
    background: var(--cl-bg-dark) !important;
    border: 2px solid #a855f7 !important;
    border-radius: 50px !important;
    -webkit-border-radius: 50px !important;
    -moz-border-radius: 50px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-family: var(--cl-font) !important;
    outline: none !important;
    transition: all 0.3s ease;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
}

.product-search__input::placeholder {
    color: rgba(168, 85, 247, 0.6);
}

.product-search__input:focus {
    background: var(--cl-bg-dark) !important;
    border-color: #c084fc;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15),
                0 0 30px rgba(168, 85, 247, 0.2);
}

/* Override any browser/theme default styles */
.comlink-scrollytelling .product-search__input,
.comlink-scrollytelling .product-search__input:focus,
.comlink-scrollytelling .product-search__input:hover,
.comlink-scrollytelling .product-search__input:active {
    background-color: var(--cl-bg-dark) !important;
    background: var(--cl-bg-dark) !important;
}

.product-search__results {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: var(--cl-bg-darker);
    border: 2px solid #a855f7;
    border-radius: 20px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.2);
}

.product-search__results:not([hidden]) {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--cl-text);
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: var(--cl-bg-card-hover);
}

.search-result-item__title {
    font-weight: 500;
    font-size: 14px;
}

.search-result-item__category {
    font-size: 12px;
    color: var(--cl-text-muted);
}

.search-no-results {
    padding: 24px;
    text-align: center;
    color: var(--cl-text-muted);
}

/* Search Bar Responsive */
@media (max-width: 768px) {
    .product-search-section {
        padding: 24px 16px 20px;
    }

    .product-search-wrapper {
        gap: 8px;
    }

    .product-search__icon-wrapper {
        width: 36px;
        height: 36px;
    }

    .product-search__icon {
        width: 20px;
        height: 20px;
    }

    .product-search__input,
    input.product-search__input,
    #productSearch {
        padding: 12px 16px !important;
        font-size: 14px !important;
        border-radius: 30px !important;
    }
}

/* === FEATURED PRODUCT SECTION === */
.featured-product-section {
    padding: 0 24px 40px;
    margin-top: 60px;
}

.featured-product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    max-width: var(--cl-container-max);
    margin: 0 auto;
    background: linear-gradient(135deg,
        rgba(0, 255, 136, 0.08) 0%,
        rgba(0, 212, 255, 0.08) 50%,
        rgba(168, 85, 247, 0.08) 100%);
    border: 1px solid var(--cl-border-hover);
    border-radius: 24px;
    padding: 32px 40px;
    text-decoration: none;
    color: var(--cl-text);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(0, 255, 136, 0.1) 0%,
        transparent 50%,
        rgba(168, 85, 247, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.featured-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.15),
                0 0 80px rgba(0, 255, 136, 0.1);
    border-color: var(--cl-primary);
}

.featured-product-card:hover::before {
    opacity: 1;
}

.featured-product-card__badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    background: var(--cl-primary);
    color: var(--cl-bg-dark);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}

.featured-product-card__content {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    padding-top: 24px;
    position: relative;
    z-index: 1;
}

.featured-product-card__icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    color: var(--cl-primary);
}

.featured-product-card__icon svg {
    width: 100%;
    height: 100%;
    fill: var(--cl-primary);
    stroke: var(--cl-primary);
}

.featured-product-card__info {
    flex: 1;
}

.featured-product-card__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--cl-text);
}

.featured-product-card__desc {
    font-size: 16px;
    color: var(--cl-text-muted);
    max-width: 500px;
    line-height: 1.6;
}

.featured-product-card__cta {
    font-size: 16px;
    font-weight: 600;
    color: var(--cl-primary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.featured-product-card__arrow {
    transition: transform 0.3s ease;
}

.featured-product-card:hover .featured-product-card__arrow {
    transform: translateX(4px);
}

/* Featured Product Responsive */
@media (max-width: 991px) {
    .featured-product-card {
        padding: 28px 32px;
    }

    .featured-product-card__title {
        font-size: 20px;
    }

    .featured-product-card__desc {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .featured-product-section {
        padding: 0 16px 32px;
    }

    .featured-product-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
        gap: 20px;
    }

    .featured-product-card__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding-top: 32px;
    }

    .featured-product-card__icon {
        width: 48px;
        height: 48px;
    }

    .featured-product-card__title {
        font-size: 18px;
    }

    .featured-product-card__desc {
        font-size: 14px;
    }

    .featured-product-card__cta {
        font-size: 14px;
    }
}

/* === BENTO GRID OVERVIEW === */
.bento-overview {
    padding: 20px 24px 60px;
    min-height: calc(100vh - 200px);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    max-width: var(--cl-container-max);
    margin: 0 auto;
}

/* Bento Card Base */
.bento-card {
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 24px;
    padding: 28px;
    text-decoration: none;
    color: var(--cl-text);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-family: var(--cl-font);
}

button.bento-card {
    appearance: none;
    -webkit-appearance: none;
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.bento-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--cl-border-hover);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 0 60px var(--cl-primary-subtle);
}

.bento-card:hover::before {
    opacity: 1;
}

/* Bento Card Sizes */
.bento-card--large {
    grid-row: span 2;
}

.bento-card--featured {
    grid-row: span 1;
}

/* Bento Card Colors */
.bento-card--ai::before {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, transparent 60%);
}

.bento-card--ai .bento-card__icon {
    color: #a855f7;
}

.bento-card--ai .bento-card__number {
    color: #a855f7;
}

.bento-card--medical::before {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, transparent 60%);
}

.bento-card--medical .bento-card__icon {
    color: #00d4ff;
}

.bento-card--medical .bento-card__number {
    color: #00d4ff;
}

.bento-card--network::before {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, transparent 60%);
}

.bento-card--network .bento-card__icon {
    color: var(--cl-primary);
}

.bento-card--network .bento-card__number {
    color: var(--cl-primary);
}

.bento-card--conference::before {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.15) 0%, transparent 60%);
}

.bento-card--conference .bento-card__icon {
    color: #ffb800;
}

.bento-card--conference .bento-card__number {
    color: #ffb800;
}

.bento-card--software::before {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, transparent 60%);
}

.bento-card--software .bento-card__icon {
    color: #ff6b6b;
}

.bento-card--software .bento-card__number {
    color: #ff6b6b;
}

/* Bento Card Elements */
.bento-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.bento-card__icon svg {
    width: 100%;
    height: 100%;
}

.bento-card__title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.bento-card--large .bento-card__title {
    font-size: 28px;
}

.bento-card__desc {
    font-size: 14px;
    color: var(--cl-text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.bento-card__count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.bento-card__number {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.bento-card--large .bento-card__number {
    font-size: 48px;
}

.bento-card__label {
    font-size: 14px;
    color: var(--cl-text-muted);
}

/* Preview Icons */
.bento-card__preview {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.bento-card:hover .bento-card__preview {
    opacity: 1;
    transform: translateY(0);
}

.bento-card__preview-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cl-bg-card-hover);
    border: 1px solid var(--cl-border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cl-text-muted);
}

.bento-card__preview-more {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cl-primary-subtle);
    border: 1px solid var(--cl-border);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--cl-primary);
}

/* CTA */
.bento-card__cta {
    font-size: 14px;
    font-weight: 600;
    color: var(--cl-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bento-card__arrow {
    transition: transform 0.3s ease;
}

.bento-card:hover .bento-card__arrow {
    transform: translateX(4px);
}

/* Featured Card */
.bento-card--featured {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.08) 0%, rgba(0, 212, 255, 0.08) 100%);
    border-color: var(--cl-border-hover);
}

.bento-card--featured::before {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 212, 255, 0.1) 100%);
}

.bento-card__tag {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 14px;
    background: var(--cl-primary);
    color: var(--cl-bg-dark);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bento-card__featured-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--cl-primary);
}

.bento-card__featured-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--cl-primary);
    stroke: var(--cl-primary);
}

/* === CAROUSEL === */
.category-carousel {
    padding: 40px 24px;
    background: var(--cl-bg-darker);
    border-top: 1px solid var(--cl-border);
    border-bottom: 1px solid var(--cl-border);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-carousel[hidden] {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.carousel-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 50%;
    color: var(--cl-text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-close:hover {
    background: var(--cl-bg-card-hover);
    color: var(--cl-text);
    border-color: var(--cl-primary);
}

.carousel-close svg {
    width: 20px;
    height: 20px;
}

.carousel-header__info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.carousel-header__icon {
    width: 40px;
    height: 40px;
}

.carousel-header__icon svg {
    width: 100%;
    height: 100%;
}

.carousel-header__title {
    font-size: 24px;
    font-weight: 700;
}

/* Carousel Icon Colors */
.carousel-header__icon--ai {
    color: #a855f7;
}

.carousel-header__icon--medical {
    color: #00d4ff;
}

.carousel-header__icon--network {
    color: var(--cl-primary);
}

.carousel-header__icon--conference {
    color: #ffb800;
}

.carousel-header__icon--software {
    color: #ff6b6b;
}

.carousel-view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--cl-primary);
    border: none;
    border-radius: 50px;
    color: var(--cl-bg-dark);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--cl-font);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-view-all:hover {
    background: var(--cl-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.3);
}

/* Carousel Filters */
.carousel-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.carousel-filter {
    padding: 8px 20px;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 50px;
    color: var(--cl-text-muted);
    font-size: 14px;
    font-family: var(--cl-font);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-filter:hover {
    border-color: var(--cl-primary);
    color: var(--cl-text);
}

.carousel-filter.active {
    background: var(--cl-primary-subtle);
    border-color: var(--cl-primary);
    color: var(--cl-primary);
}

/* Carousel Track */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 16px 0;
    flex: 1;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Carousel Card */
.carousel-card {
    flex: 0 0 280px;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 20px;
    padding: 24px;
    text-decoration: none;
    color: var(--cl-text);
    scroll-snap-align: start;
    transition: all 0.3s ease;
}

.carousel-card:hover {
    transform: translateY(-6px);
    border-color: var(--cl-border-hover);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}

.carousel-card__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.carousel-card__desc {
    font-size: 14px;
    color: var(--cl-text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.carousel-card__link {
    font-size: 14px;
    color: var(--cl-primary);
    font-weight: 500;
}

/* Carousel Navigation */
.carousel-nav {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 50%;
    color: var(--cl-text);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-nav:hover {
    background: var(--cl-primary);
    border-color: var(--cl-primary);
    color: var(--cl-bg-dark);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cl-border);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: var(--cl-text-muted);
}

.carousel-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--cl-primary);
}

/* === EXPANDED PRODUCTS GRID === */
.expanded-products {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--cl-border);
    animation: expandIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.expanded-products[hidden] {
    display: none;
}

@keyframes expandIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expanded-products__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.expanded-products__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--cl-text);
}

.expanded-products__collapse {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 50px;
    color: var(--cl-text-muted);
    font-size: 14px;
    font-family: var(--cl-font);
    cursor: pointer;
    transition: all 0.3s ease;
}

.expanded-products__collapse:hover {
    border-color: var(--cl-primary);
    color: var(--cl-primary);
}

.expanded-products__collapse svg {
    width: 18px;
    height: 18px;
}

.expanded-products__filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.expanded-filter {
    padding: 8px 20px;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 50px;
    color: var(--cl-text-muted);
    font-size: 14px;
    font-family: var(--cl-font);
    cursor: pointer;
    transition: all 0.3s ease;
}

.expanded-filter:hover {
    border-color: var(--cl-primary);
    color: var(--cl-text);
}

.expanded-filter.active {
    background: var(--cl-primary-subtle);
    border-color: var(--cl-primary);
    color: var(--cl-primary);
}

.expanded-products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.expanded-product-card {
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: var(--cl-text);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.expanded-product-card:hover {
    border-color: var(--cl-border-hover);
    background: var(--cl-bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.expanded-product-card__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--cl-text);
}

.expanded-product-card__desc {
    font-size: 14px;
    color: var(--cl-text-muted);
    margin-bottom: 12px;
    flex-grow: 1;
    line-height: 1.5;
}

.expanded-product-card__link {
    font-size: 14px;
    color: var(--cl-primary);
    font-weight: 500;
}

/* Update View All button to toggle state */
.carousel-view-all.expanded {
    background: var(--cl-bg-card);
    color: var(--cl-text);
    border: 1px solid var(--cl-border);
}

.carousel-view-all.expanded:hover {
    border-color: var(--cl-primary);
    color: var(--cl-primary);
    background: var(--cl-bg-card-hover);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--cl-border);
    margin-bottom: 24px;
}

.modal-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 50px;
    color: var(--cl-text);
    font-size: 14px;
    font-family: var(--cl-font);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-back:hover {
    border-color: var(--cl-primary);
}

.modal-back svg {
    width: 20px;
    height: 20px;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--cl-text);
}

.modal-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 50%;
    color: var(--cl-text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #ff4444;
    border-color: #ff4444;
    color: white;
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.modal-search {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 400px;
    padding: 12px 20px;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 50px;
}

.modal-search svg {
    width: 20px;
    height: 20px;
    stroke: var(--cl-text-muted);
    flex-shrink: 0;
}

.modal-search input {
    flex: 1;
    background: none;
    border: none;
    color: var(--cl-text);
    font-size: 14px;
    font-family: var(--cl-font);
    outline: none;
}

.modal-search input::placeholder {
    color: var(--cl-text-subtle);
}

.modal-view-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 12px;
}

.view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--cl-text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    color: var(--cl-text);
}

.view-btn.active {
    background: var(--cl-primary);
    color: var(--cl-bg-dark);
}

.view-btn svg {
    width: 20px;
    height: 20px;
}

.modal-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.modal-filter {
    padding: 8px 20px;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 50px;
    color: var(--cl-text-muted);
    font-size: 14px;
    font-family: var(--cl-font);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-filter:hover {
    border-color: var(--cl-primary);
    color: var(--cl-text);
}

.modal-filter.active {
    background: var(--cl-primary-subtle);
    border-color: var(--cl-primary);
    color: var(--cl-primary);
}

.modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: var(--cl-bg-dark);
    padding-bottom: 24px;
}

/* Ensure modal products are visible */
.modal-products {
    min-height: 200px;
}

/* Modal Products Grid View */
.modal-products--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Modal Products List View */
.modal-products--list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-product-card {
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: var(--cl-text);
    transition: all 0.3s ease;
}

.modal-product-card:hover {
    border-color: var(--cl-border-hover);
    background: var(--cl-bg-card-hover);
    transform: translateY(-4px);
}

.modal-products--list .modal-product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.modal-products--list .modal-product-card:hover {
    transform: translateX(8px);
}

.modal-product-card__content {
    flex: 1;
}

.modal-product-card__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--cl-text);
}

.modal-products--list .modal-product-card__title {
    margin-bottom: 0;
}

.modal-product-card__desc {
    font-size: 14px;
    color: var(--cl-text-muted);
    margin-bottom: 12px;
}

.modal-products--list .modal-product-card__desc {
    display: none;
}

.modal-product-card__link {
    font-size: 14px;
    color: var(--cl-primary);
    font-weight: 500;
}

/* === RESPONSIVE FOR BENTO === */
@media (max-width: 991px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-card--large {
        grid-row: span 1;
    }

    .carousel-nav {
        display: none;
    }

    .modal-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-search {
        max-width: 100%;
    }

    .modal-view-toggle {
        align-self: flex-end;
    }
}

@media (max-width: 768px) {
    .bento-overview {
        padding: 16px 16px 40px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bento-card {
        padding: 20px;
    }

    .bento-card__title {
        font-size: 18px;
    }

    .bento-card--large .bento-card__title {
        font-size: 20px;
    }

    .bento-card__number {
        font-size: 28px;
    }

    .bento-card--large .bento-card__number {
        font-size: 36px;
    }

    .bento-card__preview {
        opacity: 1;
        transform: translateY(0);
    }

    .carousel-header {
        flex-wrap: wrap;
        gap: 16px;
    }

    .carousel-view-all {
        width: 100%;
        justify-content: center;
    }

    .carousel-card {
        flex: 0 0 260px;
    }

    .modal-content {
        padding: 16px;
    }

    .modal-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .modal-back span {
        display: none;
    }

    .modal-title {
        font-size: 18px;
        order: 3;
        width: 100%;
        text-align: center;
    }

    .modal-products--grid {
        grid-template-columns: 1fr;
    }
}

/* === CRITICAL OVERRIDE - SEARCH INPUT BORDER RADIUS === */
/* These rules MUST stay at the bottom of the file for highest priority */
html body.comlink-scrollytelling input.product-search__input,
html body.comlink-scrollytelling input[type="text"].product-search__input,
html body.comlink-scrollytelling #productSearch,
html body input#productSearch,
body input#productSearch,
input#productSearch,
#productSearch {
    border-radius: 50px !important;
    -webkit-border-radius: 50px !important;
    -moz-border-radius: 50px !important;
    background: #0a0f1a !important;
    background-color: #0a0f1a !important;
    border: 2px solid #a855f7 !important;
    color: #ffffff !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Search results dropdown - ensure visible */
.product-search__input-wrapper {
    position: relative;
    overflow: visible !important;
}

.product-search__results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #0a0f1a;
    border: 2px solid #a855f7;
    border-radius: 20px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.3);
}

.product-search__results[hidden] {
    display: none !important;
}

.product-search__results:not([hidden]) {
    display: block !important;
}

/* ==========================================
   SCROLL PROGRESS BAR
   ========================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cl-primary), var(--cl-accent), var(--cl-primary));
    background-size: 200% 100%;
    transform-origin: left center;
    transform: scaleX(0);
    animation: progressGradient 3s ease infinite;
}

@keyframes progressGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Mobile */
@media (max-width: 768px) {
    .scroll-progress {
        height: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-progress {
        display: none !important;
    }
}

/* ==========================================
   VIEW TOGGLE BAR
   ========================================== */

.view-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.view-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 12px;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--cl-text-muted);
    transition: all 0.2s ease;
}

.view-btn:hover {
    color: var(--cl-text);
    background: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
    color: var(--cl-primary);
    background: var(--cl-primary-subtle);
}

.view-btn svg {
    width: 20px;
    height: 20px;
}

/* ==========================================
   LIST VIEW
   ========================================== */

.list-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-category {
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.list-category:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.list-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.list-category-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.list-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-icon svg {
    width: 28px;
    height: 28px;
}

.list-category-info {
    flex: 1;
}

.list-category-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--cl-text);
    margin-bottom: 4px;
}

.list-count {
    font-size: 13px;
    color: var(--cl-text-muted);
}

.list-expand-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cl-bg-card);
    border: 1px solid var(--cl-border);
    border-radius: 10px;
    cursor: pointer;
    color: var(--cl-text-muted);
    transition: all 0.3s ease;
}

.list-expand-btn:hover {
    color: var(--cl-primary);
    border-color: var(--cl-border-hover);
}

.list-expand-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.list-category.expanded .list-expand-btn svg {
    transform: rotate(180deg);
}

/* List Solutions - Accordion Content */
.list-solutions {
    display: none;
    padding: 0 24px 20px;
    border-top: 1px solid var(--cl-border);
}

.list-category.expanded .list-solutions {
    display: block;
}

.list-solution-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--cl-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--cl-text);
    transition: all 0.2s ease;
}

.list-solution-item:hover {
    background: var(--cl-primary-subtle);
    border-color: var(--cl-border-hover);
}

.list-solution-title {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.list-solution-desc {
    font-size: 13px;
    color: var(--cl-text-muted);
    flex: 2;
}

.list-arrow {
    width: 18px;
    height: 18px;
    color: var(--cl-text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.list-solution-item:hover .list-arrow {
    transform: translateX(4px);
    color: var(--cl-primary);
}

/* ==========================================
   LIST VIEW RESPONSIVE
   ========================================== */

@media (max-width: 991px) {
    .view-toggle-bar {
        justify-content: center;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .view-toggle-bar {
        margin-bottom: 16px;
    }

    .list-category-header {
        padding: 16px 20px;
        gap: 12px;
    }

    .list-icon {
        width: 32px;
        height: 32px;
    }

    .list-icon svg {
        width: 24px;
        height: 24px;
    }

    .list-category-info h3 {
        font-size: 15px;
    }

    .list-solutions {
        padding: 0 16px 16px;
    }

    .list-solution-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 14px;
        position: relative;
    }

    .list-solution-title,
    .list-solution-desc {
        flex: none;
        width: 100%;
    }

    .list-solution-desc {
        font-size: 12px;
    }

    .list-arrow {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
    }

    .list-solution-item:hover .list-arrow {
        transform: translateY(-50%) translateX(4px);
    }
}

/* ==========================================
   FIX: Override contain:strict từ performance plugin
   Nguyên nhân: Plugin performance inject CSS "contain: strict"
   gây height collapse và ngăn render cards ngoài viewport
   ========================================== */
.carousel-track,
#carouselTrack {
    contain: none !important;
    min-height: 200px;
}

.carousel-wrapper {
    contain: none !important;
    min-height: 220px;
}

.carousel-card {
    contain: none !important;
    min-height: 180px;
}

.category-carousel,
#categoryCarousel {
    contain: none !important;
}
