/* Custom styles for Island Beachfront Rentals */

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

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transitions */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-blur-xl;
    box-shadow: 0 1px 20px rgba(123, 45, 142, 0.08);
}

#navbar.scrolled .nav-link {
    color: #3d1545;
}

#navbar.scrolled .nav-icon {
    stroke: #3d1545;
}

#navbar.scrolled #nav-logo-text {
    color: #3d1545;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    position: relative;
}

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

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

.nav-link:hover {
    color: #fbbf24;
}

/* Mobile menu */
.mobile-link {
    transition: color 0.2s ease;
}

.mobile-link:hover {
    color: #7B2D8E;
}

/* Selection color */
::selection {
    background: #7B2D8E;
    color: #fff;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7B2D8E;
}

/* Property card hover image effect */
.group img {
    will-change: transform;
}

/* Subtle pattern overlay for sections */
section::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B2D8E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

/* Print styles */
@media print {
    nav, #contact-form, button, .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
