/* Custom styles for Cedar Valley Mobile Home Park */

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(74, 25, 66, 0.08);
}

nav.scrolled .font-display,
nav.scrolled span {
    color: #4a1942 !important;
}

nav.scrolled a:not([class*="bg-"]) {
    color: #4a1942 !important;
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Staggered reveal delays */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal:nth-child(4) { transition-delay: 0.2s; }
.reveal:nth-child(5) { transition-delay: 0.25s; }
.reveal:nth-child(6) { transition-delay: 0.3s; }

/* Mobile menu transitions */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

#mobileMenu.open {
    max-height: 400px;
    padding: 0 4px;
}

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

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

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

/* Image hover zoom */
.rounded-2xl.overflow-hidden img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* Selection color */
::selection {
    background: rgba(219, 39, 119, 0.2);
    color: #4a1942;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9d174d;
}

/* Card hover glow effect */
.group:hover .group-hover\:bg-plum-800 {
    background-color: #4a1942;
}

/* Subtle pattern overlay for sections */
section::before {
    content: '';
    pointer-events: none;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}
