/* Custom styles for Bon Appetito */

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

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

#navbar.scrolled {
    background-color: rgba(250, 250, 245, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(15, 23, 42, 0.06);
}

#navbar.transparent {
    background-color: transparent;
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* Hamburger animation */
.bar:nth-child(1) {
    transform-origin: center;
}
.bar:nth-child(2) {
    transform-origin: center;
}
.bar:nth-child(3) {
    transform-origin: center;
}

#mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
#mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Nav links underline effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #4ade80;
    transition: width 0.3s ease;
}

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

/* Feature items */
.feature-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Menu section */
.menu-header {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.menu-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.menu-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.menu-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* About section */
.about-images {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-images.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-text {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-text.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Gallery */
.gallery-header {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

/* Testimonial */
.testimonial-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Contact */
.contact-info {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-form-wrap {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-form-wrap.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero elements */
.hero-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .feature-item,
    .menu-header,
    .menu-item,
    .about-images,
    .about-text,
    .gallery-header,
    .gallery-item,
    .testimonial-text,
    .contact-info,
    .contact-form-wrap,
    .hero-element {
        opacity: 1;
        transform: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #86efac;
}

/* Selection color */
::selection {
    background-color: #bbf7d0;
    color: #0F172A;
}
