/* Custom styles for Sunchaser Vacations */

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

/* Base typography */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 243, 199, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(88, 28, 135, 0.08);
}

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

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

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

/* Rental cards */
.rental-card {
    transform: translateY(0);
}

.rental-card img {
    will-change: transform;
}

/* Amenity cards */
.amenity-card {
    transform: translateY(0);
}

/* Hero image composition */
#hero .lg\\:col-span-5 {
    position: relative;
    z-index: 10;
}

/* Custom selection color */
::selection {
    background-color: rgba(245, 158, 11, 0.3);
    color: #581c87;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9333ea;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Form date inputs */
input[type="date"] {
    color-scheme: light;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .rental-card img,
    .amenity-card,
    #back-to-top {
        transition: none;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .rental-card {
        border-radius: 1.5rem;
    }
    
    .amenity-card {
        border-radius: 1.25rem;
    }
}

/* Large desktop */
@media (min-width: 1280px) {
    .font-display {
        font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    }
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}
