/* Parallax Effects and Advanced Visual Enhancements for CUANTICA-IT */

/* === PARALLAX BASE STYLES === */
.parallax-container {
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 1px;
}

.parallax-element {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.parallax-back {
    transform: translateZ(-1px) scale(2);
}

.parallax-base {
    transform: translateZ(0);
}

/* === HERO PARALLAX SECTION === */
.hero-parallax {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 43, 76, 0.8) 0%, rgba(255, 107, 0, 0.6) 100%);
    z-index: 2;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    will-change: transform;
    z-index: 1;
}

/* === FLOATING ANIMATIONS === */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes float-fast {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-1deg); }
    75% { transform: translateY(8px) rotate(1deg); }
}

.float-slow { animation: float-slow 6s ease-in-out infinite; }
.float-medium { animation: float-medium 4s ease-in-out infinite; }
.float-fast { animation: float-fast 3s ease-in-out infinite; }

/* === GEOMETRIC SHAPES === */
.geometric-shape {
    position: absolute;
    opacity: 0.1;
    pointer-events: none;
}

.shape-1 {
    top: 10%;
    left: 5%;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #FF6B00, #0A2B4C);
    border-radius: 20px;
    animation: float-slow 8s ease-in-out infinite;
}

.shape-2 {
    top: 60%;
    right: 10%;
    width: 80px;
    height: 80px;
    background: linear-gradient(-45deg, #FF6B00, #0A2B4C);
    border-radius: 50%;
    animation: float-medium 6s ease-in-out infinite;
}

.shape-3 {
    bottom: 20%;
    left: 15%;
    width: 60px;
    height: 60px;
    background: linear-gradient(90deg, #FF6B00, #0A2B4C);
    transform: rotate(45deg);
    animation: float-fast 4s ease-in-out infinite;
}

/* === SCROLL REVEAL ANIMATIONS === */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* === ADVANCED HOVER EFFECTS === */
.hover-tilt {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-style: preserve-3d;
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) translateZ(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hover-glow {
    position: relative;
    transition: all 0.3s ease;
}

.hover-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.2), rgba(10, 43, 76, 0.2));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.hover-glow:hover::after {
    opacity: 1;
}

/* === SECTION BACKGROUNDS WITH PARALLAX === */
.section-parallax {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 400px;
}

.section-parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 43, 76, 0.8);
    z-index: 1;
}

.section-parallax > * {
    position: relative;
    z-index: 2;
}

/* === ANIMATED GRADIENT BACKGROUNDS === */
.animated-gradient {
    background: linear-gradient(-45deg, #FF6B00, #0A2B4C, #FF6B00, #0A2B4C);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === PARTICLE EFFECT STYLES === */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 107, 0, 0.6);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

.particle:nth-child(2n) {
    background: rgba(10, 43, 76, 0.6);
    animation-duration: 25s;
}

.particle:nth-child(3n) {
    width: 2px;
    height: 2px;
    animation-duration: 15s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* === CAROUSEL — Hide non-active slides on load === */
.carousel-slide {
    opacity: 0;
    transform: scale(1.05);
    transition: all 1s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* === GLASS MORPHISM EFFECTS === */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-dark {
    background: rgba(10, 43, 76, 0.3);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 107, 0, 0.2);
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 768px) {
    .hero-background {
        background-attachment: scroll;
    }
    
    .section-parallax {
        background-attachment: scroll;
    }
    
    .hover-tilt:hover {
        transform: none;
    }
}

/* === SMOOTH SCROLLING IMPROVEMENTS === */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    .parallax-back,
    .parallax-base,
    .hero-background,
    .section-parallax {
        transform: none !important;
        background-attachment: scroll !important;
    }
    
    .float-slow,
    .float-medium,
    .float-fast,
    .particle {
        animation: none !important;
    }
}