/**
 * Foxiz Pro - Persian / RTL / Speed / Mobile / Readability
 * Version 2.8.0
 */

/* Force IRANSans + readable text */
body.foxiz-pro,
body.rtl-ready,
body {
  font-family: IRANSans, Tahoma, "Segoe UI", system-ui, sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.p-url,
.s-title,
.block-heading {
  font-family: IRANSans, Tahoma, sans-serif !important;
  font-weight: 700;
}

/* FORCE readable text - never light-on-white */
body,
.site-content,
.entry-content,
.entry-summary,
article,
.p-wrap,
.p-content {
  color: #1a1a1a;
}

.entry-title,
.entry-title a,
.p-url,
h1 a, h2 a, h3 a, h4 a {
  color: #111111 !important;
  opacity: 1 !important;
}

.entry-title a:hover,
.p-url:hover {
  color: #2b4acb !important;
}

.entry-content p,
.p-excerpt,
.entry-summary,
.p-summary {
  color: #333333 !important;
  opacity: 1 !important;
}

.meta-el,
.p-meta,
.entry-meta,
.meta-text {
  color: #555555 !important;
  opacity: 1 !important;
}

/* Cards polish */
.p-wrap,
.block-inner article,
.p-box {
  border-radius: 10px;
  transition: box-shadow 0.28s ease, transform 0.28s ease;
}

.p-wrap:hover,
.p-box:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}

/* Images */
.p-featured img,
.feat-holder img,
.featured img {
  border-radius: 8px;
  max-width: 100%;
  height: auto;
}

/* Buttons */
.p-readmore,
.btn,
button,
.is-btn {
  border-radius: 8px !important;
  font-family: IRANSans, Tahoma, sans-serif !important;
  transition: all 0.25s ease;
}

/* Performance */
.p-wrap,
.widget,
article {
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 991px) {
  .site-wrap,
  .rb-container,
  .rb-container1120,
  .rb-container860 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #sidebar,
  .sidebar-wrap,
  .s-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 28px;
  }

  .edge-sidebar,
  .s-grid {
    flex-direction: column !important;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 15px !important;
    line-height: 1.8 !important;
  }

  .entry-title,
  .entry-title a,
  .p-url,
  h2.entry-title,
  h3.entry-title {
    font-size: 1.12rem !important;
    line-height: 1.55 !important;
    color: #0d0d0d !important;
  }

  .p-excerpt,
  .entry-content p,
  .p-summary {
    font-size: 14px !important;
    line-height: 1.8 !important;
    color: #2a2a2a !important;
  }

  .p-meta,
  .meta-el {
    font-size: 12px !important;
  }

  .p-featured img,
  .feat-holder img {
    width: 100% !important;
    height: auto !important;
    border-radius: 10px !important;
  }

  .p-wrap,
  .p-box {
    margin-bottom: 16px !important;
  }

  /* Header mobile */
  .navbar-wrap,
  .header-wrap {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Widgets */
  .widget {
    padding: 14px !important;
    margin-bottom: 14px !important;
  }

  /* Buttons touch-friendly */
  .p-readmore,
  .btn,
  button {
    min-height: 42px;
    font-size: 14px !important;
  }

  /* Grid to single column */
  .block-inner,
  .is-grid,
  .grid-container {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .entry-title,
  .entry-title a,
  .p-url {
    font-size: 1.02rem !important;
  }

  body {
    font-size: 14px !important;
  }

  .p-excerpt,
  .entry-content p {
    font-size: 13.5px !important;
  }
}

/* RTL polish */
html[dir="rtl"] body,
body.rtl {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .p-meta,
body.rtl .p-meta {
  direction: rtl;
}

/* Print */
@media print {
  .header-wrap,
  .footer-wrap,
  #sidebar,
  .navbar-wrap {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
