/* ==========================================================================
   Custom color overrides (teal-700 + cyan-500 palette)
   ========================================================================== */
:root {
  --md-primary-fg-color:        #059669;     /* emerald-600 – سبز حرفه‌ای */
  --md-primary-fg-color--light: #10b981;
  --md-primary-fg-color--dark:  #047857;
  --md-accent-fg-color:         #f59e0b;     /* amber-500 – نارنجی گرم */
  --md-accent-fg-color--transparent: rgba(245, 158, 11, 0.12);
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color:        #10b981;
  --md-accent-fg-color:         #fbbf24;
}
/* ==========================================================================
   Global typography & spacing tweaks
   ========================================================================== */
.md-header,
.md-tabs {
  color: #0c0c0c;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", serif;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

/* ==========================================================================
   Single image styling
   ========================================================================== */
.doc-image-single {
  display: block;
  margin: 2.5rem auto;
  width: 90%;
  max-width: 1024px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.25s ease;
}

.doc-image-single:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Paired images – fixed aspect container approach
   ========================================================================== */
.doc-image-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2.5rem 0;
  justify-content: center;
  align-items: stretch;
}

.doc-image-pair a {
  flex: 1 1 320px;
  max-width: 480px;
  aspect-ratio: 4 / 3;                    /* standard screenshot ratio – change if needed */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-image-pair img {
  width: 100%;
  height: 100%;
  object-fit: contain;                    /* change to 'cover' if you prefer cropped & filled */
  object-position: center;
  display: block;
}

.doc-image-pair a:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Mobile stacking */
@media (max-width: 960px) {
  .doc-image-pair {
    flex-direction: column;
    align-items: center;
  }

  .doc-image-pair a {
    max-width: 90%;
    aspect-ratio: 4 / 3;
  }
}

/* ==========================================================================
   Code block improvements
   ========================================================================== */
.md-typeset pre,
.md-typeset code {
  border-radius: 10px;
}

.md-typeset pre {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin: 1.5rem 0;
}

/* Optional: subtle background for inline code */
.md-typeset code {
  background-color: rgba(0, 0, 0, 0.04);
  padding: 0.15em 0.35em;
  font-size: 0.9em;
}

/* ==========================================================================
   Optional: better link styling (underlines on hover only)
   ========================================================================== */
.md-typeset a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s ease;
}

.md-typeset a:hover,
.md-typeset a:focus {
  border-bottom-color: var(--md-accent-fg-color);
}