/*
 * Arabic RTL Stylesheet for nbinno.com
 * Path: /2025/ar/product-ar.css
 * This file includes all base styles plus RTL modifications.
 */

/* 引入一个清晰的阿拉伯语Google字体 */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;700;800&display=swap');

/* --- 全局RTL基础样式 --- */
:root {
    --primary-color: #005A9C;
    --primary-color-dark: #003D6B;
}

html[lang="ar"] {
    direction: rtl;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    color: #333;
    background-color: #f8f9fa;
    text-align: right; /* 默认文本右对齐 */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color-dark);
}

h1, h2, h3, h4 {
    color: #1a2533;
    line-height: 1.3;
    margin-top: 0;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 50px; padding-bottom: 15px; border-bottom: 2px solid #e0e0e0; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.2rem; margin: 0 0 10px 0; }
p { margin: 0 0 1rem 0; font-size: 1.05rem; color: #555; }
section {
    padding: 60px 0;
    border-bottom: 1px solid #e9ecef;
}
section:last-of-type {
    border-bottom: none;
}

/* --- Header & Nav (RTL) --- */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo {
    font-size: 1.3rem;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.logo img {
    height: 40px;
    margin-left: 10px; /* RTL: 图标在右，文字在左，所以是左边距 */
    margin-right: 0;
}

/* Nav and Search (RTL) */
.nav-and-search { display: flex; align-items: center; justify-content: flex-start; } /* RTL: 导航和搜索靠左 */
nav a { margin: 0 9px; font-weight: 500; }

/* Search Box (RTL) */
.search-container { position: relative; margin-right: 20px; margin-left: 0; width: 220px; }
.search-container form { display: flex; }
.search-container input[type="search"] { width: 180px; padding: 8px 15px 8px 35px; border-radius: 20px; border: 1px solid #ccc; outline: none; font-size: 0.9rem; transition: all 0.4s ease; }
.search-container input[type="search"]:focus { width: 220px; border-color: var(--primary-color); box-shadow: 0 0 8px rgba(0, 90, 156, 0.2); }
.search-container button { position: absolute; left: 0; right: auto; top: 0; height: 100%; width: 40px; background: transparent; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.search-container button svg { width: 16px; height: 16px; fill: #777; transition: fill 0.3s ease; }
.search-container button:hover svg { fill: var(--primary-color); }

/* Mobile Hamburger Menu (RTL - no changes needed for the icon itself) */
.nav-toggle-checkbox { display: none; }
.nav-toggle-label { display: none; width: 30px; height: 30px; cursor: pointer; z-index: 1001; }
.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after { display: block; background-color: #333; height: 3px; width: 100%; border-radius: 2px; position: relative; transition: all 0.3s; }
.nav-toggle-label span::before, .nav-toggle-label span::after { content: ''; position: absolute; }
.nav-toggle-label span::before { top: -8px; }
.nav-toggle-label span::after { top: 8px; }

/* Breadcrumb Nav (RTL) */
.breadcrumb-section { background-color: #e9ecef; padding: 12px 0; border-bottom: 1px solid #ddd; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; font-size: 0.9rem; line-height: 1.4;}
.breadcrumb-item + .breadcrumb-item::before { content: "<"; margin: 0 0.6em; color: #6c757d; } /* RTL: 箭头翻转 */
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: #333; font-weight: 500; }
.breadcrumb-item {padding-top: 3px; padding-bottom: 3px;}

/* Hero Section (RTL - no changes, text-align is center) */
.hero { background-image: linear-gradient(rgba(0, 90, 156, 0.75), rgba(0, 61, 107, 0.75)); color: white; text-align: center; padding: 80px 20px; border-bottom: none; }
.hero h1 { color: white; }
.hero p { max-width: 700px; margin: 20px auto 30px auto; color: rgba(255, 255, 255, 0.95); }
.button { display: inline-block; padding: 12px 30px; border-radius: 5px; font-weight: bold; transition: all 0.3s; background-color: #007BFF; color: white; border: 2px solid #007BFF; }
.button:hover { background-color: #0056b3; border-color: #0056b3; transform: translateY(-2px); }

/* Featured Product (RTL) */
.featured-product-grid { display: grid; grid-template-columns: 1fr 400px; align-items: center; gap: 50px; } /* RTL: 文本在右，图片在左 */
.featured-product-text ul { list-style: none; padding: 0; }
.featured-product-text ul li { padding-right: 25px; padding-left: 0; position: relative; margin-bottom: 10px; } /* RTL: 内边距翻转 */
.featured-product-text ul li::before { content: '✔'; color: #27ae60; position: absolute; right: 0; left: auto; font-weight: bold; } /* RTL: checkmark 定位翻转 */
.placeholder-image { display: flex; align-items: center; justify-content: center; background-color: #e9ecef; border: 2px dashed #ced4da; border-radius: 8px; color: #6c757d; font-size: 1.2rem; font-weight: 500; width: 100%; height: 400px; box-sizing: border-box; }

/* Core Advantages (RTL - no changes needed for grid) */
.advantages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.advantage-item { background-color: #fff; padding: 30px; border-radius: 8px; border: 1px solid #e9ecef; transition: transform 0.3s, box-shadow 0.3s; }
.advantage-item:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.08); }

/* Technical Resources (RTL - no changes needed for grid) */
.resource-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; }
.resource-item { background-color: #fff; padding: 20px; border-radius: 8px; border: 1px solid #e9ecef; transition: all 0.3s; }
.resource-item:hover { border-color: var(--primary-color); transform: scale(1.02); }
.resource-item a { text-decoration: none; }
.resource-item h4 { color: #333; transition: color 0.3s; }
.resource-item a:hover h4 { color: var(--primary-color); }
.resource-item p { margin: 0; font-size: 0.9rem; color: #555; }

/* Tags Cloud (RTL - no changes, text-align is center) */
.tags-cloud { text-align: center; }
.tags-cloud a { display: inline-block; background-color: #e9ecef; color: #555; padding: 8px 18px; margin: 5px; border-radius: 5px; font-size: 0.95rem; border: 1px solid #ddd; }
.tags-cloud a:hover { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* Footer (RTL - no changes, text-align is center) */
footer { background-color: #1a2533; color: #ccc; padding: 40px 0; }
footer .container { text-align: center; }
.footer-bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid #444; font-size: 0.9rem; }
.footer-bottom p {margin: 4px 0; line-height: 1.5; }

/* Applications Section (RTL - no changes needed for grid/center-align) */
.applications { background-color: #fff; }
.applications-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.applications h2 { text-align: center; width: 100%;}
.application-item { text-align: center; padding: 20px; }
.application-item .icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px; display: inline-block; }
.application-item h4 { font-size: 1.1rem; margin-bottom: 10px; }
.application-item p { font-size: 0.95rem; line-height: 1.5; color: #666; }

/* Why Choose Us Section (RTL - no changes needed for center-align) */
.why-choose-us { padding: 80px 0; background-color: #ffffff; }
.why-choose-us h2 { text-align: center; font-size: 2.5rem; color: #1a253c; margin-bottom: 20px; font-weight: 800; }
.why-choose-us .section-subtitle { text-align: center; max-width: 750px; margin: 0 auto 60px auto; font-size: 1.15rem; color: #5c6a7e; line-height: 1.6; }
.choose-us-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.choose-us-item { text-align: center; padding: 35px; border: 1px solid #e8eef3; border-radius: 12px; background-color: #f9fcff; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.choose-us-item:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(26, 37, 60, 0.08); }
.choose-us-icon { width: 60px; height: 60px; margin: 0 auto 25px auto; background-color: #eaf6ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.choose-us-icon svg { width: 30px; height: 30px; stroke: #007bff; }
.choose-us-item h3 { font-size: 1.4rem; color: #1a253c; margin-bottom: 15px; }
.choose-us-item p { font-size: 1rem; color: #5c6a7e; line-height: 1.7; }


/* --- Responsive Design (RTL) --- */
@media (max-width: 992px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .logo { font-size: 1rem; }
    .nav-toggle-label { display: flex; align-items: center; }
    .nav-and-search { display: none; position: absolute; top: 80px; right: 0; left: auto; width: 100%; background-color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); flex-direction: column; align-items: stretch; padding-bottom: 20px; }
    .nav-toggle-checkbox:checked ~ .nav-and-search { display: flex; }
    .nav-toggle-checkbox:checked + .nav-toggle-label span { background-color: transparent; }
    .nav-toggle-checkbox:checked + .nav-toggle-label span::before { transform: rotate(45deg); top: 0; }
    .nav-toggle-checkbox:checked + .nav-toggle-label span::after { transform: rotate(-45deg); top: 0; }
    nav { display: flex; flex-direction: column; width: 100%; }
    nav a { padding: 15px 20px; margin: 0; text-align: center; border-bottom: 1px solid #f0f0f0; font-size: 1.05rem;}
    .search-container { margin: 20px auto 0 auto; width: 90%; }
    .search-container input[type="search"], .search-container input[type="search"]:focus { width: 100%; }
    .resource-list { grid-template-columns: 1fr; }
    .featured-product-grid { grid-template-columns: 1fr; gap: 30px; }
}