/* Custom styles for Island Sand Condos */

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

/* Navbar transitions */
#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .logo-text {
    color: #1c4a1c;
}

#navbar.scrolled .logo-sub {
    color: #2d702d;
}

#navbar.scrolled .nav-link {
    color: #2d702d;
}

#navbar.scrolled .nav-link:hover {
    color: #5fa85f;
}

#navbar.scrolled .menu-line {
    background: #1c4a1c;
}

/* Hero animations */
#hero h1 {
    animation: fadeInUp 1s ease-out forwards;
}

#hero p {
    animation: fadeInUp 1s ease-out 0.2s forwards;
    opacity: 0;
}

#hero .flex-col {
    animation: fadeInUp 1s ease-out 0.4s forwards;
    opacity: 0;
}

#hero .inline-flex {
    animation: fadeInUp 1s ease-out 0.1s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
}

.reveal[data-reveal="left"] {
    transform: translateX(-40px);
}

.reveal[data-reveal="right"] {
    transform: translateX(40px);
}

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

/* Amenity card hover effects */
.amenity-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu .mobile-link {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

#mobileMenu .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu .mobile-link:nth-child(5) { animation-delay: 0.25s; }
#mobileMenu .mobile-link:nth-child(6) { animation-delay: 0.3s; }

/* Mobile menu button active state */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Button hover glow */
button[type="submit"]:hover {
    box-shadow: 0 10px 40px rgba(45, 112, 45, 0.3);
}

/* Image lazy loading fade-in */
img {
    opacity: 1;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8ec48e;
}

/* Reduced motion preference */
@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;
    }
    
    .reveal[data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #5fa85f;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: #d9ecd9;
    color: #1c4a1c;
}
