/* ===== FSI 3D WEBSITE - PREMIUM STYLES ===== */
/* Light Theme + Red Accent (từ PDF FSI) */

:root {
    /* FSI Brand Colors - ĐỎ chủ đạo */
    --primary: #E31937;
    --primary-dark: #B91430;
    --primary-light: #FF3D54;
    --secondary: #1a1a2e;
    --accent: #E31937;

    /* Light Theme */
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --bg-dark: #0f0f1a;
    --text: #1a1a2e;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --border: rgba(0, 0, 0, 0.08);

    /* Effects */
    --gradient: linear-gradient(135deg, #E31937 0%, #FF6B6B 50%, #E31937 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    --shadow: 0 4px 30px rgba(227, 25, 55, 0.15);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --section-padding: clamp(80px, 12vw, 160px);
}

/* ===== LOADING SCREEN ===== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-inner {
    text-align: center;
}

.loader-logo-img {
    width: 200px;
    height: auto;
    margin-bottom: 30px;
    filter: brightness(0) invert(1);
    /* Convert to white */
    animation: pulse 2s ease-in-out infinite;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-progress {
    height: 100%;
    background: white;
    width: 0%;
    animation: loading 2s ease-in-out forwards;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

@keyframes loading {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 80px);
}

/* ===== LOADER ===== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--primary);
    z-index: 100000;
    /* Ensure loader is above EVERYTHING */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.loader.loaded {
    transform: translateY(-100%);
}

.loader-inner {
    text-align: center;
}

.loader-logo-img {
    width: 200px;
    height: auto;
    margin-bottom: 30px;
    filter: brightness(0) invert(1);
    /* Convert to white */
}

.loader-text {
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 900;
    color: white;
    letter-spacing: -0.02em;
    animation: pulse 1s ease-in-out infinite alternate;
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    margin: 30px auto 0;
    border-radius: 3px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes pulse {
    from {
        opacity: 0.7;
    }

    to {
        opacity: 1;
    }
}

/* ===== CURSOR ===== */
.cursor,
.cursor-follower {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: difference;
}

.cursor {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.3s, height 0.3s;
}

.cursor-follower.hover {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1024px) {

    .cursor,
    .cursor-follower {
        display: none;
    }
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    background: transparent;
    /* Transparent initially */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* White background when scrolled */
.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.08);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    transition: all 0.3s ease;
    filter: brightness(0) invert(1);
    /* White logo initially */
}

/* Hide 2D logo when scrolled (3D logo takes over) */
.nav.scrolled .nav-logo-img {
    opacity: 0;
    pointer-events: none;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    /* White initially for hero section */
    position: relative;
    overflow: hidden;
    padding: 5px 0;
    transition: color 0.3s ease;
}

/* Dark text when scrolled */
.nav.scrolled .nav-link {
    color: var(--text);
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 100%;
    left: 0;
    color: var(--primary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: transparent;
}

.nav-link:hover::before {
    transform: translateY(-100%);
}

.nav-cta {
    padding: 12px 28px;
    background: transparent;
    color: white;
    border: 2px solid white;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 100px;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

/* Filled red when scrolled */
.nav.scrolled .nav-cta {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.nav-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-dark);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.nav-cta:hover::before {
    transform: translateY(0);
}

.nav-cta span {
    position: relative;
    z-index: 1;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1rem;
    padding: 18px 36px;
    border-radius: 100px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--text);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover::before {
    transform: translateX(0);
}

.btn-text,
.btn-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1100;
    /* Above nav (1000) so 3D logo can appear on top */
    padding: 100px 0 80px;
    overflow: hidden;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

.hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 80px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding-bottom: 145px;
    align-items: center;
    width: 100%;
}

.hero-text {
    position: relative;
    z-index: 10;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(227, 25, 55, 0.08);
    border-radius: 100px;
    margin-bottom: 30px;
}

.tag-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.tag-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Typography Effects */
.line-mask {
    display: contents;
    overflow: hidden;
    margin-bottom: -0.1em;
}

.line-mask span {
    display: block;
    transform: translateY(100%);
    will-change: transform;
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 20px 0 30px;
    color: var(--text);
}

.text-outline {
    color: transparent;
    -webkit-text-stroke: 3px var(--primary);
    font-style: normal;
    display: inline-block;
}

.hero-desc-wrapper {
    overflow: hidden;
    margin-bottom: 40px;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 450px;
    font-weight: 500;
    line-height: 1.7;
    transform: translateY(100%);
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    margin-bottom: 2rem;
}

/* ===== HERO 3D (Moved to body level) ===== */
/* ===== HERO 3D (Moved to body level) ===== */
.hero-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9995;
    /* Super high Z-Index to FORCE visibility */
    pointer-events: none;
    /* Let clicks pass through */
    overflow: hidden;
}

#heroCanvas {
    width: 100% !important;
    height: 100% !important;
}

/* Removed duplicate .hero-3d and #heroCanvas rules */

.hero-scroll {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.hero-scroll span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-light);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.scroll-line {
    width: 1px;
    height: 80px;
    background: rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform: translateY(-100%);
    animation: scrollLine 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Fade 3D canvas on mobile so text is more readable */
    .hero-3d {
        opacity: 0.3;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-desc {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }
}

/* ===== MARQUEE ===== */
.marquee {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    padding: 15px 0;
    background: #e31937;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 60px;
    padding-right: 60px;
}

.marquee-content span {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

.marquee-dot {
    color: var(--primary) !important;
    font-size: 0.5rem !important;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ===== SECTIONS ===== */
section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 10;
    /* Above neonCanvas (z-index: 1) */
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
    position: relative;
    padding-left: 40px;
}

.section-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 25px;
    height: 2px;
    background: var(--primary);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.text-accent {
    color: var(--primary);
}

/* ===== ABOUT ===== */
.about {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(227, 25, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 102, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.about-header {
    max-width: 700px;
    margin-bottom: 80px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.about-card {
    padding: 40px 30px;
    background: var(--bg-alt);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.about-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.about-card:hover::before {
    opacity: 1;
}

.about-card:hover {
    transform: translateY(-10px);
}

.about-card:hover * {
    color: white !important;
}

.card-num {
    font-size: 4rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.05);
    line-height: 1;
    margin-bottom: 20px;
    transition: color 0.5s ease;
    position: relative;
    z-index: 1;
}

.about-card:hover .card-num {
    color: rgba(255, 255, 255, 0.2) !important;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== SOLUTIONS ===== */
.solutions {
    background: var(--bg-alt);
}

.solutions-header {
    /* max-width: 700px; */
    margin-bottom: 60px;
}

.solutions-list {
    display: flex;
    flex-direction: column;
}

.solution-item {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    gap: 30px;
    align-items: center;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    position: relative;
    transition: border-color 0.3s ease;
}

/* Removed background ::before effect */

.solution-item:hover {
    border-color: var(--primary);
    /* Only change border color */
}

.solution-num {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    transition: color 0.4s ease;
}

/* Removed hover color change for num */

.solution-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text);
}

.solution-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    transition: color 0.4s ease;
}

/* Removed hover color change for desc */

.solution-arrow {
    font-size: 2rem;
    font-weight: 300;
    transition: transform 0.4s ease;
    color: var(--primary);
}

.solution-item:hover .solution-arrow {
    transform: translateX(10px);
}

/* Removed conflicting .solution-features rules to use solutions.css definition */

.solution-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: white;
    font-weight: bold;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 15px;
}

/* ===== EQUIPMENT SECTION ===== */
.equipment {
    background: var(--bg);
    padding: 100px 0;
}

.equipment-header {
    text-align: center;
    margin-bottom: 60px;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.equip-card {
    background: var(--bg-alt);
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.equip-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(227, 25, 55, 0.15);
}

.equip-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.equip-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.equip-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .equipment-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.solution-detail {
    display: none;
}

@media (max-width: 768px) {
    .solution-item {
        grid-template-columns: 50px 1fr 40px;
        gap: 15px;
    }

    .solution-title {
        font-size: 1.3rem;
    }
}

/* ===== GALLERY - 3D Viewer Style ===== */
.gallery {
    background: #0a0a0a;
    color: white;
    padding: 80px 0 0;
}

.gallery .section-tag::before {
    background: white;
}

.gallery .section-tag {
    color: white;
}

.gallery .text-accent {
    color: #D4AF37;
}

.gallery-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    z-index: 20;
    pointer-events: none;
}

.gallery-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #D4AF37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.3rem;
}

.gallery-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Gallery Full Container */
.gallery {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: transparent;
    overflow: hidden;
    margin: 0;
    padding: 0;
    z-index: 20;
    /* Ensure content is above the fixed background (z-10) */
}

/* Fixed Background Layer */
#gallery-fixed-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Revert to -1 to stay behind content */
    background: radial-gradient(ellipse at 50% 30%, #6b5344 0%, #3d2e24 35%, #1a1410 70%, #0d0a08 100%);
    opacity: 0;
    pointer-events: none;
}

/* Smooth Transition Header Mask */
/* Removed white gradient overlay */

/* Background Pulse Effect */
.gallery-bg-pulse {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 35%, rgba(180, 140, 100, 0.4) 0%, rgba(100, 70, 50, 0.2) 30%, transparent 60%);
    animation: bgPulse 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.15);
    }
}

/* Models Wrapper - Positioned below Nav */
/* Main Carousel Container */
.gallery-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Models Wrapper - The actual 3D Canvas area */
.gallery-models-wrapper {
    position: absolute;
    top: -35px;
    /* Offset for Nav */
    left: 0;
    width: 100%;
    height: calc(100% - 70px);
    /* Fill remaining space */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation Buttons */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 2px solid #D4AF37;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #D4AF37;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.gallery-nav-btn:hover {
    background: #D4AF37;
    color: #1a1a1a;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn svg {
    width: 24px;
    height: 24px;
}

.gallery-nav-prev {
    left: 2rem;
}

.gallery-nav-next {
    right: 2rem;
}

/* Info Panel - Glass Effect */
.gallery-info-panel {
    position: absolute;
    bottom: 205px;
    left: 2rem;
    max-width: 400px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    z-index: 15;
}

.gallery-artifact-name {
    font-family: 'Playfair Display', 'Be Vietnam Pro', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #D4AF37;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.gallery-artifact-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* Counter */
.gallery-counter {
    position: absolute;
    bottom: 100px;
    right: 2rem;
    font-size: 1.2rem;
    color: #D4AF37;
    z-index: 15;
}

.gallery-counter-separator {
    margin: 0 5px;
    color: rgba(255, 255, 255, 0.4);
}

/* Thumbnail Strip */
.gallery-thumbnail-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 20px 77px;
    /* background: linear-gradient(transparent, rgba(0, 0, 0, 0.9)); */
    z-index: 20;
}

.gallery-thumbnail-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    justify-content: center;
    padding: 17px 0;
    scroll-behavior: smooth;
}

.gallery-thumbnail-wrapper::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbnail-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.gallery-thumbnail-wrapper::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 2px;
}

.gallery-thumb {
    flex: 0 0 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-thumb:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-3px);
}

.gallery-thumb:hover img {
    transform: scale(1.1);
}

.gallery-thumb.active {
    border-color: #D4AF37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Model Viewer in Gallery */
#galleryModelViewer {
    background: transparent;
}

#galleryModelViewer::part(default-progress-bar) {
    display: none;
}

@media (max-width: 768px) {
    .gallery-3d-viewer {
        height: 70vh;
        min-height: 450px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

    .gallery-prev {
        left: 1rem;
    }

    .gallery-next {
        right: 1rem;
    }

    .gallery-info {
        left: 1rem;
        right: 1rem;
        max-width: none;
        bottom: 90px;
        padding: 1rem;
    }

    .artifact-name {
        font-size: 1.2rem;
    }

    .gallery-counter {
        bottom: auto;
        top: 1rem;
        right: 1rem;
    }
}

/* ===== STATS ===== */
.stats {
    background: var(--bg-alt);
    position: relative;
    overflow: hidden;
}

.stats-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.stats-num {
    position: absolute;
    font-size: clamp(10rem, 25vw, 20rem);
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    line-height: 1;
}

.stats-num-1 {
    top: -50px;
    left: -50px;
}

.stats-num-2 {
    bottom: -50px;
    right: -50px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    padding: 50px 30px;
    background: var(--bg);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(227, 25, 55, 0.15);
}

.stat-value {
    margin-bottom: 15px;
}

.stat-value .counter {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.stat-value .stat-plus {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-sub {
    font-size: 0.85rem;
    color: var(--text-light);
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== WHY ===== */
.why {
    background: var(--bg);
}

.why-header {
    max-width: 500px;
    margin-bottom: 60px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.why-card {
    padding: 50px 40px;
    background: var(--bg-alt);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.why-card:hover {
    background: var(--text);
    color: white;
}

.why-num {
    font-size: 5rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.05);
    position: absolute;
    top: 20px;
    right: 30px;
    line-height: 1;
    transition: color 0.4s ease;
}

.why-card:hover .why-num {
    color: rgba(255, 255, 255, 0.1);
}

.why-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
}

.why-card p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
    position: relative;
    transition: color 0.4s ease;
}

.why-card:hover p {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .why-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== CONTACT ===== */
.contact {
    background: var(--bg);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: start;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 1rem;
    color: var(--text);
}

.info-link {
    transition: color 0.3s ease;
}

.info-link:hover {
    color: var(--primary);
}

.contact-form {
    background: var(--bg-alt);
    padding: 50px;
    border-radius: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.form-group {
    position: relative;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-group label {
    position: absolute;
    left: 0;
    top: 15px;
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group input:focus~label,
.form-group input:valid~label,
.form-group select:focus~label,
.form-group select:valid~label,
.form-group textarea:focus~label,
.form-group textarea:valid~label {
    top: -10px;
    font-size: 0.75rem;
    color: var(--primary);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.form-group input:focus~.input-line,
.form-group select:focus~.input-line,
.form-group textarea:focus~.input-line {
    width: 100%;
}

.form-group textarea {
    resize: none;
    min-height: 120px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
}

@media (max-width: 1024px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 30px;
    }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--text);
    color: white;
    padding: 80px 0 30px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.footer-logo {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    display: block;
    margin-bottom: 20px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    max-width: 400px;
    margin-bottom: 10px;
}

.footer-tagline {
    color: var(--primary) !important;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    color: white;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
    }

    .footer-links {
        gap: 40px;
    }
}

/* ===== NEON TRAIL EFFECT ===== */
/* ===== TRAIL EFFECT (Opacity 10% as requested) ===== */
#trailCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 900;
    opacity: 0.5;
    /* Reduced to 10% */
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    /* Increased to 2000 to be above Hero (1100) */
    padding: 20px 0;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.08);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    transition: all 0.3s ease;
    /* Removed filter invert - keep original red logo to be visible on white bg */
}

/* Hide 2D logo when scrolled (3D logo takes over) */
.nav.scrolled .nav-logo-img {
    opacity: 0;
    pointer-events: none;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    /* Black text to see on white hero bg */
    position: relative;
    overflow: hidden;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 100%;
    left: 0;
    color: var(--primary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: transparent;
}

.nav-link:hover::before {
    transform: translateY(-100%);
}

.nav-cta {
    padding: 12px 28px;
    background: transparent;
    color: var(--primary);
    /* Red text initially */
    border: 2px solid var(--primary);
    /* Red border initially */
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 100px;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

/* Filled red when scrolled */
.nav.scrolled .nav-cta {
    background: var(--primary);
    color: white;
}

/* ===== NEW FOOTER STYLE ===== */
.footer {
    background: white;
    color: #333;
    padding-top: 60px;
    font-family: 'Be Vietnam Pro', sans-serif;
    border-top: 1px solid #eee;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-logo-img {
    height: 60px;
    object-fit: contain;
    margin-bottom: 5px;
}

.footer-slogan {
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 600;
    color: #555;
}

.footer-contact-list .f-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.f-icon {
    color: var(--primary);
    font-size: 1.1rem;
    min-width: 20px;
}

.footer-col h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.footer-links-list {
    list-style: none;
    padding: 0;
}

.footer-links-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
}

.footer-links-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    background: var(--primary);
}

.footer-links-list a {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links-list a:hover {
    color: var(--primary);
}

.social-links-footer {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: #999;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.social-icon:hover {
    background: var(--primary);
}

.bct-logo {
    width: 150px;
    height: auto;
}

.footer-bottom {
    background: #cc0000;
    /* Brand Red Darker */
    color: white;
    padding: 15px 0;
    margin-top: 50px;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-bottom-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin: 0 5px;
}

.footer-bottom-links a:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}