/* Custom styles for Selma's Resort */

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Hide scrollbar for gallery */
.flex.overflow-hidden {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.flex.overflow-hidden::-webkit-scrollbar {
    display: none;
}

/* Scroll animation for gallery */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll {
    animation: scroll 30s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal.delay-100 {
        transition-delay: 0.1s;
    }
    
    .reveal.delay-200 {
        transition-delay: 0.2s;
    }
    
    .reveal.delay-300 {
        transition-delay: 0.3s;
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(254, 252, 232, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(124, 19, 48, 0.08);
}

/* Custom selection color */
::selection {
    background: #b91d43;
    color: #fff;
}

/* Smooth focus styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid #b91d43;
    outline-offset: 2px;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .animate-scroll {
        animation: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* Hero text animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Geometric shape animations */
@keyframes drift {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(10px, -15px) rotate(5deg);
    }
    66% {
        transform: translate(-5px, 10px) rotate(-3deg);
    }
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #b91d43;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Mobile link animation */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #b91d43;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}
