/* --- Emerald Intelligence Luxe Theme --- */
:root {
    /* Color Palette */
    --emerald-deep: #062F28;
    --emerald-dark: #021a15;
    --emerald-glow: #00ff9d;
    /* Neon Emerald for subtle glow */
    --gold-accent: #CFAE70;
    --gold-shimmer: linear-gradient(45deg, rgba(207, 174, 112, 0.1) 25%, rgba(207, 174, 112, 0.3) 50%, rgba(207, 174, 112, 0.1) 75%);
    --text-white: #F8F8F8;
    --text-muted: #B0C4DE;
    --glass-bg: rgba(6, 47, 40, 0.65);
    --glass-border: rgba(207, 174, 112, 0.2);
    --glass-blur: 12px;

    /* Typography */
    --font-en: 'Poppins', 'Montserrat', sans-serif;
    --font-ar: 'Tajawal', 'Cairo', sans-serif;

    /* Shadows */
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 15px rgba(0, 255, 157, 0.15);
}

/* Base Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--emerald-deep) 0%, var(--emerald-dark) 100%);
    background-attachment: fixed;
    color: var(--text-white);
    font-family: var(--font-en);
    min-height: 100vh;
    overflow-x: hidden;
}

body.lang-ar {
    font-family: var(--font-ar);
    direction: rtl;
}

/* Background Effects */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(207, 174, 112, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
    animation: pulseGlow 10s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Header - Glassmorphism */
.main-header {
    /* bg opacity lowered to help mix-blend-mode if needed, but separate stacking context might block blending with body */
    /* Using screen blend mode against a dark header background works for removing black */
    background: rgba(6, 47, 40, 0.95);
    /* More opaque to provide dark backing for screen blend */
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    padding: 0.5rem 2rem;
    /* Reduced padding for big logo */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.brand-logo {
    height: 120px;
    /* Big */
    width: 120px;
    object-fit: contain;
    border-radius: 50%;
    /* Round */
    /* Filters removed for PNG transparency */
    transition: transform 0.3s ease;
    border: 2px solid var(--gold-accent);
    padding: 5px;
}

.brand-logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px rgba(207, 174, 112, 0.4);
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--gold-accent);
    color: var(--gold-accent);
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.lang-btn:hover {
    background: var(--gold-accent);
    color: var(--emerald-deep);
    box-shadow: 0 0 15px rgba(207, 174, 112, 0.4);
}

/* Main Content */
/* Main Content - Full Width Overhaul */
main {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 3rem 0;
    /* No side padding for full-width look */
}

.section-title {
    text-align: center;
    margin: 3rem 0;
    color: var(--gold-accent);
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold-accent);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Menu Grid - Responsive 3/2/1 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding: 0 4rem;
    /* Balanced side padding inside the grid */
}

@media (max-width: 1100px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
    }
}

/* Premium Card Design - Larger & Juicy */
.menu-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Thin outline stroke */
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.2, 1, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.menu-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(207, 174, 112, 0.2);
    border-color: var(--gold-accent);
}

.card-image-container {
    height: 320px;
    /* Increased size by ~30% */
    overflow: hidden;
    position: relative;
    background: #000;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill frame, juicier look */
    transition: transform 0.8s ease;
}

.menu-card:hover .card-image {
    transform: scale(1.15);
}

/* Bestseller Badge */
.bestseller-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--gold-accent);
    color: var(--emerald-dark);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Image Shimmer Loading Effect */
.card-image-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-25deg);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 200%;
    }
}

.card-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dish-name {
    font-size: 1.4rem;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.dish-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex-grow: 1;
}

.dish-price {
    font-size: 1.3rem;
    color: var(--gold-accent);
    font-weight: 700;
    align-self: flex-end;
    text-shadow: 0 0 10px rgba(207, 174, 112, 0.2);
}

/* Best Sellers Highlight Section Adjustments */
.highlight-section {
    background: rgba(6, 47, 40, 0.4);
    border: 1px solid var(--gold-accent);
    border-top: none;
    border-bottom: 1px solid var(--gold-accent);
    border-radius: 0;
    padding: 4rem 0;
    position: relative;
    box-shadow: none;
    margin-bottom: 5rem;
    width: 100%;
}

#best-sellers .menu-grid {
    padding-top: 2rem;
}

.highlight-section::before {
    content: "♛";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--emerald-deep);
    color: var(--gold-accent);
    font-size: 2rem;
    padding: 0 20px;
    border: 1px solid var(--gold-accent);
    border-radius: 50px;
}

/* Chatbot - Advanced UI */
.chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
}

body.lang-ar .chatbot-container {
    left: 2rem;
    right: auto;
}

.chat-toggle-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-deep), #0B4F3F);
    border: 2px solid var(--gold-accent);
    color: var(--gold-accent);
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
    transition: all 0.4s ease;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.chat-toggle-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.6);
}

.chat-window {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 380px;
    height: 600px;
    background: rgba(6, 47, 40, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--gold-accent);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

body.lang-ar .chat-window {
    right: auto;
    left: 0;
}

.chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chat-header {
    background: linear-gradient(90deg, var(--emerald-deep), #093830);
    padding: 1.2rem;
    border-bottom: 1px solid rgba(207, 174, 112, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gold-accent);
}

.chat-logo {
    height: 45px;
    width: 45px;
    border-radius: 50%;
    /* Filters removed for PNG transparency */
    border: 1px solid var(--gold-accent);
}

.chat-title {
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-dot {
    width: 8px;
    height: 8px;
    background: var(--emerald-glow);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--emerald-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

.chat-messages {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: transparent;
}

.message {
    max-width: 85%;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    position: relative;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border-left: 3px solid var(--gold-accent);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: var(--emerald-deep);
    border: 1px solid var(--emerald-glow);
    color: var(--emerald-glow);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.1);
}

.chat-suggestions {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.suggestion-btn {
    background: rgba(207, 174, 112, 0.1);
    border: 1px solid var(--gold-accent);
    color: var(--gold-accent);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.suggestion-btn:hover {
    background: var(--gold-accent);
    color: var(--emerald-deep);
}

.chat-input-area {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.chat-input-area input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    color: white;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input-area input:focus {
    border-color: var(--gold-accent);
}

.voice-btn,
.send-btn {
    background: none;
    border: none;
    color: var(--gold-accent);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.voice-btn.listening {
    color: #ff4444;
    animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.send-btn {
    background: var(--gold-accent);
    color: var(--emerald-deep);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: scale(1.1);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--emerald-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--emerald-deep);
    border: 1px solid var(--gold-accent);
    border-radius: 4px;
}

/* Responsiveness */
@media (max-width: 768px) {
    .main-header {
        padding: 1rem;
    }

    .chat-window {
        width: 90vw;
        right: 5vw;
        bottom: 90px;
        height: 70vh;
    }

    body.lang-ar .chat-window {
        right: 5vw;
        left: auto;
    }
}

/* Hero Section */
.hero-section {
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-bottom: -3rem;
    /* Overlap with content */
}

.hero-content {
    text-align: center;
    z-index: 10;
}

.hero-title {
    font-size: 8rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px var(--gold-accent);
    background: linear-gradient(to bottom, #fff 40%, var(--gold-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
    letter-spacing: 1px;
    animation: textGlow 3s infinite alternate;
    text-shadow: 0 0 30px rgba(207, 174, 112, 0.4);
}

@keyframes textGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(207, 174, 112, 0.2));
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(207, 174, 112, 0.6));
    }
}

/* Fire Effect overlay on text */
.hero-title::after {
    content: "ONCOAL";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    color: transparent;
    background: linear-gradient(180deg, transparent 50%, rgba(207, 174, 112, 0.2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 0.5;
    animation: fire flicker 2s infinite alternate;
}

.hero-tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-muted);
    margin-top: -1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
}

.hero-tagline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
    animation: expandLine 2s ease-in-out infinite alternate;
}

@keyframes expandLine {
    0% {
        width: 40%;
        opacity: 0.5;
    }

    100% {
        width: 80%;
        opacity: 1;
    }
}

/* Embers */
.ember-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.ember {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-accent);
    border-radius: 50%;
    opacity: 0;
    animation: rise 4s linear infinite;
    bottom: -10px;
}

@keyframes rise {
    0% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }

    20% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
        transform: translateY(-300px) scale(0);
    }
}

/* Responsiveness for Hero */
@media (max-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .hero-section {
        height: 40vh;
    }
}