@charset "UTF-8";
/* ==========================================================================
   doctorsamadi.ir — fonts + design system
   One file on purpose: one request, gzipped, cached for a year.
   No JavaScript, no framework, no page builder.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts — IRANSansX, Persian numerals, self-hosted
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'IRANSansX';
  src: url('fonts/IRANSansXFaNum-Regular.woff2?v=2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSansX';
  src: url('fonts/IRANSansXFaNum-DemiBold.woff2?v=2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSansX';
  src: url('fonts/IRANSansXFaNum-Bold.woff2?v=2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   Warm cream ground from the Balancia reference, carrying the clinic's own
   teal (#0198A2, sampled from the logo). Every pairing below was measured
   against WCAG: body text is AA or better, and the teal is reserved for
   icons, rules and large type where 3:1 is the bar.
   -------------------------------------------------------------------------- */

:root {
  --ds-font: 'IRANSansX', 'Segoe UI', Tahoma, system-ui, sans-serif;

  --ds-bg:          #F6F3EF;
  --ds-bg-warm:     #EDE7DF;
  --ds-surface:     #FFFFFF;

  --ds-ink:         #10323A;  /* 12.33:1 on cream — AAA */
  --ds-ink-soft:    #46656D;  /*  5.68:1 on cream — AA  */
  --ds-ink-faint:   #5A7278;  /*  4.62:1 on cream — AA  */

  --ds-brand:       #0198A2;  /* the logo colour, as-is */
  --ds-accent:      #0198A2;  /* 3.16:1 — icons and large type only */
  --ds-accent-deep: #046C74;  /* 5.58:1 on cream — safe for link text */
  --ds-accent-wash: #E3F2F3;

  --ds-cta:         #10323A;  /* white on this is 13.64:1 — AAA */
  --ds-cta-hover:   #1B4A55;

  --ds-line:        rgba(16, 50, 58, 0.11);
  --ds-line-strong: rgba(16, 50, 58, 0.20);

  --ds-radius:      18px;
  --ds-radius-lg:   28px;
  --ds-radius-pill: 999px;

  --ds-shadow:      0 1px 2px rgba(34,29,51,.04), 0 8px 24px rgba(34,29,51,.06);
  --ds-shadow-lift: 0 2px 4px rgba(34,29,51,.05), 0 16px 40px rgba(34,29,51,.10);

  /* Fluid scale. clamp() means no JS and no breakpoint jumps. */
  --ds-step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --ds-step-0:  clamp(1.00rem, 0.97rem + 0.16vw, 1.09rem);
  --ds-step-1:  clamp(1.19rem, 1.12rem + 0.34vw, 1.38rem);
  --ds-step-2:  clamp(1.41rem, 1.29rem + 0.60vw, 1.75rem);
  --ds-step-3:  clamp(1.69rem, 1.48rem + 1.03vw, 2.25rem);
  --ds-step-4:  clamp(2.00rem, 1.66rem + 1.70vw, 2.95rem);
  --ds-step-5:  clamp(2.36rem, 1.80rem + 2.80vw, 3.90rem);

  --ds-gap:      clamp(1rem, 0.7rem + 1.4vw, 1.75rem);
  --ds-section:  clamp(3.5rem, 2.2rem + 5.5vw, 7rem);
  --ds-gutter:   clamp(1rem, 0.5rem + 2.2vw, 2rem);
  --ds-max:      1180px;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* A single stray wide element should never hand the whole page a horizontal
   scrollbar. clip (not hidden) keeps position:sticky working. */
html, body { overflow-x: clip; max-width: 100%; }

/* Anchor links land under the sticky header without this. */
[id] { scroll-margin-top: 6.5rem; }

*, *::before, *::after { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body,
button,
input,
select,
optgroup,
textarea {
  font-family: var(--ds-font);
}

body {
  background: var(--ds-bg);
  color: var(--ds-ink);
  font-size: var(--ds-step-0);
  /* Persian script needs more room between lines than Latin. */
  line-height: 1.9;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  font-family: var(--ds-font);
  color: var(--ds-ink);
  font-weight: 700;
  /* Never tighten letter-spacing on Persian — it breaks connected letterforms. */
  letter-spacing: normal;
  line-height: 1.55;
  margin-block: 0 0.6em;
}

h1, .entry-title { font-size: var(--ds-step-4); }
h2 { font-size: var(--ds-step-3); }
h3 { font-size: var(--ds-step-2); }
h4 { font-size: var(--ds-step-1); }

p { margin-block: 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ds-accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ds-ink); }

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

/* Images that declare a ratio never shift the layout while loading. */
img[width][height] { height: auto; }

::selection { background: var(--ds-accent-wash); color: var(--ds-ink); }

:focus-visible {
  outline: 2px solid var(--ds-accent-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   4. Layout helpers
   -------------------------------------------------------------------------- */

.ds-wrap {
  width: 100%;
  max-width: var(--ds-max);
  margin-inline: auto;
  padding-inline: var(--ds-gutter);
}

.ds-section {
  padding-block: var(--ds-section);
}

/* Below-the-fold sections skip layout/paint until they scroll near.
   contain-intrinsic-size keeps the scrollbar honest so nothing jumps. */
.ds-defer {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.ds-center { text-align: center; }

.ds-eyebrow {
  display: inline-block;
  font-size: var(--ds-step--1);
  font-weight: 600;
  color: var(--ds-accent-deep);
  background: var(--ds-accent-wash);
  padding: 0.35em 1em;
  border-radius: var(--ds-radius-pill);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.ds-lead {
  font-size: var(--ds-step-1);
  color: var(--ds-ink-soft);
  line-height: 1.85;
  max-width: 58ch;
}

.ds-section-head {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
}

.ds-section-head.ds-center { margin-inline: auto; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.ds-btn,
.wp-block-button__link,
.ast-button,
button.ds-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  background: var(--ds-cta);
  color: #fff;
  font-weight: 600;
  font-size: var(--ds-step-0);
  line-height: 1.6;
  padding: 0.85em 1.9em;
  border: 0;
  border-radius: var(--ds-radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}

.ds-btn:hover,
.wp-block-button__link:hover,
.ast-button:hover {
  background: var(--ds-cta-hover);
  color: #fff;
  transform: translateY(-1px);
}

.ds-btn--ghost {
  background: transparent;
  color: var(--ds-ink);
  border: 1px solid var(--ds-line-strong);
}

.ds-btn--ghost:hover {
  background: var(--ds-surface);
  color: var(--ds-ink);
  border-color: var(--ds-ink);
}

/* Arrow sits in a circle, mirrored for RTL. */
.ds-btn__arrow {
  display: grid;
  place-items: center;
  width: 1.75em;
  height: 1.75em;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  font-size: 0.85em;
  flex: none;
}

.ds-btn--ghost .ds-btn__arrow { background: var(--ds-accent-wash); }

.ds-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.ds-hero {
  position: relative;
  background: linear-gradient(160deg, var(--ds-bg-warm) 0%, var(--ds-bg) 55%, var(--ds-accent-wash) 100%);
  padding-block: clamp(3rem, 1.5rem + 6vw, 6.5rem);
  overflow: hidden;
}

.ds-hero__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}

@media (min-width: 900px) {
  .ds-hero__grid { grid-template-columns: 1.05fr 0.95fr; }
}

.ds-hero__title {
  font-size: var(--ds-step-5);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.ds-hero__media {
  position: relative;
  border-radius: var(--ds-radius-lg);
  overflow: hidden;
  box-shadow: var(--ds-shadow-lift);
  aspect-ratio: 4 / 3;
  background: var(--ds-bg-warm);
}

.ds-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */

.ds-grid {
  display: grid;
  gap: var(--ds-gap);
}

/* The minmax floor decides the column count. 420px keeps a four-item set as
   a balanced 2×2 on desktop instead of 3 + a lonely orphan. */
.ds-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.ds-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ds-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

/* Credentials list in the about panel. Stacks on its own, no media query —
   the panel it sits in is already narrow on small screens. */
.ds-stats {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ds-stats li {
  padding-inline-start: 1rem;
  border-inline-start: 3px solid var(--ds-brand);
}

.ds-card {
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius);
  padding: clamp(1.4rem, 1rem + 1.2vw, 2rem);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.ds-card:hover {
  box-shadow: var(--ds-shadow);
  border-color: transparent;
  transform: translateY(-2px);
}

.ds-card h3 { font-size: var(--ds-step-1); margin-bottom: 0.5rem; }
.ds-card p  { color: var(--ds-ink-soft); font-size: var(--ds-step-0); margin-bottom: 0; }

.ds-card__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: var(--ds-accent-wash);
  color: var(--ds-accent-deep);
  margin-bottom: 1.1rem;
}

.ds-card__icon svg { width: 1.5rem; height: 1.5rem; }

/* Numbered steps */
.ds-step__num {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--ds-cta);
  color: #fff;
  font-weight: 700;
  font-size: var(--ds-step-0);
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   8. Panels
   -------------------------------------------------------------------------- */

.ds-panel {
  background: var(--ds-surface);
  border-radius: var(--ds-radius-lg);
  padding: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem);
  border: 1px solid var(--ds-line);
}

.ds-panel--warm {
  background: linear-gradient(140deg, var(--ds-bg-warm), var(--ds-accent-wash));
  border-color: transparent;
}

.ds-panel--ink {
  background: var(--ds-cta);
  border-color: transparent;
  color: #fff;
}

.ds-panel--ink h2,
.ds-panel--ink h3 { color: #fff; }

.ds-panel--ink p { color: rgba(255,255,255,.78); }

.ds-panel--ink .ds-btn {
  background: #fff;
  color: var(--ds-ink);
}

.ds-panel--ink .ds-btn:hover { background: var(--ds-accent-wash); }
.ds-panel--ink .ds-btn__arrow { background: var(--ds-accent-wash); }

/* --------------------------------------------------------------------------
   9. Chips / condition list
   -------------------------------------------------------------------------- */

.ds-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ds-chips li {
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-pill);
  padding: 0.5em 1.15em;
  font-size: var(--ds-step-0);
  color: var(--ds-ink-soft);
}

/* --------------------------------------------------------------------------
   10. Stats
   -------------------------------------------------------------------------- */

.ds-stat__value {
  display: block;
  font-size: var(--ds-step-4);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ds-ink);
}

.ds-stat__label {
  display: block;
  font-size: var(--ds-step--1);
  color: var(--ds-ink-faint);
}

/* --------------------------------------------------------------------------
   10b. Brand mark
   The logo ships as an inline SVG using currentColor, so it costs no request
   and recolours for dark surfaces without a second file.
   -------------------------------------------------------------------------- */

.ds-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ds-brand);
  text-decoration: none;
  line-height: 1.3;
}

.ds-logo svg {
  width: clamp(48px, 4vw, 68px);
  height: auto;
  flex: none;
  display: block;
}

.ds-logo__text {
  display: flex;
  flex-direction: column;
}

.ds-logo__name {
  font-size: var(--ds-step-0);
  font-weight: 700;
  color: var(--ds-ink);
}

.ds-logo__role {
  font-size: var(--ds-step--1);
  font-weight: 400;
  color: var(--ds-ink-faint);
}

.ds-footer .ds-logo__name { color: #fff; }
.ds-footer .ds-logo__role { color: rgba(255,255,255,.62); }

/* Floating pill header, the one strong borrowing from the reference. */
.ds-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: 0.75rem;
  background: color-mix(in srgb, var(--ds-bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}

@supports not (backdrop-filter: blur(4px)) {
  .ds-header { background: var(--ds-bg); }
}

.ds-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-pill);
  padding: 0.5rem 0.75rem 0.5rem 1.25rem;
  box-shadow: var(--ds-shadow);
}

.ds-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ds-nav a {
  display: inline-block;
  padding: 0.5em 0.95em;
  border-radius: var(--ds-radius-pill);
  color: var(--ds-ink-soft);
  font-size: var(--ds-step-0);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.ds-nav a:hover,
.ds-nav a[aria-current="page"] {
  background: var(--ds-accent-wash);
  color: var(--ds-accent-deep);
}

.ds-header .ds-btn { padding: 0.7em 1.3em; }

/* Flex items default to min-width:auto, which refuses to shrink below their
   content. That is what lets a long nav push the page wider than the screen. */
.ds-header__bar > * { min-width: 0; }

/* Below tablet the pill would crowd; the nav moves under the bar.
   The flex child here is the <nav>, not the <ul> inside it. */
@media (max-width: 860px) {
  .ds-header__bar {
    flex-wrap: wrap;
    border-radius: var(--ds-radius-lg);
    padding: 0.75rem 1rem;
  }
  .ds-header__bar > nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-top: 0.5rem;
    border-top: 1px solid var(--ds-line);
    /* fade the edge so a cut-off item reads as scrollable, not broken */
    -webkit-mask-image: linear-gradient(to left, #000 88%, transparent);
            mask-image: linear-gradient(to left, #000 88%, transparent);
  }
  .ds-header__bar > nav::-webkit-scrollbar { display: none; }
  .ds-nav { flex-wrap: nowrap; }
  .ds-nav a { white-space: nowrap; }
}

@media (max-width: 480px) {
  .ds-header .ds-btn { font-size: var(--ds-step--1); padding: 0.7em 1em; }
  .ds-logo__role { display: none; }
}

/* --------------------------------------------------------------------------
   11. Astra overrides — keep the theme out of the way
   -------------------------------------------------------------------------- */

.ast-container,
.site-content .ast-container { max-width: 100%; }

.ast-page-builder-template .site-content > .ast-container { padding: 0; max-width: none; }

/* Astra declares Inter by default; we never want that request or that look. */
.site-title,
.site-title a,
.ast-site-identity .site-title { font-family: var(--ds-font); }

/* This plugin renders its own header and footer. Astra's are hidden rather
   than removed, so deactivating the plugin restores a working theme header
   instead of leaving the site with no navigation at all. */
body .site-header,
body .ast-above-header,
body .ast-below-header,
body .site-footer,
body .ast-small-footer { display: none !important; }

/* Astra reserves space for its sticky header; without it the page starts
   flush under our own bar. */
.ast-main-header-wrap + .site-content,
.site-content { padding-top: 0; margin-top: 0; }

.site-header { background: transparent; }

.ast-single-post .entry-content,
.entry-content > * { max-width: none; }

/* Pages built from our sections run edge to edge and supply their own
   headings, so the theme's container padding and page title come off.
   The .ds-full class is added in PHP only when the content uses [ds_hero],
   which keeps ordinary posts and pages on Astra's normal layout. */
.ds-full .site-content > .ast-container,
.ds-full #primary,
.ds-full .ast-article-single,
.ds-full .entry-content {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
}

.ds-full .entry-header,
.ds-full .ast-archive-description,
.ds-full .entry-title,
.ds-full .ast-single-post-order { display: none; }

/* Astra wraps shortcode output in <p> when it sits alone in a paragraph;
   that empty paragraph adds stray vertical space between sections. */
.ds-full .entry-content > p:empty { display: none; }

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */

.ds-footer {
  background: var(--ds-cta);
  color: rgba(255,255,255,.72);
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem) 2rem;
}

.ds-footer h4 { color: #fff; font-size: var(--ds-step-0); margin-bottom: 0.9rem; }
.ds-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.ds-footer a:hover { color: #fff; text-decoration: underline; }

.ds-footer__grid {
  display: grid;
  gap: var(--ds-gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.ds-footer__base {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: var(--ds-step--1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   13. Mobile & tablet refinements
   Everything above is fluid already; these handle the cases fluidity can't.
   -------------------------------------------------------------------------- */

@media (max-width: 899px) {
  .ds-hero__grid { grid-template-columns: 1fr; }
  .ds-hero__media { aspect-ratio: 3 / 2; order: -1; }
  .ds-hero__title { line-height: 1.5; }
}

@media (max-width: 600px) {
  body { line-height: 1.85; }

  /* Full-width tap targets read better than side-by-side on a phone. */
  .ds-btn-row { gap: 0.7rem; }
  .ds-btn-row .ds-btn { width: 100%; justify-content: center; }

  .ds-footer__base { flex-direction: column; }
}

/* Comfortable minimum hit area on touch devices. */
@media (pointer: coarse) {
  .ds-btn,
  .wp-block-button__link,
  .ds-chips li,
  .ds-footer a { min-height: 44px; }

  .ds-btn,
  .wp-block-button__link { padding-block: 0.95em; }

  .ds-footer a { display: inline-flex; align-items: center; }
}

/* Hover lifts are meaningless on touch and cost a repaint. */
@media (hover: none) {
  .ds-card:hover,
  .ds-btn:hover,
  .wp-block-button__link:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   14. Print
   -------------------------------------------------------------------------- */

@media print {
  .ds-hero { background: none; }
  .ds-footer, .ds-btn-row { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.6; }
}
