/* ==== پایه ==== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Sahel', Tahoma, sans-serif;
  background-color: #ffffff;
  color: #013384;
  direction: rtl;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ==== دکمه‌ها ==== */
.btn {
  padding: 10px 25px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  font-size: 16px;
}

.yellow-btn {
  background-color: #FFB400;
  color: #000;
  padding: 14px 32px;
  font-size: 18px;
  border-radius: 50px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease-in-out;
}

.yellow-btn:hover {
  background-color: #e0a000;
  transform: translateY(-2px);
}

/* ==== بنر اصلی ==== */
.banner-section {
  position: relative;
  text-align: center;
}

.banner-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==== دکمه‌های ورود و ثبت‌نام زیر بنر ==== */  
.auth-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 40px;
}

.auth-buttons .btn {
  flex: 1;
  max-width: 180px;
  text-align: center;
  padding: 12px 0;
  font-weight: bold;
  font-size: 16px;
  border-radius: 30px;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .auth-buttons {
    flex-direction: row;
    gap: 10px;
    justify-content: center;
  }

  .auth-buttons .btn {
    font-size: 14px;
    padding: 10px 0;
  }
}
/* ==== جدول مارکت - نسخه نهایی بدون ستون شماره و بدون اسکرول افقی ==== */
.market-section {
  text-align: center;
  padding: 60px 20px;
  background-color: #ffffff;
}

.market-section h2 {
  font-size: 24px;
  margin-bottom: 25px;
  color: #013384;
  font-weight: bold;
}

.market-table {
  width: 100%;
  margin: auto;
  background-color: #ffffff;
  border-radius: 12px;
  overflow-x: hidden; /* ✅ جلوگیری از اسکرول افقی */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.market-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed; /* ✅ کنترل بهتر در موبایل */
}

/* سلول‌های جدول */
.market-table th,
.market-table td {
  padding: 12px 16px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  border: 1px solid #e0e0e0;
  white-space: nowrap;
  background-color: #ffffff;
}

.market-table th {
  background-color: #fca311;
  color: #ffffff;
}

/* سطرهای زوج */
.market-table tr:nth-child(even) td {
  background-color: #f9f9f9;
}

.market-table tr:hover td {
  background-color: #f1f1f1;
}

/* گوشه‌های گرد جدول */
.market-table table tr:first-child th:first-child {
  border-top-right-radius: 12px;
}
.market-table table tr:first-child th:last-child {
  border-top-left-radius: 12px;
}
.market-table table tr:last-child td:first-child {
  border-bottom-right-radius: 12px;
}
.market-table table tr:last-child td:last-child {
  border-bottom-left-radius: 12px;
}

/* رنگ درصد تغییرات */
.green {
  color: green;
}

.red {
  color: red;
}

/* دکمه مشاهده بازار */
.market-section .yellow-btn {
  display: inline-block;
  margin: 30px auto 0;
  text-align: center;
  font-size: 16px;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: bold;
  background-color: #FFB400;
  color: #000000;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.market-section .yellow-btn:hover {
  background-color: #e09e00;
}

/* ==== واکنش‌گرایی برای موبایل ==== */
@media (max-width: 768px) {
  .market-section h2 {
    font-size: 20px;
  }

  .market-section .yellow-btn {
    font-size: 15px;
    padding: 10px 28px;
  }

  .market-table {
    overflow-x: hidden !important; /* ✅ ممنوعیت اسکرول افقی */
    display: block;
    border-radius: 12px;
  }

  .market-table table {
    width: 100%;
    table-layout: fixed;
    font-size: 13.5px;
  }

  .market-table th,
  .market-table td {
    font-size: 13.5px;
    padding: 10px 8px;
    white-space: nowrap;
  }
}

/* ==== بخش وبلاگ ==== */
.blog-preview {
  padding: 60px 20px;
  background-color: #001d3d;
  text-align: center;
  margin-bottom: 40px;
}

.blog-preview h2 {
  color: #fca311;
  font-weight: bold;
  margin-bottom: 40px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-card {
  background-color: #013384;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(1, 51, 132, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-8px);
}

.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: inset 0 0 30px #001d3d;
  display: block;
}

.blog-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fca311;
}

.blog-content h3 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #fca311;
}

.blog-content p {
  flex-grow: 1;
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

.blog-btn {
  display: inline-block;
  padding: 12px 28px;
  background-color: #fca311;
  color: #001d3d;
  font-weight: bold;
  border-radius: 50px;
  box-shadow: 0 6px 12px rgba(252, 163, 17, 0.5);
  text-decoration: none;
  transition: background-color 0.3s ease;
  margin-top: 15px;
  text-align: center;
}

.blog-btn:hover {
  background-color: #e0a000;
  color: #000;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .blog-card img {
    height: 200px;
  }
}

/* ==== آمار پویا ==== */
.stats-section {
  display: flex;
  justify-content: space-around;
  padding: 50px 20px;
  background-color: #001d3d;
  flex-wrap: wrap;
  gap: 20px;
  text-align: center;
  color: #ffffff;
}

.stat-box {
  flex: 1 1 200px;
  background: #013384;
  padding: 25px 15px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
  color: #fff5e0;
}

.stat-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.stat-box h3 {
  font-size: 28px;
  color: #fca311;
  margin-bottom: 5px;
  font-weight: bold;
}

.stat-box p {
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
}


/* ==== فوتر سه ستونه ==== */
.footer {
  background-color: #001d3d;
  color: #fff;
  padding: 60px 20px 40px;
  font-size: 14px;
  margin-top: 40px;
}

.footer-boxes {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px;
  text-align: center;
  margin-bottom: 30px;
}

.footer-box {
  flex: 1 1 250px;
  background-color: #013384;
  padding: 25px 20px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

/* ✅ فقط این باکس */
.footer-box.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-box h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: #fca311;
}

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

/* ✅ تصویر بارکد وسط‌چین */
.qr-image {
  width: 100px;
  margin-bottom: 12px;
  display: block;
}

.bold-text {
  font-weight: bold;
  color: #000;
}

.footer-box.contact-box * {
  color: #fca311 !important;
  font-weight: bold;
}

.social-icons img {
  width: 80px;
  height: 80px;
  margin: 0 10px;
  vertical-align: middle;
  border-radius: 12px;
  object-fit: contain;
}

/* ==== فوتر پایین ==== */
.footer-bottom {
  background-color: #001d3d;
  color: #ffffff;
  text-align: center;
  padding: 12px 10px;
  font-size: 13px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 900;
}

/* ==== واکنش‌گرا ==== */
@media (max-width: 768px) {
  .footer-boxes {
    flex-direction: column;
    gap: 20px;
  }
}

.footer .yellow-btn {
  background-color: #FFB400 !important;
  color: #000 !important;
  font-weight: bold;
}
/* ==== ساختار هدر - Flex و نظم داخلی ==== */
.site-header {
  background-color: #013384;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  position: relative;
  z-index: 1000;
  height: auto;
}

/* === آیکون زبان === */
/* ==== آیکون زبان در دسکتاپ - وسط چین عمودی سمت چپ ==== */
.lang-switch {
  display: flex;
  align-items: center;   /* ✅ وسط چین عمودی */
  justify-content: flex-start;
  position: static;      /* ❗ حذف absolute برای دسکتاپ */
  margin-right: auto;
}

.lang-switch a {
  background-color: #fca311;
  color: #013384;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease-in-out;
}

.lang-switch a:hover {
  background-color: #e09e00;
}

/* === لوگو سمت راست === */
.site-logo {
  margin-right: 20px; /* فاصله از راست */
  display: flex;
  align-items: center;
  height: 50px; /* ارتفاع هدر */
  overflow: hidden;
}

.site-logo img {
  max-height: 150px; /* اندازه بزرگ‌تر لوگو (پیش‌فرض قبلی 50 بود) */
  height: auto;
  width: auto;
  display: block;
  object-fit: contain;
}

/* === منو وسط === */
.main-navigation {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-grow: 1;
}

.main-navigation a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 6px 10px;
}

/* === دکمه منو همبرگری موبایل === */
.mobile-menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: #fca311;
  cursor: pointer;
}

/* ==== ریسپانسیو موبایل ==== */
@media (max-width: 768px) {
  .site-header {
    justify-content: center;
    padding: 12px 15px;
    position: relative;
  }

  .lang-switch {
    top: 10px;
    left: 10px;
  }

  .mobile-menu-toggle {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
  }

  .site-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    background-color: #013384;
    flex-direction: column;
    z-index: 999;
    padding: 10px 0;
  }

  .main-navigation.active {
    display: flex;
  }

  .main-navigation a {
    text-align: center;
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
}
@media (max-width: 768px) {
  .site-header {
    height: 70px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
  }

  /* لوگو وسط */
  .site-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 1000;
  }

  /* آیکون منو چپ وسط */
  .mobile-menu-toggle {
    display: block;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    z-index: 1001;
    font-size: 26px;
    background: none;
    border: none;
    color: #fca311;
    cursor: pointer;
  }

  /* آیکون زبان راست وسط */
  .lang-switch {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    z-index: 1001;
  }

  .lang-switch a {
    background-color: #fca311;
    color: #013384;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none;
  }

  .lang-switch a:hover {
    background-color: #e09e00;
  }

  /* منوی همبرگری */
  .main-navigation {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    background-color: #013384;
    padding: 10px 0;
    z-index: 999;
  }

  .main-navigation.active {
    display: flex;
  }

  .main-navigation a {
    padding: 14px 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .main-navigation a:first-child {
    border-top: none;
  }
}
