/* ==========================================================================
   استایل اختصاصی و فوق پیشرفته مقالات مگامقاله و پیلار وب سایت آپسئو
   سازگار با تمامی مرورگرها، ریسپانسیو موبایل و بدون افت سرعت (Core Web Vitals)
   ========================================================================== */

/* ۱. بدنه و تایپوگرافی عمومی مقاله */
.upseo-article-wrapper {
  font-family: inherit;
  line-height: 2.1;
  color: #2d3748;
  font-size: 1.05rem;
  margin: 0 auto;
}

.upseo-article-wrapper h2 {
  color: #0b3954;
  font-size: 1.65rem;
  font-weight: 800;
  margin-top: 45px;
  margin-bottom: 22px;
  border-right: 5px solid #0066cc;
  padding-right: 15px;
  line-height: 1.5;
}

.upseo-article-wrapper h3 {
  color: #1a4971;
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 35px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.upseo-article-wrapper h4 {
  color: #2b6cb0;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 25px;
  margin-bottom: 14px;
}

.upseo-article-wrapper p {
  margin-bottom: 22px;
  text-align: justify;
  line-height: 2.1;
}

.upseo-article-wrapper ul,
.upseo-article-wrapper ol {
  margin-bottom: 25px;
  padding-right: 25px;
}

.upseo-article-wrapper li {
  margin-bottom: 12px;
  line-height: 1.9;
}

.upseo-article-wrapper a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted #0066cc;
  transition: all 0.2s ease-in-out;
}

.upseo-article-wrapper a:hover {
  color: #004085;
  border-bottom: 1px solid #004085;
}

/* ۲. کامپوننت هوش مصنوعی و پاسخ مستقیم (GEO Quick Answer) */
.upseo-geo-box {
  background: #f8fafc;
  border-right: 4px solid #10b981;
  border-radius: 0 8px 8px 0;
  padding: 22px;
  margin: 30px 0;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.05);
}

.upseo-geo-box strong {
  color: #065f46;
  display: block;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

/* ۳. کامپوننت اختصاصی ارزش اطلاعاتی (Information Gain Data Box) */
.upseo-infogain-box {
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
  border: 2px solid #0066cc;
  border-radius: 12px;
  padding: 24px;
  margin: 35px 0;
  box-shadow: 0 8px 24px rgba(0, 102, 204, 0.08);
}

.upseo-infogain-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e1eefb;
  padding-bottom: 12px;
}

.upseo-infogain-title {
  color: #004085;
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
}

.upseo-data-badge {
  background: #0066cc;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.upseo-infogain-content {
  color: #2c3e50;
  line-height: 1.9;
  font-size: 0.98rem;
}

/* ۴. جدول ماتریس تصمیم گیری و مقایسه فنی (Decision Matrix Table) */
.upseo-table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 30px 0;
}

.upseo-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

.upseo-matrix-table th {
  background: #004085;
  color: #ffffff;
  padding: 14px 16px;
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.upseo-matrix-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.upseo-matrix-table tr:hover {
  background: #f8fafd;
}

/* ۵. جعبه های هشدار، نکات طلایی و موفقیت */
.upseo-warning-box {
  background: #fff5f5;
  border-right: 4px solid #e53e3e;
  padding: 18px 22px;
  margin: 30px 0;
  border-radius: 0 8px 8px 0;
  color: #742a2a;
}

.upseo-warning-box strong {
  color: #9b2c2c;
  display: block;
  margin-bottom: 8px;
}

.upseo-tip-box {
  background: #fffbeb;
  border-right: 4px solid #d97706;
  padding: 18px 22px;
  margin: 30px 0;
  border-radius: 0 8px 8px 0;
  color: #78350f;
}

.upseo-tip-box strong {
  color: #b45309;
  display: block;
  margin-bottom: 8px;
}

/* ۶. کامپوننت چک لیست تعاملی جاوا اسکریپت */
.upseo-interactive-checklist {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 25px;
  margin: 35px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.upseo-checklist-item {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  cursor: pointer;
  font-size: 0.98rem;
}

.upseo-checklist-item input {
  margin-left: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0066cc;
}

.upseo-checklist-score {
  font-weight: 800;
  font-size: 1.05rem;
  color: #0066cc;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e0;
}

/* ۷. استایل بلوک سوالات متداول (FAQ Block) */
.upseo-faq-section {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid #edf2f7;
}

.upseo-faq-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.upseo-faq-item h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.15rem;
  color: #1a4971;
}

.upseo-faq-item p {
  margin-bottom: 0;
  color: #4a5568;
}

/* ۸. بهینه سازی نمایش در گوشی های همراه (Responsive) */
@media (max-width: 768px) {
  .upseo-article-wrapper h2 {
    font-size: 1.4rem;
  }
  .upseo-article-wrapper h3 {
    font-size: 1.2rem;
  }
  .upseo-infogain-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .upseo-infogain-box,
  .upseo-interactive-checklist {
    padding: 18px;
  }
}

/* UpSEO Google Preferred Source Component */
.upseo-preferred-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-right: 5px solid #4285f4;
    border-radius: 12px;
    padding: 16px 22px;
    margin: 30px 0;
    direction: rtl;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transition: all 0.25s ease-in-out;
    box-sizing: border-box;
    font-family: inherit;
}

.upseo-preferred-box:hover {
    border-color: #cbd5e1;
    border-right-color: #1a73e8;
    box-shadow: 0 6px 18px rgba(66, 133, 244, 0.12);
    transform: translateY(-2px);
}

.upseo-preferred-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.upseo-preferred-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.upseo-google-g-svg {
    width: 24px;
    height: 24px;
}

.upseo-preferred-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: right;
}

.upseo-preferred-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0b3954;
    margin: 0;
    line-height: 1.4;
}

.upseo-preferred-desc {
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    margin: 0;
    line-height: 1.4;
}

.upseo-preferred-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #1a73e8;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
    transition: all 0.2s ease;
}

.upseo-preferred-btn:hover {
    background-color: #1557b0;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

.upseo-preferred-star-icon {
    width: 16px;
    height: 16px;
    fill: #fbbc05;
}

/* واکنش گرایی در موبایل */
@media (max-width: 768px) {
    .upseo-preferred-box {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }
    .upseo-preferred-main {
        gap: 12px;
    }
    .upseo-preferred-btn {
        width: 100%;
        padding: 12px;
    }
}
