/* Custom Styles */
:root {
    --primary: #B8860B;
    --secondary: #2C1810;
    --accent: #D4AF37;
    --warm: #F5F5DC;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Hero background animation */
.hero-bg {
    background: linear-gradient(-45deg, #2C1810, #4A2C18, #3D1F12, #1A0F08);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-up {
    animation: slideUp 1s ease-out;
}

.animate-slide-up.delay-200 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.animate-slide-up.delay-400 {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

/* Intersection Observer animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in.delay-200 {
    transition-delay: 0.2s;
}

.fade-in.delay-400 {
    transition-delay: 0.4s;
}

/* Navigation styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

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

/* Menu category buttons */
.menu-category-btn {
    background-color: transparent;
    color: #666;
    font-weight: 500;
}

.menu-category-btn.active {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(184, 134, 11, 0.3);
}

.menu-category-btn:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-1px);
}

/* Menu item styles */
.menu-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform: translateY(0);
}

.menu-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.menu-item-image {
    height: 200px;
    background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
    position: relative;
    overflow: hidden;
}

.menu-item-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.menu-item:hover .menu-item-image::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

/* Gallery styles */
.gallery-item {
    aspect-ratio: 1;
    background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(184, 134, 11, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Blog card styles */
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    height: 200px;
    background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
}

/* Order modal styles */
.order-item {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.order-item:hover {
    border-color: var(--primary);
    background-color: #fafafa;
}

.order-item.selected {
    border-color: var(--primary);
    background-color: rgba(184, 134, 11, 0.05);
}

/* Cart styles */
.cart-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(184, 134, 11, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error message styles */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Form validation styles */
.invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Custom checkbox and radio styles */
.custom-checkbox,
.custom-radio {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    margin-right: 8px;
}

.custom-radio {
    border-radius: 50%;
}

.custom-checkbox:checked,
.custom-radio:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.custom-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-bg {
        background-size: 300% 300%;
    }
    
    .menu-item-image {
        height: 150px;
        font-size: 2rem;
    }
    
    .gallery-item {
        font-size: 1.5rem;
    }
    
    .blog-card-image {
        height: 150px;
        font-size: 2rem;
    }
    
    #lightboxContent img {
        max-width: 90vw;
        max-height: 80vh;
    }
}

/* Print styles */
@media print {
    .fixed,
    #navbar,
    #backToTop,
    .modal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .menu-item,
    .blog-card {
        page-break-inside: avoid;
        margin-bottom: 20pt;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #000000;
        --secondary: #000000;
        --accent: #000000;
    }
    
    .hero-bg {
        background: #000000;
    }
    
    .menu-item,
    .blog-card,
    .gallery-item {
        border: 2px solid #000000;
    }
}

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