/* Custom CSS for KEECH Landing Page - ULTRA OPTIMIZED FOR SMOOTH SCROLL */

/* Base styles - OPTIMIZED FOR SMOOTH SCROLL */
html {
    scroll-padding-top: 80px;
    scroll-behavior: auto;
    /* Use native browser scroll */
    -webkit-overflow-scrolling: touch;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Ensure no content cutting */
    overflow-x: visible;
    overflow-y: visible;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
}

html::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* Body styles - OPTIMIZED FOR SMOOTH SCROLL */
body {
    font-family: 'HandWrite', 'Comic Sans MS', cursive, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    scroll-padding-top: 80px;
    scroll-behavior: auto;
    /* Use native browser scroll */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    text-rendering: optimizeSpeed;
    /* Ensure no content cutting */
    overflow-x: visible;
    overflow-y: visible;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
}

body::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* Smooth scroll for specific sections */
section {
    scroll-margin-top: 80px;
    contain: layout style paint;
}

/* Performance optimizations */
* {
    box-sizing: border-box;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
}

*::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* Hardware acceleration for smooth animations */
#heroImage,
.marquee-track,
.marquee-item {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
    contain: layout style paint;
}

/* Custom scrollbar for better visual feedback */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2F8A57;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #236b42;
}

/* Navbar styles - ULTRA OPTIMIZED TRANSITIONS */
#navbar {
    transition: all 0.15s ease-out;
    /* ULTRA FAST */
}

/* Default state (without brand-docked) */
#navBrand {
    opacity: 0;
    transform: scale(0.95) translateY(4px);
    transition: all 0.15s ease-out;
    /* ULTRA FAST */
}

#heroTitle {
    transition: all 0.15s ease-out;
    /* ULTRA FAST */
    transform: scale(1);
    will-change: transform;
}

#heroCopy {
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.15s ease-out;
    /* ULTRA FAST */
}

#heroImage {
    transition: all 0.15s ease-out;
    /* ULTRA FAST */
    transform: translateY(24px);
}

/* ULTRA OPTIMIZED floating animation - super fast for smooth scroll */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
        /* ULTRA REDUCED movement */
    }

    100% {
        transform: translateY(0px);
    }
}

/* Apply floating to hero image with ULTRA OPTIMIZED timing */
#heroImage {
    animation: float 2s ease-in-out infinite;
    /* ULTRA FAST */
    transition: all 0.15s ease-out;
    /* ULTRA FAST */
    will-change: transform;
}

/* ULTRA OPTIMIZED auto-move animation - super fast */
#heroImage.auto-move {
    animation: auto-move 2s ease-out infinite;
    /* ULTRA FAST */
    transition: all 0.15s ease-out;
    /* ULTRA FAST */
}

/* When auto-move is active, pause floating */
#heroImage.auto-move img {
    transition: all 0.15s ease-out;
    /* ULTRA FAST */
}

/* ULTRA OPTIMIZED auto-move keyframes - super fast movement */
@keyframes auto-move {
    0% {
        transform: translateY(0px);
    }

    5% {
        /* ULTRA FAST */
        transform: translateY(0px);
    }

    100% {
        transform: translate(-200px, -300px) scale(0.5);
        /* ULTRA REDUCED movement */
    }
}

/* Marquee keyframes removed - using JavaScript animation instead */

/* Brand-docked state (after scroll) */
body.brand-docked #navbar {
    background-color: rgba(47, 138, 87, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.brand-docked #navBrand {
    opacity: 1;
    transform: scale(1) translateY(0);
}

body.brand-docked #heroTitle {
    transform: scale(0.4) translateY(-20px);
}

body.brand-docked #heroCopy {
    opacity: 1;
    transform: translateY(0);
}

body.brand-docked #heroImage {
    transform: translateY(-24px);
    animation: float 2s ease-in-out infinite;
    /* ULTRA FAST */
}

/* Responsive Typography */
@media (max-width: 640px) {
    #heroTitle {
        font-size: clamp(4rem, 25vw, 8rem);
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    #heroTitle {
        font-size: clamp(6rem, 20vw, 12rem);
    }
}

@media (min-width: 1025px) {
    #heroTitle {
        font-size: clamp(8rem, 15vw, 15rem);
    }
}

/* Gallery Grid */
.gallery-item {
    aspect-ratio: 1;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.15s ease;
    /* ULTRA FAST */
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Marquee Styles - ULTRA OPTIMIZED FOR INFINITE SCROLL */
.marquee-row {
    height: 120px;
    /* PERBESAR dari 100px ke 120px sesuai ukuran gambar */
    overflow: hidden;
    position: relative;
    width: 100%;
}

.marquee-container {
    width: 100vw;
    max-width: 100vw;
    /* Remove overflow hidden to prevent image cutting */
    overflow: visible;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: relative;
    /* Allow images to extend beyond container for seamless loop */
    overflow-x: visible;
    overflow-y: visible;
    /* CRITICAL: Remove left/right positioning that conflicts with transform */
    left: auto;
    right: auto;
}

/* Gap between marquee rows */
.marquee-gap {
    height: 2rem;
    width: 100%;
}

/* ULTRA OPTIMIZED marquee track for infinite scroll */
.marquee-track {
    display: flex;
    align-items: center;
    height: 120px;
    /* PERBESAR dari 100px ke 120px sesuai ukuran gambar */
    width: max-content;
    gap: 0.75rem;
    /* KURANGI dari 1rem ke 0.75rem (12px) untuk jarak yang lebih dekat */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    /* Remove any existing animations for JS control */
    animation: none !important;
    /* Ensure smooth movement */
    transition: none !important;
    /* Prevent any wrapping or cutting */
    flex-wrap: nowrap;
    white-space: nowrap;
    /* Ensure proper positioning for infinite scroll */
    position: relative;
    /* CRITICAL: Remove left positioning that conflicts with transform */
    left: auto;
    /* Allow images to extend beyond track boundaries */
    overflow: visible;
    /* Ensure proper z-index for layering */
    z-index: 1;
    /* Force images to be fully visible */
    min-width: 100%;
    /* Ensure no clipping */
    clip: auto;
    clip-path: none;
}

/* Perfect marquee spacing for seamless infinite loop */
.marquee-item {
    flex-shrink: 0;
    height: 120px;
    /* PERBESAR dari 100px ke 120px */
    width: 120px;
    /* PERBESAR dari 100px ke 120px */
    margin-right: 0.75rem;
    /* KURANGI dari 1.5rem ke 0.75rem (12px) */
    /* Consistent 12px gap - lebih dekat */
    border-radius: 1rem;
    overflow: visible;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: transform 0.15s ease;
    /* Hardware acceleration */
    will-change: transform;
    /* Ensure images are never cut off */
    min-width: 120px;
    /* PERBESAR dari 100px ke 120px */
    min-height: 120px;
    /* PERBESAR dari 100px ke 120px */
    /* Allow images to extend beyond item boundaries */
    overflow: visible;
    /* Ensure proper z-index */
    z-index: 3;
}

.marquee-item:hover {
    transform: scale(1.05);
}

/* Remove any margin from last image to prevent gaps */
.marquee-item:last-child {
    margin-right: 0;
}

/* Auto-Moving Marquee - JS Controlled for perfect infinite scroll */
.marquee-auto-right {
    will-change: transform;
    transform: translateZ(0);
    transition: none;
    /* Remove CSS transition for smooth JS animation */
}

.marquee-auto-left {
    will-change: transform;
    transform: translateZ(0);
    transition: none;
    /* Remove CSS transition for smooth JS animation */
}

/* Ensure smooth marquee movement */
.marquee-track {
    transition: none !important;
    /* Override any existing transitions */
}

/* CRITICAL: Ensure both rows have IDENTICAL styling and behavior */
#marqueeRow1,
#marqueeRow2 {
    /* Force identical display and positioning */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: 120px !important;
    width: max-content !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    /* Force identical overflow behavior */
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    /* Force identical positioning */
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    /* Force identical transform origin */
    transform-origin: left center !important;
    /* Force identical z-index */
    z-index: 2 !important;
    /* Force identical visibility */
    visibility: visible !important;
    opacity: 1 !important;
    /* Force identical dimensions */
    min-width: 100vw !important;
    /* Force identical margins and padding */
    margin: 0 !important;
    padding: 0 !important;
}

/* CRITICAL: Ensure all marquee items in both rows are IDENTICAL */
#marqueeRow1 .marquee-item,
#marqueeRow2 .marquee-item {
    /* Force identical styling */
    flex-shrink: 0 !important;
    height: 120px !important;
    width: 120px !important;
    margin-right: 0.75rem !important;
    border-radius: 1rem !important;
    overflow: visible !important;
    object-fit: cover !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    min-width: 120px !important;
    min-height: 120px !important;
    /* Force identical hardware acceleration */
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    will-change: transform !important;
    /* Force identical z-index */
    z-index: 3 !important;
    /* Force identical display */
    display: block !important;
    /* Force identical visibility */
    visibility: visible !important;
    opacity: 1 !important;
    /* Force identical positioning */
    position: relative !important;
    left: auto !important;
    right: auto !important;
}

/* CRITICAL: Remove all conflicting CSS rules for second row */
#marqueeRow2 {
    /* Force identical behavior with first row */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: 120px !important;
    width: max-content !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    overflow: visible !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform-origin: left center !important;
    z-index: 2 !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* CRITICAL: Ensure second row track is identical to first row */
#marqueeRow2.marquee-track {
    /* Force identical behavior with first row */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: 120px !important;
    width: max-content !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    overflow: visible !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform-origin: left center !important;
    z-index: 2 !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* CRITICAL: Ensure second row items are identical to first row items */
#marqueeRow2 .marquee-item {
    /* Force identical styling with first row items */
    flex-shrink: 0 !important;
    height: 120px !important;
    width: 120px !important;
    margin-right: 0.75rem !important;
    border-radius: 1rem !important;
    overflow: visible !important;
    object-fit: cover !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    min-width: 120px !important;
    min-height: 120px !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    will-change: transform !important;
    z-index: 3 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
}

/* CRITICAL: Remove any conflicting CSS rules */
#marqueeRow1.marquee-track,
#marqueeRow2.marquee-track {
    /* Force identical behavior */
    display: flex !important;
    align-items: center !important;
    height: 120px !important;
    width: max-content !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    z-index: 2 !important;
}

/* CRITICAL: Ensure all marquee-related elements have consistent overflow */
.marquee-container,
.marquee-container *,
.marquee-track,
.marquee-track *,
.marquee-item,
.marquee-item * {
    /* Force visible overflow */
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    /* Prevent any clipping */
    clip: auto !important;
    clip-path: none !important;
    /* Ensure proper visibility */
    visibility: visible !important;
    opacity: 1 !important;
}

/* CRITICAL: Force all elements in marquee section to show content */
#marquee,
#marquee .marquee-container,
#marquee .marquee-track,
#marquee .marquee-item {
    /* Force visible overflow */
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    /* Prevent any clipping */
    clip: auto !important;
    clip-path: none !important;
}

/* Special protection for flex containers */
#marquee .flex {
    display: flex !important;
    overflow: visible !important;
}

/* FINAL OVERRIDE: Force all elements to be visible */
#marquee * {
    /* Force overflow visible */
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    /* Prevent clipping */
    clip: auto !important;
    clip-path: none !important;
}

/* Ensure flex elements maintain their display */
#marquee .flex,
#marquee .marquee-track {
    display: flex !important;
}

/* Force all images to be visible and consistent */
#marquee img {
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    /* Ensure proper dimensions */
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    /* Force proper object fit */
    object-fit: cover !important;
    /* Force proper border radius */
    border-radius: 1rem !important;
}

/* FINAL FIX: Ensure both rows are completely identical */
#marqueeRow1,
#marqueeRow2 {
    /* Force identical display */
    display: flex !important;
    /* Force identical alignment */
    justify-content: flex-start !important;
    align-items: center !important;
    /* Force identical positioning */
    position: relative !important;
    left: auto !important;
    right: auto !important;
    /* Force identical overflow */
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    /* Force identical z-index */
    z-index: 2 !important;
    /* Force identical visibility */
    visibility: visible !important;
    opacity: 1 !important;
    /* Force identical transform origin */
    transform-origin: left center !important;
    /* Force identical dimensions */
    width: max-content !important;
    min-width: 100vw !important;
    height: 120px !important;
    /* Force identical spacing */
    gap: 0.75rem !important;
    /* Force identical margins and padding */
    margin: 0 !important;
    padding: 0 !important;
}

/* CRITICAL: Ensure transform works correctly for both rows */
#marqueeRow1,
#marqueeRow2 {
    /* Ensure proper transform origin */
    transform-origin: left center !important;
    /* Force proper positioning */
    position: relative !important;
    /* Remove conflicting positioning */
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
}

/* Ensure marquee tracks can be transformed properly */
.marquee-track {
    /* Force proper positioning */
    position: relative !important;
    /* CRITICAL: Remove left positioning that conflicts with transform */
    left: auto !important;
    right: auto !important;
    /* Ensure proper transform origin */
    transform-origin: left center !important;
    /* Force overflow visible */
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    /* Prevent any clipping */
    clip: auto !important;
    clip-path: none !important;
}

/* ULTIMATE FIX: Force absolutely identical spacing for both rows */
#marqueeRow1,
#marqueeRow2,
#marqueeRow1.marquee-track,
#marqueeRow2.marquee-track {
    /* Force absolutely identical spacing */
    gap: 0.75rem !important;
    /* Force absolutely identical margins */
    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    /* Force absolutely identical padding */
    padding: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    /* Force absolutely identical dimensions */
    height: 120px !important;
    width: max-content !important;
    min-width: 100vw !important;
    /* Force absolutely identical display */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    /* Force absolutely identical overflow */
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    /* Force absolutely identical positioning */
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    /* Force absolutely identical transform origin */
    transform-origin: left center !important;
    /* Force absolutely identical z-index */
    z-index: 2 !important;
    /* Force absolutely identical visibility */
    visibility: visible !important;
    opacity: 1 !important;
}

/* ULTIMATE FIX: Force absolutely identical spacing for all marquee items */
#marqueeRow1 .marquee-item,
#marqueeRow2 .marquee-item {
    /* Force absolutely identical spacing */
    margin-right: 0.75rem !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    /* Force absolutely identical dimensions */
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    /* Force absolutely identical styling */
    border-radius: 1rem !important;
    object-fit: cover !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    /* Force absolutely identical hardware acceleration */
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    will-change: transform !important;
    /* Force absolutely identical z-index */
    z-index: 3 !important;
    /* Force absolutely identical display */
    display: block !important;
    /* Force absolutely identical visibility */
    visibility: visible !important;
    opacity: 1 !important;
    /* Force absolutely identical positioning */
    position: relative !important;
    left: auto !important;
    right: auto !important;
    /* Force absolutely identical overflow */
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    /* Force absolutely identical clipping */
    clip: auto !important;
    clip-path: none !important;
}

/* CRITICAL: Remove margin from last image in both rows */
#marqueeRow1 .marquee-item:last-child,
#marqueeRow2 .marquee-item:last-child {
    margin-right: 0 !important;
}

/* CRITICAL: Ensure no CSS conflicts between rows */
#marqueeRow1 *,
#marqueeRow2 * {
    /* Force consistent behavior */
    box-sizing: border-box !important;
}

/* CRITICAL: Override any Tailwind or other CSS that might interfere */
#marqueeRow1,
#marqueeRow2 {
    /* Force override any conflicting CSS */
    all: unset;
    /* Re-apply our specific styles */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: 120px !important;
    width: max-content !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    overflow: visible !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform-origin: left center !important;
    z-index: 2 !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Basic marquee image styling - JavaScript will handle responsive sizing */
#marqueeRow1 img,
#marqueeRow2 img {
    border-radius: 1rem;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: visible;
    display: block;
    visibility: visible;
    opacity: 1;
    position: relative;
}

/* CSS-only infinite scroll (if JS fails) */
.marquee-css-infinite-right {
    animation: marquee-infinite-right 30s linear infinite;
}

.marquee-css-infinite-left {
    animation: marquee-infinite-left 35s linear infinite;
}

/* Performance optimizations for infinite scroll */
.marquee-container {
    contain: layout style paint;
    isolation: isolate;
}

.marquee-track {
    contain: layout style paint;
    isolation: isolate;
}

/* Smooth scrolling for marquee container */
.marquee-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
}

/* Mobile optimizations for infinite scroll */
@media (max-width: 768px) {
    .marquee-item {
        height: 100px;
        width: 100px;
        margin-right: 0.5rem;
        min-width: 100px;
        min-height: 100px;
        flex-shrink: 0;
        flex-wrap: nowrap;
    }

    .marquee-gap {
        height: 1rem;
    }

    .marquee-row {
        height: 100px;
    }

    .marquee-track {
        height: 100px;
        gap: 0.5rem;
        min-width: 600vw;
        /* Extra wide for mobile */
        overflow: visible;
        flex-wrap: nowrap;
    }

    #marqueeRow1,
    #marqueeRow2 {
        height: 100px;
        min-width: 600vw;
        /* Extra wide for mobile */
        overflow: visible;
        flex-wrap: nowrap;
    }

    #marqueeRow1 .marquee-item,
    #marqueeRow2 .marquee-item {
        height: 100px;
        width: 100px;
        margin-right: 0.5rem;
        min-width: 100px;
        min-height: 100px;
        flex-shrink: 0;
        flex-wrap: nowrap;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .marquee-item {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Video Container */
.video-container {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.video-container video {
    transition: transform 0.15s ease;
    /* ULTRA FAST */
}

.video-container:hover video {
    transform: scale(1.02);
}

/* Mobile Drawer */
#mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(0, 188, 212, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    /* Ensure proper positioning */
    overflow-y: auto;
    /* Add pointer events for backdrop click */
    pointer-events: auto;
}

#mobile-drawer.open {
    transform: translateX(0) !important;
    /* Force transform override */
}

/* Marquee Animation - Ensure it works on mobile */
.marquee-track {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: 120px !important;
    width: max-content !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    overflow: visible !important;
    position: relative !important;
    transform-origin: left center !important;
    z-index: 2 !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
}

.marquee-item {
    width: 120px !important;
    height: 120px !important;
    object-fit: cover !important;
    border-radius: 0.75rem !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure marquee works on mobile devices */
@media (max-width: 768px) {
    .marquee-track {
        min-width: 200vw !important;
        /* Ensure enough width on mobile */
        gap: 0.5rem !important;
        /* Slightly smaller gap on mobile */
    }

    .marquee-item {
        width: 100px !important;
        /* Slightly smaller images on mobile */
        height: 100px !important;
    }
}

/* Reduced Motion Support - ULTRA OPTIMIZED */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .marquee-track {
        animation: none !important;
        transition: none !important;
    }

    /* Disable hero transitions for reduced motion */
    #navBrand,
    #heroTitle,
    #heroCopy,
    #heroImage {
        transition: none !important;
        animation: none !important;
    }

    /* Show final state without animation for reduced motion */
    body.brand-docked #navBrand {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    body.brand-docked #heroTitle {
        transform: scale(0.4) translateY(-20px);
    }

    body.brand-docked #heroCopy {
        opacity: 1;
        transform: translateY(0);
    }

    body.brand-docked #heroImage {
        transform: translateY(-24px);
    }
}

/* ULTRA FAST transitions for all interactive elements */
button,
a,
.gallery-item,
.video-container {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    /* ULTRA FAST */
}

/* Focus states for accessibility - Disabled to remove red outline */
button:focus-visible,
a:focus-visible {
    outline: none;
    outline-offset: 0;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Print styles */
@media print {

    #navbar,
    #mobile-drawer,
    .video-container {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* Copy Button Styles */
#copyAddressBtn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    background-color: #eaab3a !important;
    color: #111827 !important;
    font-weight: 700;
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease;
    /* ULTRA FAST */
    cursor: pointer;
    border: none;
    outline: none;
}

#copyAddressBtn:hover {
    background-color: #f59e0b !important;
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

#copyAddressBtn:active {
    transform: scale(0.95);
}

#copyAddressBtn svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Navbar Buy Button */
#navbar button.bg-yellow-400 {
    background-color: #eaab3a !important;
    color: #111827 !important;
    font-weight: 700;
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease;
    /* ULTRA FAST */
    cursor: pointer;
    border: none;
    outline: none;
}

#navbar button.bg-yellow-400:hover {
    background-color: #f59e0b !important;
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Social Media Icons in Navbar */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: all 0.15s ease;
    /* ULTRA FAST */
}

.social-icon:hover {
    background-color: rgba(251, 191, 36, 0.2);
    transform: scale(1.1);
}

/* Social Media Images */
.social-img {
    width: 1.5rem;
    height: 1.5rem;
    filter: brightness(0) invert(1);
    transition: all 0.15s ease;
    /* ULTRA FAST */
}

.social-icon:hover .social-img {
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(35deg);
}

/* Running Text Marquee - ULTRA OPTIMIZED */
.marquee-running-text {
    overflow: hidden;
    width: 100%;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 15s linear infinite;
    /* ULTRA FAST */
}

.marquee-content span {
    display: inline-block;
    margin-right: 2rem;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Running Text Container - PERFECT INFINITE SCROLL */
#marqueeContainer {
    overflow: hidden !important;
    width: 100% !important;
    position: relative !important;
    /* CRITICAL: Ensure container has proper dimensions */
    min-height: 60px !important;
    display: block !important;
}

#marqueeText {
    display: inline-block !important;
    white-space: nowrap !important;
    will-change: transform !important;
    /* CRITICAL: Ensure running text doesn't interfere with other animations */
    z-index: 5 !important;
    position: relative !important;
    /* CRITICAL: Force text to be visible */
    visibility: visible !important;
    opacity: 1 !important;
    /* CRITICAL: Ensure text has proper dimensions */
    min-width: max-content !important;
}

/* Ensure running text is visible and smooth */
#marqueeText span {
    display: inline-block !important;
    margin-right: 2rem !important;
    white-space: nowrap !important;
    /* CRITICAL: Force spans to be visible */
    visibility: visible !important;
    opacity: 1 !important;
}

/* CRITICAL: Isolate running text from other animations */
#marqueeContainer,
#marqueeText,
#marqueeText * {
    /* Force isolation to prevent interference */
    isolation: isolate !important;
    /* Ensure proper stacking context */
    z-index: 5 !important;
    /* Prevent any clipping */
    clip: auto !important;
    clip-path: none !important;
    /* Force visibility */
    visibility: visible !important;
    opacity: 1 !important;
}

/* CRITICAL: Force running text to work - Override everything */
#marqueeText {
    /* Force transform to work */
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    /* Force animation to work */
    animation: none !important;
    transition: none !important;
    /* Force visibility */
    visibility: visible !important;
    opacity: 1 !important;
    /* Force positioning */
    position: relative !important;
    /* Force display */
    display: inline-block !important;
    /* Force white space */
    white-space: nowrap !important;
    /* Force will-change */
    will-change: transform !important;
    /* CRITICAL: Force equal padding for text */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    /* CRITICAL: Force equal margin for text */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    /* CRITICAL: Force proper height */
    height: auto !important;
    min-height: auto !important;
    line-height: normal !important;
}

/* CRITICAL: Force running text spans to work */
#marqueeText span {
    /* Force display */
    display: inline-block !important;
    /* Force margin */
    margin-right: 2rem !important;
    /* Force white space */
    white-space: nowrap !important;
    /* Force visibility */
    visibility: visible !important;
    opacity: 1 !important;
    /* CRITICAL: Force equal padding for spans */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    /* CRITICAL: Force equal margin for spans (except right) */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    /* margin-right: 2rem !important; - already set above */
    /* CRITICAL: Force proper height */
    height: auto !important;
    min-height: auto !important;
    line-height: normal !important;
}

/* CRITICAL: Override any conflicting CSS */
#marqueeText,
#marqueeText *,
#marqueeContainer,
#marqueeContainer * {
    /* Force no interference */
    isolation: isolate !important;
    /* Force proper stacking */
    z-index: 5 !important;
    /* Force no clipping */
    clip: auto !important;
    clip-path: none !important;
    /* Force visibility */
    visibility: visible !important;
    opacity: 1 !important;
    /* Force no transform override */
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
}

/* CRITICAL: Force running text to be the highest priority */
#marqueeText {
    /* Force highest priority */
    z-index: 9999 !important;
    /* Force no interference */
    isolation: isolate !important;
    /* Force transform to work */
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    /* Force animation to work */
    animation: none !important;
    transition: none !important;
    /* CRITICAL: Center text vertically */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    /* CRITICAL: Ensure proper height - adjusted for new padding */
    height: 100% !important;
    min-height: 50px !important;
    /* Reduced from 60px to 50px */
    /* CRITICAL: Ensure smooth movement */
    will-change: transform !important;
    backface-visibility: hidden !important;
    perspective: 1000px !important;
    /* CRITICAL: Force text to be visible and moveable */
    visibility: visible !important;
    opacity: 1 !important;
    /* CRITICAL: Force proper positioning */
    position: relative !important;
    /* CRITICAL: Force proper display */
    display: inline-block !important;
    /* CRITICAL: Force proper white space */
    white-space: nowrap !important;
    /* CRITICAL: Force proper height and centering */
    /* height: 50px !important; */
    min-height: 50px !important;
    max-height: 50px !important;
    line-height: 50px !important;
    /* CRITICAL: Force vertical centering */
    vertical-align: middle !important;
}

/* CRITICAL: Ensure running text container doesn't affect borders */
.border-t-2.border-b-2.border-white.py-4.overflow-hidden.w-full {
    /* Force proper sizing */
    min-height: 50px !important;
    /* Adjusted for new padding */
    display: block !important;
    position: relative !important;
    /* CRITICAL: Remove border styling for cleaner look */
    border-top-width: 0 !important;
    border-bottom-width: 0 !important;
    border-color: transparent !important;
    /* CRITICAL: Force equal padding for top and bottom borders - OVERRIDE py-4 */
    padding-top: 0.5rem !important;
    /* Reduced from 0.75rem to 0.5rem (8px) */
    padding-bottom: 0.5rem !important;
    /* Reduced from 0.75rem to 0.5rem (8px) */
    /* CRITICAL: Override Tailwind py-4 class */
    padding-left: 0 !important;
    padding-right: 0 !important;
    /* CRITICAL: Force overflow hidden for running text */
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
}

/* CRITICAL: Override Tailwind py-4 class completely */
.py-4 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* CRITICAL: Remove border styling for cleaner look */
.border-t-2 {
    border-top-width: 0 !important;
    border-top-color: transparent !important;
    border-top-style: none !important;
}

.border-b-2 {
    border-bottom-width: 0 !important;
    border-bottom-color: transparent !important;
    border-bottom-style: none !important;
}

/* CRITICAL: Override any conflicting Tailwind classes */
.border-white {
    border-color: white !important;
}

/* CRITICAL: Force container to have equal spacing - SIMPLIFIED */
.border-t-2.border-b-2.border-white.py-4.overflow-hidden.w-full {
    /* Force equal padding */
    padding: 0.5rem 0 !important;
    /* Force proper height */
    min-height: 50px !important;
    /* Force proper display */
    display: block !important;
    /* Force proper position */
    position: relative !important;
    /* Force proper overflow */
    overflow: hidden !important;
}

/* CRITICAL: Ensure running text doesn't interfere with other elements */
#marqueeContainer {
    /* Force proper positioning */
    position: relative !important;
    /* Force proper overflow */
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    /* Force proper width */
    width: 100% !important;
    /* Force proper height - adjusted for new padding */
    min-height: 50px !important;
    /* Reduced from 60px to 50px */
    /* Force proper display */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    /* Force proper z-index */
    z-index: 5 !important;
    /* CRITICAL: Force no interference */
    isolation: isolate !important;
    /* CRITICAL: Force equal padding for container */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    /* CRITICAL: Force equal margin for container */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    /* CRITICAL: Force proper height and centering */
    height: 50px !important;
    max-height: 50px !important;
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    #heroImage {
        animation: float 2s ease-in-out infinite;
        /* FAST */
        transition: all 0.12s ease-out;
        /* FAST */
    }

    #heroImage.auto-move {
        animation: auto-move 2s ease-out infinite;
        /* FAST */
        transition: all 0.12s ease-out;
        /* FAST */
    }
}

/* Desktop optimizations */
@media (min-width: 1025px) {
    .marquee-track {
        transition: transform 0.03s ease-out;
        /* FAST */
    }

    #heroImage {
        animation: float 2s ease-in-out infinite;
        /* FAST */
        transition: all 0.12s ease-out;
        /* FAST */
    }
}

/* FINAL SCROLL OPTIMIZATION - Enable smooth scroll only for navigation links */
@media (prefers-reduced-motion: no-preference) {

    /* Enable smooth scroll ONLY for navigation links, not for general scrolling */
    nav a[href^="#"] {
        scroll-behavior: smooth;
    }

    /* Keep all other elements with fast transitions */
    .marquee-track {
        transition: transform 0.05s ease-out;
        /* FAST */
    }

    #heroImage {
        transition: all 0.2s ease-out;
        /* FAST */
    }
}

/* ULTRA PERFORMANCE MODE - When performance mode is enabled */
.ultra-performance-mode {

    /* Disable all animations for maximum performance */
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    /* Keep only essential transforms */
    #heroImage,
    .marquee-track,
    .marquee-item {
        transform: translateZ(0) !important;
        backface-visibility: hidden !important;
        perspective: 1000px !important;
    }
}

/* SCROLL PERFORMANCE TEST - Add this class to test scroll performance */
.scroll-test-mode {

    /* Enable smooth scroll for testing */
    html {
        scroll-behavior: smooth;
    }

    /* Add scroll performance indicators */
    body::before {
        content: "SCROLL PERFORMANCE TEST MODE";
        position: fixed;
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 5px 10px;
        border-radius: 5px;
        font-size: 12px;
        z-index: 9999;
    }
}

/* Footer Social Icons - White Filter */
footer .social-icons img,
footer a img {
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

footer .social-icons img:hover,
footer a img:hover {
    filter: brightness(0) invert(1) opacity(0.8);
    transform: scale(1.1);
}

/* Hero Image Z-Index Fix */
#heroImage {
    z-index: 9999 !important;
    position: relative !important;
}

#heroImage img {
    z-index: 10000 !important;
    position: relative !important;
}

#heroImage.auto-move {
    z-index: 99999 !important;
    position: relative !important;
}

/* Ensure navbar doesn't cover hero */
#navbar {
    z-index: 1000 !important;
}

/* Ensure other sections don't cover hero */
section {
    z-index: 1 !important;
}

/* Running Text Animation - Infinite Loop */
.running-text-container {
    overflow: hidden;
    padding: 2rem 0;
    margin-top: 0;
    background: #00bcd3;
    position: relative;
}

.running-text-track {
    display: flex;
    white-space: nowrap;
    width: max-content;
    /* Remove CSS animation - let JavaScript handle it */
}

.running-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
    margin: 0 2rem;
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    letter-spacing: 0.15em;
    line-height: 1.5;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Smooth infinite scroll animation - IMPROVED */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.running-text-container:hover .running-text-track {
    animation-play-state: paused;
}

/* Ensure smooth scrolling */
.running-text-track {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Video Card Design - Inspired by Reference Image */
.video-card-container {
    display: flex;
    justify-content: center;
}

.video-card {
    background: #CDEFEA;
    /* bg-cloud color */
    border: 2px solid #00bcd4;
    /* blue border matching hero section */
    border-radius: 1.5rem;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    /* Rectangular container instead of square */
    min-height: 400px;
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.15);
    /* Remove hover effects */
}

.video-card-header {
    margin-bottom: 1.5rem;
}

.video-card-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: #000000;
    /* primary color */
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-align: left;
    /* Left-aligned text */
}

.video-card-content {
    margin-bottom: 2rem;
}

.video-card-description {
    font-size: 1rem;
    color: #00bcd4;
    /* primary color */
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.6;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
    text-align: left;
    /* Left-aligned text */
}

.video-preview-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.video-preview {
    width: 100%;
    height: 200px;
    /* Rectangular video container */
    border-radius: 1rem;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid #00bcd4;
    /* blue border */
    object-fit: cover;
    /* Ensure video is completely static */
    pointer-events: none;
}

/* When video has controls, enable pointer events */
.video-preview[controls] {
    pointer-events: auto;
}

/* Hide video controls by default - only show when explicitly enabled */
.video-preview:not([controls])::-webkit-media-controls {
    display: none !important;
}

.video-preview:not([controls])::-webkit-media-controls-panel {
    display: none !important;
}

.video-preview:not([controls])::-webkit-media-controls-play-button {
    display: none !important;
}

.video-preview:not([controls])::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Ensure no autoplay behavior */
.video-preview {
    -webkit-playsinline: false;
    playsinline: false;
}

/* Video preview hover effects removed - videos are now static */

/* Play video button styling - now part of video-card-btn */

.video-card-footer {
    display: flex;
    justify-content: center;
}

.video-card-btn {
    background: #eaab3a;
    /* primary color */
    color: #111827;
    border: none;
    border-radius: 2rem;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(47, 138, 87, 0.3);
}

.video-card-btn:hover {
    background: #e3a342;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 138, 87, 0.4);
}

.video-card-btn:disabled {
    background: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.video-card-btn:disabled:hover {
    background: #6b7280;
    transform: none;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-card {
        padding: 1.5rem;
        margin: 0 1rem;
        min-height: 350px;
    }

    .video-card-title {
        font-size: 1.5rem;
    }

    .video-preview {
        height: 150px;
    }
}

/* Video Modal Styling */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.video-modal-content {
    background: #CDEFEA;
    border: 3px solid #2F8A57;
    border-radius: 1.5rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(47, 138, 87, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.video-modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem 0.5rem;
}

.video-modal-close {
    background: #2F8A57;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: #236b42;
    transform: scale(1.1);
}

.video-modal-body {
    padding: 0 1.5rem 1.5rem;
}

.video-player {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(47, 138, 87, 0.2);
}

/* Mobile Responsive for Modal */
@media (max-width: 768px) {
    .video-modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }

    .video-modal-header {
        padding: 0.75rem 1rem 0.25rem;
    }

    .video-modal-body {
        padding: 0 1rem 1rem;
    }

    .video-modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }
}

/* Custom Font Import */
@font-face {
    font-family: 'HandWrite';
    src: url('font/Hand Write.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Apply custom font to body */
body {
    font-family: 'HandWrite', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Typography Improvements - Better Spacing */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    letter-spacing: 0.05em;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    letter-spacing: 0.1em;
    line-height: 1.2;
}

h2 {
    letter-spacing: 0.08em;
    line-height: 1.25;
}

p {
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.8;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
}

/* Button Text Improvements */
button,
.button {
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    letter-spacing: 0.05em;
    line-height: 1.4;
    font-weight: 600;
}

/* Navbar text and icon colors */
.navbar-hero a,
.navbar-hero span {
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    color: #000000 !important;
}

.navbar-hero .text-white {
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    color: #000000 !important;
}

.navbar-hero .text-cloud {
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    color: #000000 !important;
}

/* Social media icons in navbar - keep original colors */
.navbar-hero img:not(.logo) {
    filter: brightness(0) !important;
}

/* Logo in navbar - keep original colors */
.navbar-hero .logo {
    filter: none !important;
}

/* Logo Animation CSS - Simple and Clean */
.logo-container {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container .logo {
    width: 95vw;
    height: 95vh;
    max-width: 1600px;
    max-height: 1000px;
    object-fit: contain;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo saat scroll - mengecil dan pindah ke navbar */
.logo-container.scrolled {
    position: static;
    left: auto;
    top: auto;
    transform: scale(0.7);
    margin-top: 0;
    padding-top: 0;
}

.logo-container.scrolled .logo {
    width: 140px;
    height: 140px;
    margin: 0;
    padding: 0;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo-container .logo {
        width: 98vw;
        height: 80vh;
    }

    .logo-container.scrolled .logo {
        width: 120px;
        height: 120px;
    }
}

@media (min-width: 1200px) {
    .logo-container .logo {
        width: 85vw;
        height: 85vh;
    }
}

@media (min-width: 1600px) {
    .logo-container .logo {
        width: 80vw;
        height: 80vh;
    }
}

/* Hero section adjustments */
#hero {
    min-height: 100vh;
    background: #00bcd4;
    position: relative;
    overflow: hidden;
}

/* Section backgrounds */
.bg-primary {
    background-color: #00bcd4 !important;
}

/* Specific section backgrounds */
section.bg-primary {
    background-color: #00bcd4 !important;
}

/* Footer background */
footer.bg-primary\/90 {
    background-color: rgba(0, 188, 212, 0.9) !important;
}

/* Mobile drawer background */
#mobile-drawer.bg-primary\/95 {
    background-color: rgba(0, 188, 212, 0.95) !important;
}

/* Scroll trigger */
#scrollTrigger {
    position: absolute;
    top: 70vh;
    left: 0;
    width: 100%;
    height: 1px;
}

/* Navbar styling */
.navbar-hero {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent !important;
    background-color: transparent !important;
    padding: 1rem 0;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.navbar-hero.scrolled {
    background: transparent !important;
    background-color: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    padding: 1.5rem 0;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Override any potential Tailwind background classes */
.navbar-hero.bg-primary,
.navbar-hero.bg-primary\/95,
.navbar-hero.bg-primary\/90 {
    background: transparent !important;
    background-color: transparent !important;
}

/* Ensure logo in navbar is properly positioned */
.navbar-logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.logo-container.scrolled {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    min-height: auto;
}

/* Custom font for specific elements */
.navbar-hero {
    font-family: 'HandWrite', sans-serif;
}

.hero-text,
.section-title,
.button-text {
    font-family: 'HandWrite', sans-serif;
}

/* Ensure font loading fallback */
.font-fallback {
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
}

/* Enhanced Text Spacing for Better Readability */
.font-fallback {
    letter-spacing: 0.03em;
    line-height: 1.6;
}

/* Section Spacing Improvements */
section {
    padding: 4rem 0;
}

.py-20 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
}

/* Content Spacing */
.max-w-7xl {
    max-width: 80rem;
}

/* Grid Spacing */
.gap-12 {
    gap: 4rem;
}

.gap-8 {
    gap: 3rem;
}

/* Button Spacing */
.px-6 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* Marquee Text Spacing */
#marqueeText span {
    margin: 0 2rem;
    letter-spacing: 0.1em;
    line-height: 1.4;
}

/* Form and Input Spacing */
input,
textarea,
select {
    letter-spacing: 0.02em;
    line-height: 1.6;
    padding: 0.75rem 1rem;
}

/* List Spacing */
ul,
ol {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

/* Link Spacing */
a {
    letter-spacing: 0.02em;
    line-height: 1.5;
}

/* Mobile Responsive Spacing */
@media (max-width: 768px) {
    .py-20 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    .gap-12 {
        gap: 2rem;
    }

    .gap-8 {
        gap: 2rem;
    }

    h1 {
        letter-spacing: 0.08em;
    }

    h2 {
        letter-spacing: 0.06em;
    }

    p {
        line-height: 1.7;
        letter-spacing: 0.03em;
    }
}

/* Button backgrounds - all buttons to #eaab3a */
.bg-yellow-400,
.bg-yellow-500,
.bg-accentPink,
.bg-pink-500 {
    background-color: #eaab3a !important;
}

.hover\:bg-yellow-500:hover,
.hover\:bg-pink-500:hover {
    background-color: #d19a2e !important;
}

/* Mobile drawer button */
#mobile-drawer button {
    background-color: #eaab3a !important;
}

#mobile-drawer button:hover {
    background-color: #d19a2e !important;
}

/* Copy address button - old styling removed, using new CSS */

/* Hero Content Section - New Clean Design */
.hero-content-section {
    padding: 4rem 0;
    background: #00bcd4;
}

.hero-container {
    max-width: 90vw;
    margin: 0 auto;
    background: #000000;
    border-radius: 2rem;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 2rem;
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

.hero-content {
    text-align: left;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    color: #eaab3a;
    margin-bottom: 1.5rem;
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    letter-spacing: 0.1em;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    color: #f1f1f1;
    margin-bottom: 2rem;
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.6;
    letter-spacing: 0.02em;
    opacity: 0.9;
}

.hero-actions {
    margin-top: 2rem;
}

.copy-address-btn {
    background: #000000;
    color: #ffffff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.copy-address-btn:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.copy-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Running Text Animation - REMOVED DUPLICATE CSS - Now handled by JavaScript */

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        max-width: 95vw;
        padding: 2.5rem 1.5rem;
    }

    .hero-grid {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
        font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    }

    .hero-description {
        font-size: 1.1rem;
        font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    }

    .hero-container {
        padding: 2rem 1rem;
        border-radius: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-container {
        max-width: 98vw;
        padding: 1.5rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
        font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    }

    .hero-description {
        font-size: 1rem;
        font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    }

    .copy-address-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        font-family: 'HandWrite', 'Comic Sans MS', cursive, sans-serif;
    }
}

/* Video Section Background - Sticky */
.video-section-bg {
    background-image: url('../asset/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
    /* Ensure sticky background works properly */
    background-clip: border-box;
}

.video-section-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.video-section-bg>* {
    position: relative;
    z-index: 2;
}

/* Gallery Section Background - Sticky */
.gallery-section-bg {
    background-image: url('../asset/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
    /* Ensure sticky background works properly */
    background-clip: border-box;
}

.gallery-section-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.gallery-section-bg>* {
    position: relative;
    z-index: 2;
}

/* Mobile optimization for background images */
@media (max-width: 768px) {

    .video-section-bg,
    .gallery-section-bg {
        background-attachment: scroll;
        /* Better performance on mobile */
    }

    .video-section-bg::before,
    .gallery-section-bg::before {
        background: rgba(255, 255, 255, 0.4);
        /* Slightly more opaque on mobile but still transparent */
    }
}

/* Enhanced sticky background for Video and Gallery sections */
.video-section-bg,
.gallery-section-bg {
    /* Remove individual background images */
    background-image: none;
    background: none;

    /* Ensure proper positioning */
    position: relative;
    min-height: 100vh;

    /* Smooth transitions */
    transition: all 0.3s ease;
}

/* Ensure overlay consistency between sections */
.video-section-bg::before,
.gallery-section-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;

    /* Smooth overlay transitions */
    transition: background-color 0.3s ease;
}

/* Content layering for both sections */
.video-section-bg>*,
.gallery-section-bg>* {
    position: relative;
    z-index: 2;
}

/* Video and Gallery Wrapper with Single Sticky Background */
.video-gallery-wrapper {
    background-image: url('../asset/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
}

.video-gallery-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.video-gallery-wrapper>* {
    position: relative;
    z-index: 2;
}

/* Remove individual section backgrounds */
.video-section-bg,
.gallery-section-bg {
    background: none;
}

/* Mobile optimization for wrapper background */
@media (max-width: 768px) {
    .video-gallery-wrapper {
        background-attachment: scroll;
        /* Better performance on mobile */
    }

    .video-gallery-wrapper::before {
        background: rgba(255, 255, 255, 0.4);
        /* Slightly more opaque on mobile but still transparent */
    }
}

/* Performance optimization and loading states */
.content-hidden {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-visible {
    opacity: 1;
}

/* Optimize critical rendering path */
html {
    scroll-behavior: smooth;
}

/* Preload critical fonts */
@font-face {
    font-family: 'HandWrite';
    font-display: swap;
    src: local('HandWrite'), local('Comic Sans MS'), cursive;
}

/* Optimize images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
}

/* Reduce layout shift */
.video-card,
.gallery-section-bg,
.video-section-bg {
    contain: layout style paint;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Smart Mobile/Desktop Marquee - Separate handling */
@media (max-width: 768px) {

    /* Mobile-specific marquee settings */
    .marquee-track {
        min-width: 400vw;
        /* Extra wide for mobile */
        width: max-content;
        height: 120px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: nowrap;
        overflow: visible;
        position: relative;
    }

    .marquee-item {
        width: 100px;
        /* Smaller images on mobile */
        height: 100px;
        object-fit: cover;
        border-radius: 0.75rem;
        flex-shrink: 0;
        margin-right: 0.5rem;
    }

    .marquee-container {
        overflow: visible;
        position: relative;
    }
}

@media (min-width: 769px) {

    /* Desktop-specific marquee settings - preserve infinite loop */
    .marquee-track {
        min-width: 200vw;
        /* Optimal for desktop infinite loop */
        width: max-content;
        height: 120px;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex-wrap: nowrap;
        overflow: visible;
        position: relative;
    }

    .marquee-item {
        width: 120px;
        /* Larger images on desktop */
        height: 120px;
        object-fit: cover;
        border-radius: 0.75rem;
        flex-shrink: 0;
        margin-right: 0.75rem;
    }
}