/* ===== Custom Styles for California Pizza ===== */

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

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 248, 245, 0.97) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(125, 28, 50, 0.08);
}

#navbar.scrolled .font-display {
    color: #7d1c32 !important;
}

#navbar.scrolled .menu-line {
    background: #7d1c32 !important;
}

/* Floating card animations */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* Marquee */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Menu tabs */
.menu-tab {
    transition: all 0.3s ease;
}

.menu-tab.active {
    background: #971d37 !important;
    border-color: #971d37 !important;
    color: #fff !important;
}

.menu-tab:not(.active):hover {
    border-color: #b82844 !important;
    color: #b82844 !important;
}

/* Menu cards */
.menu-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.menu-card:hover {
    transform: translateY(-6px);
}

/* Gallery items */
.gallery-item {
    cursor: pointer;
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

/* Scroll reveal (progressive enhancement) */
@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; }
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobileMenu.open .mobile-link {
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu button active state */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Back to top button */
#backToTop.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Geometric decorative shapes */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

/* Subtle pattern overlay */
.pattern-overlay {
    background-image: radial-gradient(circle, rgba(151, 29, 55, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Card hover glow */
.glow-hover:hover {
    box-shadow: 0 0 40px rgba(184, 40, 68, 0.15);
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
    width: 200px;
    height: 200px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b82844;
}

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

/* Print styles */
@media print {
    #navbar, #backToTop, .floating-card {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
