/* Custom styles for Convict Lake Campground */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1A1D21;
}
::-webkit-scrollbar-thumb {
    background: #3D4044;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #E8645B;
}

/* Nav scroll state */
nav.scrolled {
    background: rgba(26, 29, 33, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

nav.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

nav.scrolled .nav-link:hover {
    color: #F07A72 !important;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Mobile links */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Image hover effects */
.rounded-xl img,
.rounded-2xl img {
    display: block;
}

/* Gallery grid */
.grid-cols-2 .col-span-2 {
    grid-column: span 2;
}

/* Ensure hero text is readable */
#hero h1 {
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}

#hero p {
    text-shadow: 0 1px 20px rgba(0, 0, 0, 0.4);
}

/* Subtle pattern overlay for sections */
.bg-charcoal-900::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* Coral accent line animation */
.bg-coral-500 {
    position: relative;
}

.bg-coral-500::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* Button hover lift */
button, a {
    will-change: transform;
}

button:hover, a:hover {
    transform: translateY(-1px);
}

button:active, a:active {
    transform: translateY(0);
}

/* Remove transform on buttons to keep them stable */
button[type="submit"] {
    transform: none !important;
}

button[type="submit"]:hover {
    transform: translateY(-1px) !important;
}

/* Active nav link indicator */
.nav-link.active {
    color: #F07A72 !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #E8645B;
    border-radius: 50%;
}

/* Stagger animation delays for grid items */
.grid > div:nth-child(1) .reveal { transition-delay: 0.05s; }
.grid > div:nth-child(2) .reveal { transition-delay: 0.1s; }
.grid > div:nth-child(3) .reveal { transition-delay: 0.15s; }
.grid > div:nth-child(4) .reveal { transition-delay: 0.2s; }
.grid > div:nth-child(5) .reveal { transition-delay: 0.25s; }
.grid > div:nth-child(6) .reveal { transition-delay: 0.3s; }

/* Print styles */
@media print {
    nav, #mobile-menu, .animate-bounce {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
