/* ==================== */
/* VARIABLES & RESET */
/* ==================== */
:root {
    --primary-color: #3f794e;
    --secondary-color: #285581;
    --accent-color: #ffee00;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazir-Bold', sans-serif;
}
    
body, h1, h2, h3, h4, h5, h6, p, li, a, span, div {
    font-family: 'Vazir-Bold', sans-serif;
  }

html {
    scroll-behavior: smooth;
}

/* ==================== */
/* TYPOGRAPHY */
/* ==================== */
body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-image: url('../image/bg.png');
    /*background-repeat: no-repeat;*/
    /*background-size: cover;     بک‌گراند کل صفحه رو پر می‌کنه */
    /* background-attachment: fixed;  ثابت بمونه هنگام اسکرول */
    background-repeat: repeat;   /* افقی و عمودی تکرار بشه */
    background-size: auto;
}

h1, h2, h3, h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ==================== */
/* LAYOUT */
/* ==================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    margin-bottom: 2rem;
    padding: 2rem 0;
}

.path-modal {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  .path-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    direction: rtl;
  }
  .path-modal-content h3 {
    margin-bottom: 20px;
  }
  .path-modal-content button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    background-color: #285581;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
  }
/* ==================== */
/* HEADER */
/* ==================== */
header {
    background-color: var(--white);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    direction: rtl; /* حفظ جهت RTL */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-direction: row; 
}
.header-left {
    display: flex;
    align-items: center;
    margin-right:500px;
    order:2;
    color: var(--primary-color);
}

.header-left img {
    max-height: 80px;
    margin: 0 10px;
}
nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav li {
    margin: 0 2px;
}
nav {
    order: 1; /* تغییر ترتیب نمایش به ابتدا (سمت راست) */
}
nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight:600;
    padding: 5px 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover {
    color: #007bff;
    background-color: var(--light-bg);
}

/* ==================== */
/* JUMBOTRON/HERO */
/* ==================== */
.jumbotron {
    /*background: linear-gradient(rgba(0, 0, 0, 0.5), url('../image/gearcircuit.png');*/
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../image/gearcircuit.png');
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    min-height: 350px;
    display: flex;
    align-items: center;
    text-align: right;
    color: var(--white);
}

.jumbotron .container {
    width: 100%;
}

.jumbotron h2 {
    padding-bottom: 15px;
    color: var(--accent-color);
    font-size: 1.8rem;
}

.display-4 {
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

/* ==================== */
/* PRODUCTS */
/* ==================== */
.products {
    padding: 3rem 0;
    background-color: var(--light-bg);
}

.products h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    position: relative;
}

.products h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.products-card {
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.products-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.products-card img {
    max-width: 100%;
    height: auto;
    margin: 0 auto 1rem;
    border-radius: 4px;
}

.products-card h3 {
    text-align: center;
    color: var(--primary-color);
}

/* ==================== */
/* ARTICLES */
/* ==================== */
.articles {
    padding: 3rem 0;
    background-color: var(--white);
}

.articles h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    position: relative;
}

.articles h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

.article-item:hover {
    transform: translateY(-5px);
}

.article-item h3 {
    margin: 0 0 1rem;
    font-size: 1.4rem;
    color: var(--primary-color);
    text-align: center;
}

.article-item p, 
.article-item li {
    color: #555;
    margin-bottom: 0.8rem;
    text-align: justify;
    font-weight: bold;
}

.article-item ul li {
    padding-right: 1.5rem;
    font-weight: bold;
    
}

.article-item a {
    color: #007BFF;
    text-decoration: none;
    
}

.article-item a:hover {
    text-decoration: underline;
}

/* ==================== */
/* VIDEO SECTION */
/* ==================== */
.product-video {
    text-align: center;
    margin: 2.5rem auto;
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
}

.product-video h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.product-video video {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* ==================== */
/* products */
/* ==================== */
.product-description {
    background-color: #f9f9f9; /* رنگ ملایم پس زمینه */
    text-align: center; /* وسط چین کردن کل متن */
    padding: 40px;
    border-radius: 12px; /* لبه‌های گرد */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* سایه برای برجسته شدن */
    max-width: 800px;
    margin: 40px auto; /* وسط صفحه */
    font-family: 'Vazirmatn', sans-serif; /* فونت فارسی حرفه‌ای */
  }
  
  .product-description h1 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 20px;
  }
  
  .product-description h2 {
    color: #34495e;
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
  }
  
  .product-description p, .product-description ul {
    color: #555;
    font-size: 18px;
    line-height: 1.8;
  }
  
  .product-description ul {
    list-style-type: none;
    padding: 0;
  }
  
  .product-description ul li {
    margin: 10px 0;
    position: relative;
    padding-right: 20px;
  }
  
  .product-description ul li::before {
    content: '✔️';
    position: absolute;
    right: 0;
  }
  
  .contact {
    font-weight: bold;
    color: #e74c3c;
    margin-top: 30px;
  }

/* ==================== */
/* FOOTER */
/* ==================== */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
}

.footer-section ul li i {
    margin-left: 0.5rem;
    margin-top: 0.2rem;
}

.footer-section ul li strong {
    min-width: 80px;
    display: inline-block;
}

.footer-section p {
    line-height: 1.6;
    text-align: justify;
}

.social-media {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-media a {
    color: var(--white);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-media a:hover {
    transform: translateY(-3px);
}

.map iframe {
    border: none;
    border-radius: var(--border-radius);
    width: 100%;
    min-height: 200px;
}

.footer-bottom {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}
.custom-list {
    position: relative;
    padding-right: 20px;
    margin-bottom: 8px;
    font-family: 'Vazir-Bold', sans-serif; 
    font-size: 1rem;
    font-weight: bold;
  }
  
  .custom-list::before {
    content: "•";
    position: absolute;
    right: 0;
    color: #333;
    font-size: 1.2rem;
    line-height: 1;
  }
/* ==================== */
/* FONTS */
/* ==================== */
@font-face {
    font-family: 'Vazir-Bold';
    src: url('../font/Vazir-Bold.woff2') format('woff2') , url('../font/Vazir-Bold.woff') format('woff'); 
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Vazir-Bold';
    src: url('../font/Vazir-Bold.woff2') format('woff2') , url('../font/Vazir-Bold.woff') format('woff'); 
    font-weight: bold;
    font-style: normal;
}
/* ==================== */
/* UTILITY CLASSES */
/* ==================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* ==================== */
/* RESPONSIVE DESIGN */
/* ==================== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem 0;
    }
    
    .header-left {
        margin: 0 0 1rem 0;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav li {
        margin: 0.3rem 0.6rem;
    }
    
    .jumbotron h2 {
        font-size: 1.4rem;
    }
    
    .display-4 {
        font-size: 1.6rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}
/* ==================== */
/* AUTOMATION PAGE */
/* ==================== */
.automation-container {
  max-width: 100%;
  margin: 50px auto;
  /*background: var(--white);*/
  background-image: url('../image/bg.png');
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
}

.table-responsive {
  max-height: 600px; /* ارتفاع ثابت */
  overflow-y: auto;  /* اسکرول عمودی */
  background: var(--white);
  margin-bottom: 20px;
  width: 100%;
}

#meterTable {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
}

#meterTable th, #meterTable td {
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 24px;
  text-align: center;
}

#meterTable th {
  /*background: var(--secondary-color);*/
  background-color: #285581;
  color: white;
  position: sticky;
  padding: 10px;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  top: 0;
}
#meterTable tbody tr {
  transition: background-color 0.3s ease;
}

#meterTable tbody tr:hover {
  background-color: #f0f8ff;
}
.meter-label {
  font-size: 25px;
  font-weight: bold;
  color: hsl(256, 90%, 42%);
}
.search-btn {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  background-color: #285581;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.search-btn:hover {
  background-color: #1f456d;
}

.search-row {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search-row label {
  min-width: 200px;
  font-size: 16px;
  font-weight: bold;
}

.search-row input {
  padding: 8px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* واکنش‌گرا برای موبایل */
@media (max-width: 768px) {
  .search-btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 12px;
  }
}
#result {
  margin-top: 20px;
  padding: 15px;
  /*background: var(--light-bg);*/
  background-image: url('../image/bg.png');
  border-radius: 5px;
  text-align: left;
  
  font-weight: bold;
}
.en-list {
  direction: ltr;            /* جهت نوشتار چپ‌به‌راست */
  text-align: left;          /* متن چپ‌چین */
  list-style: disc outside;  /* بولت دایره و بیرون متن */
  padding-left: 1.25rem;     /* جای بولت سمت چپ */
  padding-right: 0;
  margin: 0;
}

.en-list li { 
  text-align: left; 
}
#result h3 {
  text-align: center;   /* تیتر وسط‌چین */
  margin-bottom: 15px;  /* کمی فاصله از لیست */
  color: var(--primary-color); /* رنگ هماهنگ با سایت */
}