/* ==========================================================================
   دیجی‌بیت مارکت — صفحات محتوایی (قوانین و مقررات / اطلاعات تماس)
   Shared by terms.html and contact.html. Reuses the design tokens,
   header, buttons and footer from style.css.
   ========================================================================== */

/* ==========================================================================
   Business identity line in the footer (enamad contact-match)
   ========================================================================== */

.site-footer-identity {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgb(0 0 0 / 8%);
  font-size: 12.5px;
  font-weight: 300;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.9;
}

.site-footer-identity strong {
  font-weight: 800;
  color: #333;
}

@media (max-width: 767px) {
  .site-footer-identity {
    font-size: 12px;
    gap: 2px 10px;
  }
}

/* ==========================================================================
   Page header (breadcrumb + title)
   ========================================================================== */

.page-hero {
  background: var(--hero-gradient);
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  padding: 34px 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  top: -200px;
  right: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 209 0 / 20%) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  font-size: 12px;
  color: rgb(255 255 255 / 70%);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: rgb(255 255 255 / 80%);
}

.breadcrumb a:hover {
  color: var(--main-color-two);
}

.breadcrumb i {
  font-size: 11px;
  line-height: 0;
}

.page-hero-title {
  font-family: var(--title-font);
  font-weight: 900;
  font-size: 30px;
  line-height: 1.4;
}

.page-hero-text {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.9;
  color: rgb(255 255 255 / 82%);
  max-width: 780px;
}

/* ==========================================================================
   Layout: sticky table of contents + article
   ========================================================================== */

.doc-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.doc-toc {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-box);
  padding: 18px;
  position: sticky;
  top: 18px;
}

.doc-toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  padding-bottom: 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eceef4;
}

.doc-toc-title i {
  color: var(--main-color-one);
  font-size: 17px;
  line-height: 0;
}

.doc-toc ol {
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-toc a {
  display: flex;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 7px 8px;
  border-radius: 8px;
  line-height: 1.6;
}

.doc-toc a::before {
  counter-increment: toc;
  content: counter(toc, persian) ".";
  color: var(--main-color-one);
  font-weight: 800;
  flex-shrink: 0;
}

.doc-toc a:hover,
.doc-toc a.is-active {
  background: #f1f2fb;
  color: var(--main-color-one);
}

/* ==========================================================================
   Article body
   ========================================================================== */

.doc {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-box);
  padding: 30px 32px 34px;
  font-size: 14px;
  line-height: 2.1;
  color: #3f4147;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 12px;
  color: var(--text-muted-two);
  background: #f7f8fc;
  border: 1px solid #eceef4;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 26px;
}

.doc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.doc-meta i {
  line-height: 0;
}

.doc section {
  scroll-margin-top: 20px;
  padding-bottom: 8px;
}

.doc section + section {
  margin-top: 22px;
  border-top: 1px dashed #e6e8f0;
  padding-top: 22px;
}

.doc h2 {
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.6;
  color: var(--main-color-one);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.doc h2 .num {
  flex-shrink: 0;
  background: var(--main-color-one);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 8px;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
}

.doc h3 {
  font-weight: 700;
  font-size: 14px;
  margin: 14px 0 4px;
  color: #2b2d35;
}

.doc p {
  margin-bottom: 8px;
}

.doc ul,
.doc ol {
  padding-inline-start: 20px;
  margin: 6px 0 10px;
}

.doc ul li,
.doc ol li {
  margin-bottom: 4px;
}

.doc ul {
  list-style: none;
  padding-inline-start: 0;
}

/* bullets only on plain text lists — never on component lists such as
   .footer-social that are nested inside the article */
.doc ul:not([class]) > li {
  position: relative;
  padding-inline-start: 18px;
}

.doc ul:not([class]) > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--main-color-one);
  opacity: 0.55;
}

.doc ol {
  list-style: none;
  counter-reset: doc-ol;
  padding-inline-start: 0;
}

.doc ol > li {
  position: relative;
  counter-increment: doc-ol;
  padding-inline-start: 26px;
}

.doc ol > li::before {
  content: counter(doc-ol, persian) ")";
  position: absolute;
  inset-inline-start: 0;
  color: var(--main-color-one);
  font-weight: 700;
}

.doc a {
  color: var(--main-color-one);
  font-weight: 500;
  border-bottom: 1px dotted currentColor;
}

.doc a:hover {
  color: var(--main-color-three);
}

/* buttons inside the article must not inherit the dotted link underline,
   and the label stays above the shine overlay */
.doc .btn {
  border-bottom: 0;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

/* navy button: hover must stay navy with white text (the generic
   `.doc a:hover { color: var(--main-color-three) }` was making the label
   disappear into the background) */
.doc .btn.main-color-one-bg {
  color: #fff;
}

.doc .btn.main-color-one-bg:hover,
.doc .btn.main-color-one-bg:focus-visible {
  background-color: var(--main-color-one-hover);
  color: #fff;
}

.doc .btn.main-color-two-bg {
  color: #413505;
}

.doc .btn.main-color-two-bg:hover,
.doc .btn.main-color-two-bg:focus-visible {
  background-color: var(--main-color-two-hover);
  color: #413505;
}

.doc .btn:not(.no-highlight)::before {
  z-index: 0;
}

.doc .btn > i,
.doc .btn > span {
  position: relative;
  z-index: 1;
}

.doc .btn.btn-white {
  color: var(--main-color-one);
}

.doc .btn.btn-white:hover {
  color: var(--main-color-three);
}

.doc strong {
  font-weight: 700;
  color: #1f2126;
}

/* callout — used for the mandatory "notice" blocks of the e-commerce law */
.notice {
  background: #fff9e3;
  border: 1px solid #ffe58a;
  border-inline-start: 4px solid var(--main-color-two);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.95;
}

.notice-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  color: #8a6d00;
  margin-bottom: 4px;
}

.notice-title i {
  line-height: 0;
  font-size: 16px;
}

/* definitions list — used for the business identification table */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 10px 0 14px;
  border: 1px solid #e6e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.doc-table th,
.doc-table td {
  border-bottom: 1px solid #e6e8f0;
  padding: 10px 14px;
  text-align: start;
  vertical-align: top;
  line-height: 1.9;
}

.doc-table tr:last-child th,
.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table th {
  background: #f7f8fc;
  font-weight: 700;
  color: #333;
  width: 190px;
  white-space: nowrap;
}

.doc-table a {
  border-bottom: 0;
}

.doc-table .ltr {
  direction: ltr;
  unicode-bidi: plaintext;
  display: inline-block;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12.5px;
}

/* inline links inside tables/cards: no dotted underline (keeps numbers clean) */
.doc-table a,
.contact-card a {
  border-bottom: 0;
}

/* back-to-top */
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed #e6e8f0;
}

/* ==========================================================================
   Footer links (terms / contact)
   ========================================================================== */

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-links span {
  color: var(--text-muted-two);
}

/* ==========================================================================
   Map (OpenStreetMap embed)
   ========================================================================== */

.map-frame {
  margin-top: 10px;
  border: 1px solid #e6e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #eef0f5;
  box-shadow: var(--shadow-sm);
  line-height: 0;
  position: relative;
}

.map-canvas {
  width: 100%;
  height: 340px;
  line-height: normal;
  z-index: 0;
}

/* Leaflet ships its own fonts/colours; keep it inside the card */
.map-frame .leaflet-container {
  font-family: var(--font-site);
  font-size: 12px;
  background: #eef0f5;
}

.map-frame .leaflet-popup-content {
  margin: 8px 12px 10px;
  line-height: 1.9;
  font-size: 12.5px;
  direction: rtl;
  text-align: right;
}

.map-fallback {
  display: none;
}

/* used when the map library or its tiles cannot load */
.map-frame.is-fallback {
  background: #f7f8fc;
  border-style: dashed;
}

.map-frame.is-fallback .map-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 160px;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
}

.map-frame.is-fallback .map-fallback i {
  font-size: 20px;
  line-height: 0;
  color: var(--main-color-one);
}

.map-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-muted-two);
}

.map-caption i {
  line-height: 0;
  color: var(--main-color-one);
}

.map-caption a {
  border-bottom: 0;
  font-weight: 700;
}

@media (max-width: 767px) {
  .map-canvas {
    height: 260px;
  }
}

/* ==========================================================================
   Contact page cards
   ========================================================================== */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 4px;
}

.contact-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #f7f8fc;
  border: 1px solid #eceef4;
  border-radius: 12px;
  padding: 16px;
}

.contact-card-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--main-color-one);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 4px var(--main-color-one-shadow);
}

.contact-card-icon i {
  font-size: 19px;
  line-height: 0;
}

.contact-card-label {
  font-size: 12px;
  color: var(--text-muted-two);
  margin-bottom: 2px;
}

.contact-card-value {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.8;
  word-break: break-word;
}

.contact-card-value.ltr-value {
  direction: ltr;
  text-align: start;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-toc {
    position: static;
    order: -1;
  }

  .doc-toc ol {
    gap: 0;
  }
}

@media (max-width: 767px) {
  .page-hero {
    padding: 24px 20px;
    border-radius: 14px;
  }

  .page-hero-title {
    font-size: 22px;
  }

  .doc {
    padding: 22px 18px 26px;
    font-size: 13.5px;
    line-height: 2;
  }

  .doc h2 {
    font-size: 16px;
  }

  .doc-table th {
    width: auto;
    display: block;
    border-bottom: 0;
  }

  .doc-table td {
    display: block;
    padding-top: 0;
  }

  .contact-cards {
    grid-template-columns: 1fr;
  }
}
