/* ============================================
   Mermaid's Retreat Siesta Key — Custom Styles
   ============================================ */

/* Base */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #050a18;
    color: #ffffff;
}

/* Selection */
::selection {
    background: rgba(235, 187, 42, 0.3);
    color: #f9ecbe;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050a18;
}
::-webkit-scrollbar-thumb {
    background: rgba(235, 187, 42, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(235, 187, 42, 0.5);
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(5, 10, 24, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ============================================
   Floating Card Animations
   ============================================ */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-beach {
    animation-delay: 0s;
}

.card-rating {
    animation-delay: -2s;
    animation-duration: 7s;
}

.card-gulf {
    animation-delay: -4s;
    animation-duration: 5.5s;
}

.card-location {
    animation-delay: -1s;
    animation-duration: 6.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Mobile toggle animation */
#mobile-toggle.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-toggle.active #bar2 {
    opacity: 0;
}
#mobile-toggle.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* ============================================
   Reveal Animations (Progressive Enhancement)
   Only applied when JS is enabled and user prefers motion
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion: disable all animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Image hover effects
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 767px) {
    .floating-card {
        display: none;
    }
}

/* ============================================
   Focus styles for accessibility
   ============================================ */
a:focus-visible, button:focus-visible {
    outline: 2px solid rgba(235, 187, 42, 0.6);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ============================================
   Smooth image loading
   ============================================ */
img {
    transition: opacity 0.3s ease;
}
img[data-src] {
    opacity: 0;
}
img.loaded {
    opacity: 1;
}
