/* =================================================================== */
/* ============= 1. Global Styles & Variables ======================== */
/* =================================================================== */
:root {
    --primary-color: #0D2B4F;
    --secondary-color: #F26C24;
    --light-color: #FFFFFF;
    --text-color: #333333;
    --light-text-color: #e0e0e0;
    --gray-bg: #f7f9fc;
    --dark-bg: #1a1a1a;
    --font-family-ar: 'Tajawal', sans-serif;
    --font-family-en: 'Poppins', sans-serif;
    --transition-speed: 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-family-ar);
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.7;
    overflow-x: hidden;
}

body.en {
    font-family: var(--font-family-en);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition-speed);
}

/* --- Utilities & Buttons --- */
.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 60px;
    letter-spacing: 1px;
    position: relative;
}

.section-intro {
    text-align: center;
    max-width: 600px;
    margin: -40px auto 60px;
    font-size: 1.1rem;
    color: #666;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--light-color);
}

.btn-primary:hover {
    background-color: #d95f1f;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(242, 108, 36, 0.3);
}

.btn-sm {
    padding: 10px 25px;
    font-size: 0.9rem;
}

/* ======================== 2. Header & Nav ========================== */
.header {
    background: #081B33;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo img,
.header .logo img.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav a {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
}

.nav a:hover {
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switcher {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--secondary-color);
    cursor: pointer;
}

/* =================================================================== */
/* ====================== 3. Hero Section ============================ */
/* =================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-color);
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    pointer-events: none;
    /* Disable interaction */
}

/* Hide Video Controls */
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button {
    display: none !important;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 43, 79, 0.6);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-logo,
.hero-logo-large {
    max-height: 120px;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-section h2 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* =================================================================== */
/* ==================== 4. Section Styling =========================== */
/* =================================================================== */

/* --- Dark Section Utility --- */
.dark-section {
    background-color: var(--dark-bg);
    background-image: url('images/dark-texture.png');
    background-size: cover;
    background-position: center;
    color: var(--light-text-color);
}

.dark-section .section-title {
    color: var(--light-color);
}

.dark-section .section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

.dark-section .section-intro {
    color: var(--light-text-color);
    opacity: 0.8;
}

/* --- Certifications Section --- */
.certs-section.dark-section {
    background-color: var(--primary-color);
}

.certs-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 50px;
}

.certs-logos img {
    max-height: 120px;
    transition: var(--transition-speed);
    filter: grayscale(100%) brightness(1.2);
    opacity: 0.7;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.certs-logos img:hover {
    transform: scale(1.1);
    filter: grayscale(0%) brightness(1);
    opacity: 1;
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

/* =================================================================== */
/* ====================== 5. Products Section ======================== */
/* =================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 20px 0;
}

.product-card {
    background: var(--light-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.card-img {
    height: 250px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 25px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-body h3 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.5rem;
}

.card-body p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.badge-featured {
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

/* --- Product Details Tabs --- */
.product-tabs {
    background-color: var(--light-color);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background-color: var(--gray-bg);
}

.tab-btn {
    flex: 1;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-family-ar);
    color: var(--primary-color);
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

body.en .tab-btn {
    font-family: var(--font-family-en);
}

.tab-btn:hover {
    background-color: #e9eef5;
    opacity: 1;
}

.tab-btn.active {
    border-bottom-color: var(--secondary-color);
    background-color: var(--light-color);
    opacity: 1;
}

.tab-content {
    padding: 40px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-pane h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tab-pane h3:first-child {
    margin-top: 0;
}

.tab-pane ul {
    list-style: none;
    padding-right: 20px;
    margin: 0;
}

html[dir="ltr"] .tab-pane ul {
    padding-right: 0;
    padding-left: 20px;
}

.tab-pane ul li {
    margin-bottom: 12px;
    position: relative;
}

.tab-pane ul li::before {
    content: '\f104';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--secondary-color);
    position: absolute;
    right: -20px;
    top: 2px;
}

html[dir="ltr"] .tab-pane ul li::before {
    content: '\f105';
    right: auto;
    left: -20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================== */
/* ====================== 6. Contact Section ========================= */
/* =================================================================== */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Combined & Optimized Contact Item */
.contact-item,
a.contact-item {
    text-align: center;
    background: var(--gray-bg);
    padding: 40px;
    border-radius: 15px;
    transition: var(--transition-speed);

    /* Ensure link behavior */
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover,
a.contact-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.contact-item h3 {
    color: var(--primary-color);
}

.contact-item p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* =================================================================== */
/* ======================== 7. Lightbox ============================== */
/* =================================================================== */
.lightbox-trigger {
    display: block;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 85vh;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}

/* =================================================================== */
/* ========================== 8. Footer ============================== */
/* =================================================================== */
.footer {
    background-color: #081B33;
    color: #a9b4c2;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 40px;
    align-items: center;
}

.footer-logo {
    height: 70px;
    width: auto;
    margin-bottom: 20px;
    display: block;
}

.footer-col h4 {
    color: var(--light-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #a9b4c2;
    transition: var(--transition-speed);
}

.footer-col a:hover {
    color: var(--light-color);
}

.footer-bottom {
    border-top: 1px solid #2a4a6e;
    text-align: center;
    padding-top: 20px;
    font-size: 0.9rem;
}

/* =================================================================== */
/* =================== 9. Animations & Responsive ==================== */
/* =================================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Media Queries --- */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.2rem;
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 10px;
    }
}

@media (max-width: 768px) {

    /* Header & Nav */
    .nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--light-color);
        flex-direction: column;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .nav.active {
        display: flex;
    }

    .nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav li a {
        padding: 15px;
        border-bottom: 1px solid #f0f0f0;
        display: block;
        text-align: center;
        color: var(--primary-color);
        /* Adjusted for mobile menu visibility */
    }

    .header .logo img.logo-img {
        height: 40px;
    }

    /* Hero */
    .hero-logo,
    .hero-logo-large {
        max-height: 90px;
    }

    /* Tabs */
    .tab-buttons {
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: 1px solid #ddd;
    }

    .tab-btn.active {
        border-bottom-color: var(--secondary-color);
    }

    .tab-content {
        padding: 30px 20px;
    }
}


/* تنسيق الخلفية السوداء */
.lightbox {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* لون أسود شفاف قليلاً */
    display: none; /* مخفي افتراضياً */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* عندما يتم تفعيل الـ Lightbox */
.lightbox.active {
    display: flex;
    opacity: 1;
}

/* تنسيق الصورة داخل الـ Lightbox */
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 2px solid white;
}

/* زر الإغلاق */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10000;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #ccc;
}


/* تنسيق شريط المطور (النسخة البيضاء) */
.developer-bar {
    background-color: #ffffff; /* خلفية بيضاء */
    border-top: 1px solid #e1e1e1; /* خط فاصل رمادي فاتح */
    width: 100%;
    transition: background-color 0.3s ease;
}

/* تأثير عند مرور الماوس على الشريط */
.developer-bar:hover {
    background-color: #f4f4f4; /* تغيير لون الخلفية قليلاً عند التحويم */
}

/* تنسيق الرابط ليشغل المساحة كاملة ويلغي التسطير */
.dev-link {
    text-decoration: none;
    display: block;
    padding: 5px 0;
    cursor: pointer;
}

/* محتوى الشريط */
.dev-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

/* تنسيق النص */
.dev-text {
    color: #666666; /* لون رمادي للنص العام */
    font-size: 0.9rem;
    font-family: 'Tajawal', sans-serif;
}

/* تنسيق اسمك (همام هويتك) */
.dev-name {
    color: #222222; /* لون داكن جداً للاسم */
    font-weight: 800; /* خط سميك */
}

/* تنسيق الشعار */
.dev-logo {
    height: 35px; /* حجم مناسب للشعار */
    width: auto;
    /* يمكنك تفعيل الفلتر التالي إذا أردت جعل الشعار رمادياً ويصبح ملوناً عند التحويم */
    /* filter: grayscale(100%); */
    transition: transform 0.3s ease;
}

.developer-bar:hover .dev-logo {
    transform: scale(1.1); /* تكبير بسيط للشعار عند الضغط */
    /* filter: none; */
}

/* تحسين للموبايل */
@media (max-width: 600px) {
    .dev-content {
        gap: 8px;
    }
    .dev-text {
        font-size: 0.8rem;
    }
    .dev-logo {
        height: 28px;
    }
}