/* =====================================================
   B2B Industrial Safety - Main Stylesheet
   ===================================================== */
:root {
    --color-primary: #0b2545;
    --color-primary-light: #134074;
    --color-accent: #f5a623;
    --color-text: #1e293b;
    --color-muted: #64748b;
    --color-bg-light: #f4f7fb;
    --color-border: #e2e8f0;
    --radius: 10px;
    --container-width: 1200px;
    --transition: 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Tahoma', 'Segoe UI', Arial, sans-serif;
    color: var(--color-text);
    line-height: 1.7;
    background: #fff;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 60px 0; }
.bg-light { background: var(--color-bg-light); }

.section-title {
    font-size: clamp(24px, 4vw, 34px);
    text-align: center;
    margin-bottom: 40px;
    color: var(--color-primary);
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    margin: 14px auto 0;
    border-radius: 2px;
}

.section-cta { text-align: center; margin-top: 30px; }
.empty-note { color: var(--color-muted); text-align: center; }

/* ---------- الأزرار ---------- */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 8px;
    font-weight: bold;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 15px;
}
.btn-primary { background: var(--color-accent); color: #1a1a1a; }
.btn-primary:hover { background: #e0951b; transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* ---------- الهيدر ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
}
.site-title-text { font-size: 22px; font-weight: bold; color: var(--color-primary); }

.primary-nav { display: flex; align-items: center; gap: 24px; }
.nav-menu { display: flex; gap: 22px; align-items: center; }
.nav-menu a { font-weight: 600; color: var(--color-text); transition: var(--transition); }
.nav-menu a:hover { color: var(--color-primary-light); }
.nav-cta { white-space: nowrap; }

.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}
.mobile-nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px;
    transition: var(--transition);
}
.mobile-nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- سلايدر الرئيسية Full Screen ---------- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 480px;
    max-height: 900px;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease;
    display: flex;
    align-items: center;
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11,37,69,0.85) 0%, rgba(11,37,69,0.45) 60%, rgba(11,37,69,0.15) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 640px;
}
.hero-content h1 { font-size: clamp(28px, 5vw, 48px); margin-bottom: 18px; line-height: 1.3; }
.hero-text { font-size: clamp(15px, 2vw, 19px); margin-bottom: 26px; opacity: 0.95; }

.hero-nav {
    position: absolute;
    bottom: 24px;
    left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 3;
}
.hero-prev, .hero-next {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    width: 42px; height: 42px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: var(--transition);
}
.hero-prev:hover, .hero-next:hover { background: var(--color-accent); color: #1a1a1a; }
.hero-dots { display: flex; gap: 8px; }
.hero-dots span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}
.hero-dots span.active { background: var(--color-accent); width: 26px; border-radius: 6px; }

/* ---------- الشبكات العامة ---------- */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- بطاقة منتج ---------- */
.product-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(0,0,0,0.1); }
.product-card-image { display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--color-bg-light); }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; }
.no-image { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--color-muted); background: var(--color-bg-light); min-height: 180px; }
.no-image.large { min-height: 340px; }
.product-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.product-card-body h3 { font-size: 17px; }
.product-excerpt { color: var(--color-muted); font-size: 14px; flex: 1; }

/* ---------- تبويبات الأقسام ---------- */
.category-tabs { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 34px; }
.tab-item { padding: 10px 22px; border-radius: 30px; border: 2px solid var(--color-border); font-weight: 600; transition: var(--transition); }
.tab-item.active, .tab-item:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ---------- صفحة المنتج المفرد ---------- */
.page-hero { background: var(--color-bg-light); padding: 50px 0; text-align: center; }
.page-hero h1 { color: var(--color-primary); font-size: clamp(24px,4vw,36px); }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 60px 0; align-items: start; }
.product-gallery img { border-radius: var(--radius); }
.badge { display: inline-block; background: var(--color-accent); color: #1a1a1a; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: bold; margin-bottom: 12px; }
.product-code { color: var(--color-muted); margin-bottom: 14px; }
.product-info h3 { margin: 22px 0 10px; color: var(--color-primary); }
.feature-list li, .spec-list li { padding: 8px 0; border-bottom: 1px dashed var(--color-border); }
.product-cta { display: block; text-align: center; margin-top: 26px; }

/* ---------- فورم عرض السعر ---------- */
.quote-form-wrap { max-width: 700px; margin: 0 auto; text-align: center; }
.quote-subtitle { color: var(--color-muted); margin-bottom: 30px; }
.b2b-form { text-align: right; background: #fff; padding: 30px; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,0.06); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--color-primary-light); }
.form-message { margin-top: 16px; font-weight: bold; }
.form-message.success { color: #16a34a; }
.form-message.error { color: #dc2626; }

/* ---------- العروض ---------- */
.offer-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.offer-image { aspect-ratio: 16/9; overflow: hidden; }
.offer-image img { width: 100%; height: 100%; object-fit: cover; }
.offer-body { padding: 18px; }
.offer-body h3 { margin-bottom: 8px; color: var(--color-primary); }

/* ---------- شركاء النجاح ---------- */
.partners-track { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; justify-content: center; }
.partner-logo { width: 140px; opacity: 0.75; transition: var(--transition); filter: grayscale(100%); }
.partner-logo:hover { opacity: 1; filter: grayscale(0%); }

/* ---------- الشهادات والميديا ---------- */
.certificate-card, .media-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.certificate-body, .media-body { padding: 16px; }
.video-wrap { position: relative; aspect-ratio: 16/9; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- من نحن ---------- */
.about-featured-image { margin-bottom: 30px; border-radius: var(--radius); overflow: hidden; }
.about-text { max-width: 850px; margin: 0 auto; font-size: 17px; }

/* ---------- اتصل بنا ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.direct-contact { margin-top: 20px; text-align: center; }
.direct-contact p { margin-bottom: 8px; font-weight: 600; }
.map-wrap { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.sidebar-offers { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; }
.sidebar-offers h3 { color: var(--color-primary); margin-bottom: 14px; }
.mini-offer { padding: 10px 0; border-bottom: 1px dashed var(--color-border); }
.mini-offer:last-child { border-bottom: none; }

/* ---------- واتساب عائم ---------- */
.floating-whatsapp {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 58px; height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    z-index: 999;
    animation: pulse-wa 2s infinite;
}
@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
    70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------- الفوتر ---------- */
.site-footer { background: var(--color-primary); color: #cbd5e1; padding-top: 50px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding-bottom: 30px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; }
.footer-col p, .footer-col a { color: #cbd5e1; font-size: 14px; }
.footer-menu li { margin-bottom: 10px; }
.social-links { display: flex; gap: 14px; margin-top: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; text-align: center; font-size: 13px; }

/* =====================================================
   Responsive - تجربة مميزة على الموبايل والتابلت
   ===================================================== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .primary-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 82%;
        max-width: 340px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 90px 26px 30px;
        gap: 26px;
        transition: right 0.35s ease;
        box-shadow: -8px 0 30px rgba(0,0,0,0.15);
    }
    .primary-nav.open { right: 0; }
    .nav-menu { flex-direction: column; align-items: flex-start; gap: 20px; width: 100%; }
    .nav-menu a { font-size: 18px; }
    .nav-cta { width: 100%; text-align: center; }
    .mobile-nav-toggle { display: flex; }

    .product-grid, .contact-grid { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .section { padding: 40px 0; }
    .hero-slider { height: 100svh; min-height: 560px; }
    .hero-content { max-width: 100%; padding: 0 6px; text-align: center; }
    .hero-content h1 { font-size: 26px; }
    .hero-overlay { background: linear-gradient(180deg, rgba(11,37,69,0.55) 0%, rgba(11,37,69,0.85) 100%); }
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
    .btn-lg { width: 100%; text-align: center; }
    .floating-whatsapp { width: 50px; height: 50px; font-size: 22px; bottom: 16px; left: 16px; }
    .header-inner { padding: 10px 16px; }
}
