/*
Theme Name: Smart Plasma
Version: 1.0
*/

/* ===== Global Persian Font ===== */
body, h1, h2, h3, h4, h5, h6, p, a, li {
  font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

/* === پایه === */
.desktop-only { display: flex; }
.mobile-only { display: none; }

.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: relative;
  z-index: 1000;
}
.header-section.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px; /* فاصله بین زبان و سرچ */
}
/* === هدر دسکتاپ === */
.header-desktop {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}
.header-section {
  flex: 1;
}
.header-center {
  text-align: center;
}
.site-logo img {
  height: 75px;
}
.main-menu {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  gap: 25px;
  margin: 0;
  padding: 0;
}
.main-menu li a {
  text-decoration: none;
  color: #222;
  font-weight: 600;
  transition: 0.2s;
}
.main-menu li a:hover,
.main-menu li.current-menu-item a {
  color: #d50000;
}
.lang-switcher a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
}
.lang-switcher a.active,
.lang-switcher a:hover {
  color: #d50000;
}
.search-form input {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
}

/* === موبایل === */
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }

  .mobile-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
  }

  .mobile-toggle {
    font-size: 28px;
    cursor: pointer;
  }

  .mobile-logo img {
    height: 45px;
  }

  .mobile-menu-wrapper {
    display: none;
    background: #fff;
    padding: 15px 0;
    text-align: center;
    border-top: 1px solid #eee;
  }

  body.menu-open .mobile-menu-wrapper {
    display: block;
  }

  .mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-menu li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
  }

  .mobile-menu li a {
    text-decoration: none;
    font-weight: bold;
    color: #222;
    transition: 0.2s;
  }

  .mobile-menu li a:hover,
  .mobile-menu li.current-menu-item a {
    color: #d50000;
  }

  .mobile-lang-switcher {
    margin-top: 10px;
  }

  .mobile-search {
    margin-top: 10px;
  }

  .mobile-search input {
    width: 70%;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
  }
  
  .mobile-lang-switcher a {
    text-decoration: none;   /* حذف زیرخط */
    color: #000;              /* رنگ متن مشکی */
    font-weight: bold;
    transition: color 0.2s;
  }
  .mobile-lang-switcher a.active,
  .mobile-lang-switcher a:hover {
    color: #d50000;           /* قرمز شدن هنگام فعال یا هاور */
  }
}

/* General Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Vazirmatn', 'Arial', sans-serif;
}

body {
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 80vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero-section .overlay {
  background: rgba(0, 0, 0, 0.5);
  padding: 40px;
  border-radius: 10px;
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.hero-section .cta-btn {
  display: inline-block;
  padding: 15px 30px;
  background-color: #c0392b;
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.hero-section .cta-btn:hover {
  background-color: #e74c3c;
  transform: scale(1.05);
}

/* Intro Text */
.intro-text {
  padding: 50px 0;
  background-color: #fff;
  text-align: center;
}

.intro-text p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  color: #555;
}

.features {
    padding: 50px 0;
    background-color: #f1f1f1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* مهم برای چند ستون در موبایل */
    gap: 20px;
}

/* استایل برای موبایل */
@media (max-width: 768px) {
  .features {
    flex-direction: column;
    padding: 3px 1px;
  }
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-content: center;
}

.feature-box {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: center;
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.feature-box:hover, .feature-box.active {
  transform: translateY(-10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.feature-box .feature-icon {
  font-size: 2em;
  margin-bottom: 15px;
  color: #c0392b;
}

.feature-box h3 {
  margin: 0 0 15px 0;
  font-size: 1.2em;
  color: #c0392b;
}

.feature-box p {
  margin: 0;
  flex-grow: 1;
  text-align: center;
  padding: 10px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  color: #666;
}

/* Carousel Section */
.carousel-text-block {
  padding: 50px 0;
  background-color: #fff;
}

.carousel-text-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.carousel-wrapper {
  flex: 1;
  min-width: 300px;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.carousel-images {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
}

.carousel-images img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 10px;
}

.carousel-prev, .carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #c0392b;
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 1.5rem;
  transition: background-color 0.3s ease;
}

.carousel-prev:hover, .carousel-next:hover {
  background-color: #e74c3c;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.carousel-text {
  flex: 1;
  min-width: 300px;
  padding: 20px;
  text-align: center;
}

.carousel-text h2 {
  font-size: 2rem;
  color: #c0392b;
  margin-bottom: 15px;
}

.carousel-text p {
  font-size: 1.1rem;
  color: #555;
}

/* About Section */
.about-section {
  padding: 50px 0;
  background-color: #f9f9f9;
  text-align: center;
}

.about-section h2, .about-section h3 {
  color: #c0392b;
  margin-bottom: 20px;
}

.about-section h2 {
  font-size: 2.5rem;
}

.about-section h3 {
  font-size: 1.8rem;
}

.about-section p {
  font-size: 1.1rem;
  color: #555;
  max-width: 800px;
  margin: 0 auto 20px;
}

/* R&D Section */
.rd-section {
  padding: 50px 0;
  background-color: #fff;
}

.rd-section h2 {
  font-size: 2.5rem;
  color: #c0392b;
  text-align: center;
  margin-bottom: 20px;
}

.rd-section p {
  font-size: 1.1rem;
  color: #555;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
}

.rd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-content: center;
}

.rd-box {
  background-color: #f9f9f9;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: center;
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 140%;
}

.rd-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rd-box h3 {
  margin: 0 0 15px 0;
  font-size: 1.2em;
  color: #c0392b;
}

.rd-box p {
  margin: 0;
  flex-grow: 1;
  text-align: center;
  padding: 10px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  color: #666;
}

/* Products Section */
.products-section {
  padding: 90px 0;
  background-color: #f1f1f1;
}

.products-section h2 {
  font-size: 2.5rem;
  color: #c0392b;
  text-align: center;
  margin-bottom: 20px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-content: center;
}

.product-box {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: center;
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.product-box h3 {
  margin: 0 0 15px 0;
  font-size: 1.2em;
  color: #c0392b;
}

.product-box p {
  margin: 0;
  flex-grow: 1;
  text-align: center;
  padding: 10px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  color: #666;
}

/* Article Section */
.article-section {
  padding: 50px 0;
  background-color: #fff;
  text-align: center;
}

.article-section h2 {
  font-size: 2.5rem;
  color: #c0392b;
  margin-bottom: 20px;
}

.article-section p {
  font-size: 1.1rem;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
}

.article-section a {
  color: #c0392b;
  text-decoration: none;
  font-weight: bold;
}

.article-section a:hover {
  text-decoration: underline;
}

/* News Section */
.news-section {
  padding: 50px 0;
  background-color: #f9f9f9;
  direction: ltr; /* جهت پیش‌فرض به چپ به راست */
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-content: center;
}

.news-box {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  height: auto; /* تغییر به ارتفاع خودکار */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.news-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.news-box h3 {
  margin: 0 0 15px 0;
  font-size: 1.2em;
  color: #c0392b;
}

.news-box p {
  margin: 0;
  flex-grow: 1;
  text-align: center;
  padding: 10px;
  overflow: auto; /* اسکرول اگر متن طولانی باشد */
  word-wrap: break-word; /* شکستن کلمات طولانی */
  color: #666;
}

.news-box a {
  color: #c0392b;
  text-decoration: none;
  font-weight: bold;
}

.news-box a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    height: 50vh; /* کاهش ارتفاع اسلایدر در موبایل */
  }

  .hero-section h1 {
    font-size: 1.8rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .hero-section .cta-btn {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .carousel-text-container {
    flex-direction: column;
  }

  .carousel-images img {
    height: 200px;
  }

  .carousel-prev, .carousel-next {
    padding: 8px;
    font-size: 1.2rem;
  }

  .carousel-text {
    text-align: center;
  }

  .features-grid,
  .rd-grid,
  .products-grid,
  .news-grid {
    grid-template-columns: 1fr; /* یک ستون در موبایل */
  }

  .feature-box,
  .rd-box,
  .product-box,
  .news-box {
    height: auto; /* ارتفاع خودکار در موبایل */
  }

  .feature-box .feature-icon {
    font-size: 2rem;
  }

  .feature-box h3,
  .rd-box h3,
  .product-box h3,
  .news-box h3 {
    font-size: 1.2rem;
  }

  .feature-box p,
  .rd-box p,
  .product-box p,
  .news-box p {
    font-size: 0.9rem;
  }

  .about-section h2,
  .rd-section h2,
  .products-section h2,
  .article-section h2,
  .news-section h2 {
    font-size: 1.8rem;
  }

  .about-section p,
  .rd-section p,
  .article-section p {
    font-size: 1rem;
  }
}

/* تنظیم جهت‌گیری متن بر اساس زبان */
body[lang="fa"] .news-section {
  direction: rtl; /* جهت راست به چپ برای زبان فارسی */
}

body[lang="fa"] .news-box h3,
body[lang="fa"] .news-box p {
  text-align: right; /* متن در باکس‌ها به راست چیده شود */
}

body[lang="en"] .news-section {
  direction: ltr; /* جهت چپ به راست برای زبان انگلیسی */
}

body[lang="en"] .news-box h3,
body[lang="en"] .news-box p {
  text-align: left; /* متن در باکس‌ها به چپ چیده شود */
}

/* ===== Footer ===== */
/* Footer Styles */
.site-footer {
  background-color: #1a1a1a; /* پس‌زمینه تیره */
  color: #ffffff; /* متن سفید برای خوانایی */
  padding: 40px 20px;
  font-family: 'Vazirmatn', 'Arial', sans-serif;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

.footer-section {
  flex: 1;
}

.footer-social a {
  color: #ffffff; /* رنگ سفید برای آیکون‌ها */
  font-size: 24px;
  margin-right: 15px;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
  color: #c0392b; /* تغییر رنگ به قرمز مایل به نارنجی هنگام هورو */
  transform: scale(1.2);
}

.footer-social a:last-child {
  margin-right: 0;
}

.footer-contact p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.footer-contact a {
  color: #ffffff;
  text-decoration: none;
}

.footer-contact a:hover {
  color: #c0392b;
  text-decoration: underline;
}

.footer-copy {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333;
  margin-top: 20px;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-social a {
    margin: 0 10px;
    font-size: 20px;
  }

  .footer-contact p {
    font-size: 14px;
  }

  .footer-copy {
    font-size: 12px;
  }
}

.news-box p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}