/* Base Styles */
:root {
    --primary-color: #E63946;
    /* Vibrant Red */
    --secondary-color: #F1FAEE;
    /* Off-White */
    --accent-color: #A8DADC;
    /* Light Blue/Metallic */
    --bg-color: #000000;
    /* Absolute Black for Studio Look */
    --text-init: #FFFFFF;
    --text-dark: #1D3557;
    --card-bg: #111111;
    --chalk-color: #F5F5F5;

    --font-heading: 'Heebo', sans-serif;
    --font-body: 'Rubik', sans-serif;
    --font-accent: 'Assistant', sans-serif;

    --radius-large: 12px;
    --radius-small: 6px;

    --shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-chalk: 2px 2px 0px rgba(255, 255, 255, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    /* High detail pattern - optimized WebP */
    background: url('./public/background.webp') fixed center center;
    background-size: 1000px auto;
    color: var(--text-init);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 900;
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100px;
    background-color: transparent;
    z-index: 1000;
    padding: 0 2rem;
    transition: all 0.3s ease-in-out;
}

#navbar.scrolled {
    height: 80px;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

#navbar.hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* For absolute logo centering */
    height: 100%;
}

.nav-left,
.nav-right {
    flex: 1;
    display: flex;
    z-index: 1001;
    /* Above absolute logo if needed */
}

.nav-left {
    justify-content: flex-start;
}

.nav-right {
    justify-content: flex-end;
}

.nav-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1020;
    /* Highest priority */
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 100px;
    /* Increased for the new square/detailed logo */
    width: auto;
    object-fit: contain;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scrolled .logo-img {
    height: 60px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    text-decoration: none;
    color: #FFF;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    font-family: var(--font-heading);
}

.nav-links li a:hover {
    color: var(--primary-color);
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 900;
    border-radius: 0;
    /* Butcher-shop sharp edges */
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.cta-button:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* Hero Section - The "Window" for the Animation */
#hero {
    height: 125vh;
    /* Faster animation timing */
    position: relative;
    background: #000000;
    /* Solid Black header - masking layer */
    clip-path: inset(0);
    /* CRITICAL: Masks all fixed/absolute children to this box */
    z-index: 10;
    transform: translateZ(0);
    /* Create containing block for fixed children clipping */
}

.hero-content {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    /* In front of burger (25), behind next section (100) */
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    pointer-events: none;
}

.hero-content h1 {
    font-size: 15vw;
    color: #FFFFFF;
    /* Solid white for maximum impact */
    margin-bottom: 0;
    line-height: 0.8;
    text-transform: uppercase;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
    /* Shadow for depth against burger */
}

.hero-content p {
    font-size: 2.2rem;
    font-weight: 900;
    font-family: var(--font-heading);
    color: var(--primary-color);
    letter-spacing: 2px;
    margin-top: 0.5rem;
    text-transform: uppercase;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Canvas for Animation */
.canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 25;
    /* Higher than hero content */
    pointer-events: none;
    background: transparent;
    /* VERY IMPORTANT */
}

/* Content Wrapper - Transparent to reveal global background */
#content-wrapper {
    position: relative;
    z-index: 100;
    background: transparent;
    padding-bottom: 5rem;
}

canvas {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
}

/* Sections General - Styled as Cards */
section:not(#hero) {
    padding: 6rem 4rem;
    position: relative;
    z-index: 100;
    max-width: 1200px;
    margin: 4rem auto 8rem auto;
    background: #0a0a0a;
    /* Solid card background */
    border-radius: 40px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Specific adjustment for the first section to reveal background between Hero and Content */
#bestsellers {
    margin-top: 10vh;
}

/* Remove old pseudo-element textures */
section:not(#hero)::before {
    display: none;
}

.section-title {
    text-align: center;
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 3rem;
    /* Reduced for better framing */
    color: #FFF;
    text-shadow: var(--shadow-chalk);
    font-family: var(--font-heading);
    text-transform: uppercase;
    position: relative;
}

/* Flaming Text Effect v6.0 - Perfect Balance */
.flaming-text {
    animation: ember-glow 1.5s ease-in-out infinite alternate;
    color: #fff !important;
    position: relative;
    display: block;
    width: 100%;
    margin: 0 auto 3rem auto;
    filter: drop-shadow(0 0 10px rgba(255, 64, 0, 0.4));
}

@keyframes ember-glow {
    0% {
        text-shadow:
            0 0 8px rgba(255, 255, 255, 0.5),
            0 -3px 12px rgba(255, 200, 0, 0.4),
            0 -6px 20px rgba(255, 64, 0, 0.3);
        transform: translateY(0) rotate(-0.1deg);
    }

    100% {
        text-shadow:
            0 0 15px rgba(255, 255, 255, 0.8),
            0 -8px 25px rgba(255, 140, 0, 0.6),
            0 -15px 40px rgba(255, 20, 0, 0.5);
        transform: translateY(-2px) rotate(0.1deg);
    }
}

/* Best Sellers - Vertical Stack Layout */
.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    /* Increased gap for vertical drama */
    max-width: 900px;
    margin: 0 auto;
}

.card {
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem;
    text-align: center;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: visible;
    /* To allow flames/glow to escape */
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-20px) scale(1.02);
    border-color: var(--primary-color);
}

.card-image {
    width: 100%;
    height: 350px;
    /* Increased height for full burger view */
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.15) 0%, rgba(0, 0, 0, 1) 70%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* CRITICAL: No more cropping */
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover .card-image img {
    transform: scale(1.08) translateY(-5px);
}

.card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #FFF;
}

.card p {
    color: #888;
    font-size: 1.1rem;
}

.price {
    display: inline-block;
    font-weight: 900;
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 2rem;
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1rem;
}

/* Menu */
.menu-list {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(10, 10, 10, 0.8);
    padding: 4rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFF;
}

.dots {
    flex-grow: 1;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    margin: 0 1.5rem;
}

/* About */
#about {
    color: #FFF;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.3rem;
    line-height: 2;
}

.about-text .section-title {
    color: var(--primary-color);
}

/* Testimonials */
.testimonials-grid {
    display: flex;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.testimonial {
    background: #0a0a0a;
    padding: 3rem;
    border-left: 5px solid var(--primary-color);
    max-width: 500px;
    position: relative;
    transition: transform 0.3s;
}

.testimonial:hover {
    transform: scale(1.05);
}

.testimonial p {
    font-size: 1.2rem;
    font-style: italic;
    color: #ccc;
}

.testimonial h4 {
    margin-top: 1.5rem;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

/* Contact */
#contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 700;
}

input,
textarea {
    padding: 1rem;
    border: 2px solid var(--text-color);
    border-radius: var(--radius-small);
    font-family: var(--font-body);
    font-size: 1rem;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    background: var(--text-color);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: var(--radius-large);
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: var(--primary-color);
}

/* Floating Bubble - Ketchup Splat v2.0 */
.floating-bubble {
    position: fixed;
    bottom: 40px;
    left: 40px;
    background: radial-gradient(circle at 30% 30%, #ff4d4d 0%, #e63946 70%, #cc0000 100%);
    color: #FFF;
    padding: 1.5rem;
    border-radius: 55% 45% 72% 28% / 30% 66% 34% 70%;
    /* Organic Splat Shape */
    font-weight: 900;
    font-size: 1.5rem;
    /* Increased 1.5x */
    box-shadow: 0 0 30px rgba(230, 57, 70, 0.4);
    z-index: 2000;
    animation: float 4s ease-in-out infinite, pulse 2s ease-in-out infinite;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 195px;
    /* Increased 1.5x (130 * 1.5) */
    height: 180px;
    /* Increased 1.5x (120 * 1.5) */
    border: none;
    font-family: var(--font-heading);
    line-height: 1.1;
    text-transform: uppercase;
    transform: rotate(-10deg);
    /* Initial splatter tilt */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
}

.floating-bubble:hover {
    transform: scale(1.1) rotate(5deg);
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f0f0f0 70%, #cccccc 100%);
    color: var(--primary-color);
}

/* Mobile Menu Logic */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2000;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: #FFF;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.mobile-menu ul li {
    margin: 2rem 0;
}

.mobile-menu ul li a {
    text-decoration: none;
    color: #FFF;
    font-size: 2rem;
    font-weight: 900;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(230, 57, 70, 0.4);
    }

    50% {
        box-shadow: 0 0 50px rgba(230, 57, 70, 0.6);
    }
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 5rem 2rem 2rem;
    margin-top: 5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: center;
}

.footer-col h3 {
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-bottom {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Mobile Responsive */
/* Interactive Mouse Effects */
#mouse-smoke,
#mouse-glow {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 1s ease;
    transform: translate(-50%, -50%);
}

#mouse-smoke {
    width: 150px;
    /* v8: Shrunk to 30% of original (70% reduction) */
    mix-blend-mode: screen;
    filter: brightness(0.85) contrast(150%) grayscale(1);
    -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 70%);
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 70%);
    will-change: transform, opacity;
}

#mouse-glow {
    width: 20px;
    /* v7: Smaller glow */
    height: 20px;
    background: radial-gradient(circle, rgba(255, 64, 0, 0.8) 0%, rgba(255, 128, 0, 0.4) 50%, transparent 70%);
    border-radius: 50%;
    mix-blend-mode: plus-lighter;
    filter: blur(2px);
}

@media (max-width: 1024px) {

    #mouse-smoke,
    #mouse-glow {
        display: none !important;
    }

    #navbar {
        height: 80px;
        padding: 0 1.5rem;
    }

    .nav-left {
        display: flex !important;
        flex: 1;
    }

    .cta-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .nav-links {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    .logo-img {
        height: 60px;
    }

    .hero-content h1 {
        font-size: 15vw;
    }

    .canvas-container {
        top: 0 !important;
    }

    .floating-bubble {
        width: 130px;
        height: 120px;
        font-size: 1rem;
        bottom: 20px;
        left: 20px;
    }
}