:root {
    /* الألوان الرئيسية المطلوبة */
    --primary-color: #000000;        /* أسود - اللون الأساسي */
    --secondary-color: #d32f2f;      /* أحمر - للعناصر الثانوية */
    --accent-color: #ff8c00;         /* برتقالي - للتأكيد والتفعيل */
    --accent-hover: #ff6b00;         /* برتقالي داكن للهوفر */
    
    /* ألوان الخلفيات والنصوص */
    --bg-light: #ffffff;
    --bg-dark: #1a1a1a;
    --bg-gray: #f8f9fa;
    --text-dark: #111111;
    --text-light: #ffffff;
    --text-gray: #666666;
    --border-color: #e0e0e0;
    
    /* الظلال والتدرجات */
    --shadow-light: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-medium: 0 6px 20px rgba(0,0,0,0.12);
    --shadow-dark: 0 10px 30px rgba(0,0,0,0.15);
    --gradient-orange: linear-gradient(135deg, var(--accent-color), #ff6b00);
    --gradient-black: linear-gradient(135deg, #2c2c2c, #000000);
}

/* ===== RESET & BASE STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Cairo', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    direction: rtl;
    overflow-x: hidden;
    /* ارتفاع التوب بار (40) + الهيدر (70 تقريباً) */
    padding-top: 110px !important;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--gradient-black);
    color: var(--text-light);
    padding: 8px 0;
    border-bottom: 3px solid var(--accent-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    height: 40px;
}

.top-bar .top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    height: 100%;
}

.contact-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
}

.contact-info a {
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent-color);
}

.top-clock {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* زر اللغة في الشريط العلوي */
.lang-switcher {
    order: -1; /* على اليسار في العربية */
}

.lang-switcher button {
    background: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.lang-switcher button:hover {
    background: var(--accent-hover);
}

/* ===== HEADER ===== */
.main-header {
    background: var(--bg-light);
    box-shadow: var(--shadow-light);
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 1001;
    transition: all 0.3s ease;
    height: 70px;
    display: flex;
    align-items: center;
}

.main-header.scrolled {
    box-shadow: var(--shadow-medium);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

/* الشعار */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    z-index: 1003;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-3px);
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    padding: 3px;
    background: var(--bg-light);
    border: 2px solid var(--primary-color);
}

.logo-text h1 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 2px;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Cairo', sans-serif;
}

.logo-text p {
    color: var(--secondary-color);
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== NAVIGATION ===== */
.navigation {
    position: relative;
}

/* زر القائمة (موبايل) */
.mobile-menu-btn {
    display: flex !important;
    background: var(--accent-color) !important;
    color: var(--text-light) !important;
    border: none !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-size: 1.3rem !important;
    transition: all 0.3s ease !important;
    position: fixed !important;
    top: 50px !important;
    right: 15px !important; /* يمين في العربية */
    z-index: 9999 !important;
    justify-content: center !important;
    align-items: center !important;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4) !important;
}

.mobile-menu-btn:hover {
    background: var(--accent-hover) !important;
    transform: rotate(90deg) !important;
}

.mobile-menu-btn[aria-expanded="true"] {
    background: var(--secondary-color) !important;
}

/* القائمة العادية (ديسكتوب) */
.main-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

.main-menu li {
    position: relative;
}

.main-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.main-menu a:hover {
    color: var(--accent-color);
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.main-menu a:hover::after {
    width: 100%;
}

/* ===== HERO ===== */
.hero {
    min-height: 70vh; /* رجعناه قريب من القديم */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.9)),
                url('https://images.unsplash.com/photo-1601584115197-04ecc0da31d7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    padding: 80px 20px 60px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
                rgba(255, 140, 0, 0.15) 0%,
                rgba(211, 47, 47, 0.1) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 25px;
    opacity: 0.9;
    line-height: 1.6;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gradient-orange);
    color: var(--text-light);
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-width: 180px;
    margin-top: 10px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.2), 
                transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 140, 0, 0.4);
}

.btn:hover::before {
    left: 100%;
}

/* ===== SECTIONS COMMON ===== */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-top: 20px;
}

.section-title h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-gray);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.services,
#products,
.about,
.contact {
    padding: 60px 0;
    scroll-margin-top: 120px;
}

.services {
    background: var(--bg-gray);
}

#products {
    background: var(--bg-light);
}

.about {
    background: var(--bg-gray);
}

.contact {
    background: var(--bg-light);
}

/* ===== SERVICES ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.service-card {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.service-icon {
    height: 80px;
    background: var(--gradient-black);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--gradient-orange);
    transform: scale(1.05);
}

.service-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-content h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.service-content p {
    color: var(--text-gray);
    line-height: 1.6;
    font-size: 0.95rem;
    flex: 1;
}

/* ===== PRODUCTS ===== */
.product-card {
    height: 100%;
    overflow: hidden;
    background: var(--bg-light);
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    transition: transform .25s;
}

.product-card:hover {
    transform: translateY(-6px);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-radius: 16px 16px 0 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    display: block;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* شبكة المنتجات */
#products .services-grid,
#products-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 30px !important;
    width: 100% !important;
}

/* ===== ABOUT ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text {
    padding: 20px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.about-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
                rgba(255, 140, 0, 0.1) 0%,
                rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* ===== CONTACT ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info-col {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--bg-gray);
    padding: 25px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.contact-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-light);
}

.contact-icon {
    background: var(--accent-color);
    color: var(--text-light);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    background: var(--gradient-black);
    transform: rotate(15deg) scale(1.1);
}

.contact-details h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.contact-details p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ===== FOOTER ===== */
footer {
    background: var(--gradient-black);
    color: var(--text-light);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 3px 0;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(-5px);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* زر طوارئ عائم – نخليه مخفي حالياً لتقليل اللخبطة */
.floating-menu-btn {
    display: none;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

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

/* ===== RTL/LTR SUPPORT ===== */
.lang-ar { display: block; }
.lang-en { display: none; }

html[dir="ltr"] {
    direction: ltr;
}

html[dir="ltr"] .lang-ar { display: none; }
html[dir="ltr"] .lang-en { display: block; }

html[dir="ltr"] .main-menu a::after {
    left: 0;
    right: auto;
}

html[dir="ltr"] .footer-column h3::after {
    left: 0;
    right: auto;
}

html[dir="ltr"] .footer-links a:hover {
    transform: translateX(5px);
}

/* زر القائمة في الإنجليزية (على اليسار) */
html[dir="ltr"] .mobile-menu-btn {
    left: 15px !important;
    right: auto !important;
}

/* القائمة المنسدلة في الإنجليزية – من اليسار */
html[dir="ltr"] .main-menu.show {
    left: 10px;
    right: auto;
}

/* زر اللغة في الإنجليزية على اليمين */
html[dir="ltr"] .lang-switcher {
    order: 1;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 1.8rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    /* الهيدر أعلى شوية في الموبايل عشان الشعار/النص */
    .main-header {
        height: 80px;
    }

    .container {
        width: 95%;
        padding: 0 10px;
    }

    .hero {
        padding: 100px 15px 50px;
        min-height: 90vh;
    }

    /* لو الواجهة إنجليزية، نزود شوية padding فوق */
    html[dir="ltr"] .hero {
        padding-top: 120px;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.95rem;
        min-width: 160px;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .services,
    #products,
    .about,
    .contact {
        padding: 50px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .logo-img {
        height: 45px;
    }

    .logo-text h1 {
        font-size: 1.1rem;
    }

    .logo-text p {
        font-size: 0.75rem;
    }

    /* إخفاء القائمة العادية في الموبايل، وإظهارها كمنسدلة عند .show */
    nav .main-menu,
    .mobile-menu {
        display: none;
        flex-direction: column;
    }

    /* لما نضيف كلاس show تطلع كمنيو منسدلة */
    nav .main-menu.show,
    .mobile-menu.show {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 85px;          /* تحت الهيدر مباشرة */
        right: 10px;
        left: 10px;
        background: #fff;
        padding: 12px 16px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.25);
        z-index: 9998;
        gap: 12px;
    }

    /* في الإنجليزية القائمة تطلع من اليسار – عدلنا فوق في html[dir="ltr"] .main-menu.show */

    /* ضبط التوب بار في الموبايل */
    .top-bar {
        height: 40px;
        padding: 8px 0;
    }

    .contact-info {
        font-size: 0.75rem;
        gap: 10px;
        flex: 1;
    }

    .top-clock {
        display: none; /* إخفاء الساعة في الموبايل لتوفير المساحة */
    }

    .lang-switcher button {
        padding: 5px 10px;
        font-size: 0.75rem;
        margin-left: 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.4rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 140px;
    }

    .mobile-menu-btn {
        top: 50px !important;
        right: 10px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }

    html[dir="ltr"] .mobile-menu-btn {
        left: 10px !important;
        right: auto !important;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }

    .main-menu {
        display: flex !important;
    }
}

/* ===== ACCESSIBILITY ===== */
:focus {
    outline: 3px solid rgba(255, 140, 0, 0.5);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
