/* ========================================
   ملك الطابون - CSS محسّن للأداء
   ======================================== */

/* Variables */
:root {
    --red: #C8102E;
    --red-light: #E63946;
    --red-dark: #9B0D23;
    --white: #FFF;
    --gray: #F5F5F5;
    --gray-md: #E8E8E8;
    --gray-dk: #333;
    --text: #1A1A1A;
    --shadow: 0 10px 40px rgba(0,0,0,0.1);
    --touch: 48px;
}

/* Container */
.container { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 1.5rem;
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--red);
    margin-bottom: 0.8rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--gray-dk);
}

/* Mobile Navigation */
.nav-links.active {
    display: flex;
    position: fixed;
    top: 75px;
    right: 0;
    width: 100%;
    height: calc(100vh - 75px);
    background: var(--white);
    flex-direction: column;
    padding-top: 2rem;
    gap: 0;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    z-index: 999;
}

.nav-links.active li {
    width: 100%;
    text-align: center;
}

.nav-links.active a {
    display: block;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-md);
}

/* Food Section */
.food-section {
    padding: 5rem 0;
    background: var(--white);
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.food-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    position: relative;
}

.food-card:hover {
    transform: translateY(-8px);
}

.food-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.food-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--red);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.food-info {
    padding: 1.5rem;
    text-align: center;
}

.food-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.food-info p {
    color: var(--gray-dk);
    font-size: 0.95rem;
}

/* Services Section */
.services-section {
    padding: 5rem 0;
    background: var(--gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--gray-dk);
    line-height: 1.8;
}

.service-card a {
    color: var(--red);
    font-weight: 700;
    text-decoration: none;
}

/* Hours Banner */
.hours-banner {
    background: linear-gradient(135deg, var(--text), #2a2a2a);
    padding: 2rem;
}

.hours-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.hours-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--white);
    font-weight: 500;
}

.hours-item svg {
    fill: var(--red-light);
}

/* Gallery Section */
.gallery-section {
    padding: 5rem 0;
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/10;
    margin: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 2rem 1.5rem 1.5rem;
    color: var(--white);
}

.gallery-overlay h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background: var(--gray);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 1rem;
}

.founder-name {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--gray-dk);
    margin-bottom: 1rem;
    line-height: 1.9;
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    list-style: none;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.about-feature svg {
    fill: var(--red);
}

.about-feature span {
    font-weight: 600;
    color: var(--text);
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background: var(--white);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact-info {
    background: var(--gray);
    padding: 2.5rem;
    border-radius: 20px;
    font-style: normal;
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    fill: var(--white);
}

.contact-text h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.contact-text p,
.contact-text a {
    color: var(--gray-dk);
    text-decoration: none;
}

.contact-text a:hover {
    color: var(--red);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.social-links a:hover {
    background: var(--red);
}

.social-links a:hover svg {
    fill: var(--white);
}

.social-links svg {
    fill: var(--red);
}

/* Map */
.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 16/10;
    min-height: 300px;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray), var(--gray-md));
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 20px;
}

.map-placeholder:hover {
    background: linear-gradient(135deg, var(--gray-md), var(--gray));
}

.map-placeholder:focus {
    outline: 3px solid var(--red);
    outline-offset: 2px;
}

.map-placeholder p {
    font-size: 1.1rem;
    color: var(--gray-dk);
    font-weight: 500;
    margin-top: 1rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

/* Rating Section */
.rating-section {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    padding: 3rem 1.5rem;
    text-align: center;
}

.rating-content h3 {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.rating-content > p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
}

.rating-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    color: var(--red);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s;
}

.rating-whatsapp:hover {
    transform: scale(1.05);
}

.rating-stars {
    color: #FFD700;
    font-size: 2rem;
    margin-top: 1.5rem;
    letter-spacing: 0.3rem;
}

/* Footer */
.footer {
    background: var(--text);
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--white);
}

.footer img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer-english {
    font-size: 0.9rem;
    letter-spacing: 2px;
    opacity: 0.8;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 1rem;
}

/* Chatbot */
.chatbot-trigger {
    position: fixed;
    bottom: 25px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 5px 25px rgba(200,16,46,0.4);
    transition: all 0.3s;
    color: var(--white);
}

.chatbot-trigger:hover {
    transform: scale(1.1);
}

.chatbot-trigger.active {
    transform: rotate(180deg);
}

.chatbot-container {
    position: fixed;
    bottom: 100px;
    left: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 150px);
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 998;
    overflow: hidden;
}

.chatbot-container.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chatbot-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--white);
}

.chatbot-title h4 {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.chatbot-title span {
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    display: inline-block;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: var(--gray);
}

.message {
    padding: 1rem 1.3rem;
    border-radius: 18px;
    max-width: 88%;
    font-size: 0.95rem;
    line-height: 1.8;
    word-wrap: break-word;
    white-space: pre-wrap;
    text-align: right;
}

.message.bot {
    background: var(--white);
    color: var(--text);
    align-self: flex-start;
    border-bottom-right-radius: 6px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border: 1px solid var(--gray-md);
}

.message.user {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: var(--white);
    align-self: flex-end;
    border-bottom-left-radius: 6px;
    box-shadow: 0 3px 15px rgba(200,16,46,0.3);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 1rem;
    align-self: flex-start;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-8px); opacity: 1; }
}

.chatbot-input {
    padding: 1rem;
    background: var(--white);
    border-top: 1px solid var(--gray-md);
    display: flex;
    gap: 0.8rem;
}

.chatbot-input input {
    flex: 1;
    background: var(--gray);
    border: 1px solid var(--gray-md);
    border-radius: 25px;
    padding: 0.9rem 1.2rem;
    color: var(--text);
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    outline: none;
    transition: border-color 0.3s;
    min-height: var(--touch);
}

.chatbot-input input:focus {
    border-color: var(--red);
}

.chatbot-input button {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--red);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-input button:hover {
    transform: scale(1.1);
    background: var(--red-dark);
}

.chatbot-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    z-index: 998;
    box-shadow: 0 5px 25px rgba(37,211,102,0.4);
    transition: all 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (min-width: 768px) {
    .about-container,
    .contact-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .chatbot-container {
        width: 400px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .food-grid {
        grid-template-columns: 1fr;
    }
    
    .hours-content {
        gap: 1.5rem;
    }
    
    .chatbot-trigger,
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
    }
    
    .chatbot-trigger {
        left: 15px;
    }
    
    .whatsapp-float {
        right: 15px;
    }
    
    .chatbot-container {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 90px;
    }
}

/* Print */
@media print {
    .header, .chatbot-trigger, .chatbot-container, .whatsapp-float, .mobile-menu {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding-top: 0;
    }
}
