/* Custom styles for Connections Christian Store */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F4;
}
::-webkit-scrollbar-thumb {
    background: #E8735A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D45A42;
}

/* Selection color */
::selection {
    background: #E8735A;
    color: white;
}

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

#navbar.scrolled {
    background-color: rgba(253, 248, 244, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-display,
#navbar.scrolled span {
    color: #1A1A22 !important;
}

#navbar.scrolled a:not(.bg-coral-500):not(.bg-coral-600) {
    color: #4A4A58 !important;
}

#navbar.scrolled a:not(.bg-coral-500):not(.bg-coral-600):hover {
    color: #E8735A !important;
}

/* Hero parallax-like subtle movement */
#hero .absolute.inset-0 img {
    will-change: transform;
}

/* Product card hover effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Subtle floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Fade-in for scroll reveal */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Product category card interaction */
.group {
    isolation: isolate;
}

.group::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 34, 0.9) 0%, rgba(26, 26, 34, 0.3) 50%, transparent 100%);
    z-index: 0;
    border-radius: inherit;
}

.group > img {
    position: relative;
    z-index: 1;
}

.group > .absolute {
    position: relative;
    z-index: 2;
}

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for hero badge */
@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.animate-pulse {
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Button hover lift effect */
a[href]:hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Map container */
iframe {
    filter: saturate(0.8) contrast(1.05);
    transition: filter 0.3s ease;
}

iframe:hover {
    filter: saturate(1) contrast(1);
}

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

/* 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;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
    }

    .grid lg\:grid-cols-3 > * {
        grid-column: span 1;
    }
}

/* Small phone adjustments */
@media (max-width: 360px) {
    #hero h1 {
        font-size: 2rem;
    }

    .font-display.text-3xl {
        font-size: 1.75rem;
    }
}
