/* ===============================================
   PARALLAX MODERN EFFECTS & ANIMATIONS
   =============================================== */

/* Modern Gradient Overlays */
.gradient-overlay {
    position: relative;
    overflow: hidden;
}

.gradient-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 186, 90, 0.3) 0%,
            rgba(26, 26, 26, 0.5) 100%);
    z-index: 1;
    transition: opacity 0.6s ease;
}

.gradient-overlay:hover::before {
    opacity: 0.7;
}

/* Parallax Container */
.parallax-container {
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

/* Hero Section Modern Parallax */
#homepage {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    will-change: transform;
}

/* CTA Section - Overlay più chiaro per vedere l'immagine */
.bg-image.overlay.parallax-section {
    background-attachment: scroll !important;
    background-position: center !important;
}

.bg-image.overlay.parallax-section::before {
    background: rgba(0, 0, 0, 0.3) !important;
}

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Glassmorphism Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    color: #1a1a1a;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 50px 0 rgba(31, 38, 135, 0.25);
}

/* Dark Glass Card for Better Contrast with White Text */
.glass-card-dark {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card-dark:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 50px 0 rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Image Parallax Effect */
.img-parallax {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: all 0.4s ease;
}

.img-parallax img {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform;
}

.img-parallax:hover img {
    transform: scale(1.1) rotate(2deg);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #ffba5a 0%, #ff6b6b 50%, #4ecdc4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Parallax Mouse Move Effect */
.mouse-parallax {
    transition: transform 0.3s ease-out;
    transform-style: preserve-3d;
}

/* Modern Button Hover */
.btn-modern {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffba5a 0%, #ff9a56 100%);
    border: none;
    color: white;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(255, 186, 90, 0.3);
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 186, 90, 0.5);
}

/* Room Card Modern */
.room-modern {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.room-modern:hover {
    transform: translateY(-15px) rotate(-1deg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.room-modern .img-wrap {
    position: relative;
    overflow: hidden;
}

.room-modern .img-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.room-modern:hover .img-wrap::after {
    opacity: 1;
}

.room-modern img {
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.room-modern:hover img {
    transform: scale(1.15);
}

/* Pulsing Animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Magnetic Effect for CTA */
.magnetic {
    transition: transform 0.2s ease-out;
    cursor: pointer;
}

/* Smooth Parallax Sections with JS */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fixed Background Sections (CSS ONLY - NO JS) */
.fixed-bg-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #ffba5a 0%, #ff6b6b 100%);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Modern Section Background */
.section-modern {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.section-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 186, 90, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(78, 205, 196, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Stagger Animation Delays */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

/* Responsive Adjustments */
@media (max-width: 768px) {

    #homepage,
    .parallax-section,
    .fixed-bg-section {
        background-attachment: scroll;
        min-height: 400px;
    }

    .glass-card:hover {
        transform: translateY(-5px) scale(1.01);
    }

    .glass-card-dark:hover {
        transform: translateY(-5px) scale(1.01);
    }

    .room-modern:hover {
        transform: translateY(-10px);
    }
}

/* Performance Optimization */
.will-change-transform {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}