/* Custom Styles for Sicht.360 */

/* Page loading system */
body {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

body.fully-loaded {
    opacity: 1;
}

/* Smooth loading transitions */
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }

/* Smooth scrolling performance optimizations */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent paint flashing during scroll */
    backface-visibility: hidden;
    /* Optimize for smooth scrolling */
    overscroll-behavior: contain;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Base Classes for Observer */
.reveal-on-scroll {
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Reduced from 0.6s to 0.4s */
    /* Hardware acceleration for smooth animations */
    will-change: opacity, transform;
    transform: translateZ(0);
}

/* Specific start states */
.reveal-fade-up {
    transform: translateY(30px);
}

.reveal-slide-left {
    transform: translateX(-60px);
}

.reveal-slide-right {
    transform: translateX(60px);
}

/* Visible state applied by JS */
.is-visible {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}

/* Helper for standard fade up animation on load */
.animate-fade-up {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    /* Hardware acceleration */
    will-change: opacity, transform;
    transform: translateZ(0);
}

/* Parallax base styles */
.parallax-bg {
    min-height: 120%;
    top: -10%;
    position: absolute;
    /* Hardware acceleration for smooth parallax */
    will-change: transform;
    transform: translateZ(0);
    /* Prevent layout thrashing */
    contain: layout style paint;
}

.parallax-fg {
    will-change: transform;
    transform: translateZ(0);
    /* Prevent layout thrashing */
    contain: layout style paint;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Hero bounce-in animation for switching renders */
@keyframes heroBounceIn {
    0% {
        opacity: 0;
        transform: translateX(60px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-hero-bounce {
    animation: heroBounceIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Liquid Glass Button Styles */
.liquid-glass-btn {
    position: relative;
    z-index: 50;
    /* Ensure it's clickable */
    /* Rectangular tile shape with smooth corners */
    border-radius: 24px;
    /* Glass effect */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 10px 40px -10px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);

    /* Animation & Transition */
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Removed morphing animation */

    cursor: pointer;
    overflow: hidden;

    /* Centering content */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure arrow navigation buttons are always clickable */
.hero-nav-prev,
.hero-nav-next {
    position: relative !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}

/* Override pseudo-element for navigation buttons */
.hero-nav-prev::after,
.hero-nav-next::after {
    display: none !important;
}

.hero-nav-prev:hover,
.hero-nav-next:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 20px 50px -10px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.3);
}

.liquid-glass-btn:hover {
    transform: translateY(-5px) scale(1.05);
    /* Float up slighty */
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 20px 50px -10px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.3);
}

/* Reflection / Glare effect on hover */
.liquid-glass-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0) 40%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0) 60%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg) translate(-100%, -100%);
    transition: transform 0.6s;
    pointer-events: none;
}

.liquid-glass-btn:hover::after {
    transform: rotate(45deg) translate(20%, 20%);
    transition: transform 0.8s;
}

/* Inner image styling */
.liquid-glass-btn img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.liquid-glass-btn:hover img {
    transform: scale(1.05);
}

/* Gallery scroll animation from sides to center */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gallery-slide-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-slide-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-slide-left.is-visible,
.gallery-slide-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger animation for gallery items */
.gallery-item-1 { transition-delay: 0.1s; }
.gallery-item-2 { transition-delay: 0.2s; }
.gallery-item-3 { transition-delay: 0.3s; }
.gallery-item-4 { transition-delay: 0.4s; }

/* Cookie Banner Styles */
#cookieBanner {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

#cookieBanner.show {
    transform: translateY(0);
}

/* Cookie consent animation */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#cookieBanner.slide-up {
    animation: slideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Cookie button hover effects */
#cookieBanner button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#cookieBanner button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#cookieBanner button:hover::before {
    left: 100%;
}
