/* Public site (drsheeft.ir): what every page shares (type, buttons, header,
   footer) and the blog. The landing page adds landing.css. Hand-written, no
   build step. Colours follow the app's Tailwind `brand` scale. */

/* Two families: IRANSansX for everything, Gofteh for the h1 and h2 headings
   only (the owner's rule). Gofteh has no Medium: 500 is drawn with SemiBold. */
@font-face {
  font-family: 'IRANSansXFaNum';
  src: url('fonts/IRANSansXFaNum-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSansXFaNum';
  src: url('fonts/IRANSansXFaNum-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSansXFaNum';
  src: url('fonts/IRANSansXFaNum-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSansXFaNum';
  src: url('fonts/IRANSansXFaNum-Heavy.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: 'Gofteh';
  src: url('fonts/Gofteh-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Gofteh';
  src: url('fonts/Gofteh-SemiBold.woff2') format('woff2');
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: 'Gofteh';
  src: url('fonts/Gofteh-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Gofteh';
  src: url('fonts/Gofteh-Heavy.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

:root {
  --brand: #008e9b;
  --brand-dark: #007a85;
  --brand-deep: #00525a;
  --brand-soft: #e6f5f7;
  --brand-line: #c2e9ed;
  --ink: #0f172a;
  --body: #475569;
  --muted: #94a3b8;
  --line: #e7edf0;
  --tint: #f5f9fa;
  --radius: 20px;
  --font-display: 'Gofteh', system-ui, sans-serif;
  --font-text: 'IRANSansXFaNum', system-ui, sans-serif;
  /* Extra space between words, only where Gofteh is used; see the rule on `*` below. */
  --ws: normal;
}

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

/* Gofteh's own space is very narrow (0.11em), which runs Persian words into
   each other, so the h1 and h2 headings get extra word spacing. Set on every
   element (not inherited as a length) so it scales with the element's size. */
* {
  word-spacing: var(--ws);
}
h1,
h2 {
  --ws: 0.1em;
  font-family: var(--font-display);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

img {
  max-width: 100%;
}

svg {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 20px;
}
.container.narrow {
  max-width: 780px;
}
.center {
  text-align: center;
  justify-content: center;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active {
  transform: scale(0.98);
}
.btn-sm {
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 14px;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-dark);
}
.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: #fff;
}
.btn-ghost:hover {
  background: var(--tint);
}
.btn-light {
  background: #fff;
  color: var(--brand-deep);
}
.btn-light:hover {
  background: var(--brand-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}
.brand img {
  border-radius: 10px;
}
.main-nav {
  display: flex;
  gap: 28px;
}
.main-nav a,
.nav-blog {
  color: var(--body);
  font-size: 15px;
  font-weight: 500;
}
.main-nav a:hover,
.nav-blog:hover {
  color: var(--brand-dark);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-blog {
  display: none;
}

/* ── Sections ──────────────────────────────────────────────────────────── */

.section {
  padding-block: 76px;
}
.section.tight {
  padding-block: 48px 76px;
}
.section.tinted {
  background: var(--tint);
}
.section-head {
  max-width: 620px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 900;
}
.section-head p {
  margin-top: 10px;
  font-size: 16px;
}
.section-head.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: none;
  margin-bottom: 28px;
  text-align: start;
}
.more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}

/* ── Blog ──────────────────────────────────────────────────────────────── */

.page-head {
  padding-block: 56px 44px;
  background: radial-gradient(800px 320px at 15% 0%, var(--brand-soft), transparent 70%);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 900;
}
.page-head p {
  margin-top: 8px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s, transform 0.15s;
}
.post-card:hover {
  border-color: var(--brand-line);
  transform: translateY(-2px);
}
.post-cover {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--brand-soft);
}
.post-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, var(--brand-soft), #fff);
}
.post-cover-empty img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  opacity: 0.9;
}
.post-card-body {
  padding: 18px 20px 22px;
}
.post-meta {
  color: var(--muted);
  font-size: 13px;
}
.post-card h3 {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
}
.post-card h3 a {
  color: var(--ink);
}
.post-card h3 a:hover {
  color: var(--brand-dark);
}
.post-card p {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  font-size: 14.5px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}
.pager > :last-child {
  justify-self: end;
}
.pager > :first-child {
  justify-self: start;
}
.pager-info {
  color: var(--muted);
  font-size: 14px;
}

.empty {
  padding: 64px 24px;
  border: 1px dashed var(--brand-line);
  border-radius: 28px;
  background: var(--tint);
  text-align: center;
}
.empty h1,
.empty h2 {
  font-size: 22px;
  font-weight: 900;
}
.empty p {
  margin: 8px 0 24px;
}

.post {
  padding-block: 44px 72px;
}
.crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}
.post h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  line-height: 1.6;
}
.post > .container > .post-meta {
  margin-top: 10px;
}
.post-hero {
  display: block;
  width: 100%;
  margin-top: 28px;
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.prose {
  margin-top: 32px;
  color: #334155;
  font-size: 17px;
  line-height: 2.2;
  overflow-wrap: break-word;
}
.prose > * + * {
  margin-top: 1.1em;
}
.prose h2 {
  margin-top: 1.9em;
  font-size: 24px;
  font-weight: 900;
}
.prose h3 {
  margin-top: 1.6em;
  font-size: 20px;
  font-weight: 700;
}
.prose a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.prose ul,
.prose ol {
  padding-inline-start: 26px;
}
.prose li + li {
  margin-top: 0.35em;
}
.prose img {
  display: block;
  margin-inline: auto;
  border-radius: 18px;
}
.prose blockquote {
  margin-inline: 0;
  padding: 14px 22px;
  border-inline-start: 4px solid var(--brand);
  border-radius: 14px;
  background: var(--tint);
  color: var(--ink);
}
.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--tint);
  font-size: 0.9em;
  direction: ltr;
  unicode-bidi: embed;
}
.prose pre {
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--ink);
  color: #e2e8f0;
  direction: ltr;
  text-align: left;
  line-height: 1.8;
}
.prose pre code {
  padding: 0;
  background: none;
}
.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
}
.prose th,
.prose td {
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-align: start;
}
.prose th {
  background: var(--tint);
  color: var(--ink);
}
.prose hr {
  margin-block: 2em;
  border: 0;
  border-top: 1px solid var(--line);
}
.prose iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 18px;
}

.prose h4 {
  margin-top: 1.4em;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}
.prose mark {
  padding: 0 4px;
  border-radius: 4px;
  background: #fef3c7;
}
.prose figure {
  margin-inline: 0;
}
.prose figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.prose th p,
.prose td p {
  margin: 0;
}

/* Categories: the chips on the blog index and the label on a card. */
.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.cats a {
  padding: 5px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--body);
  font-size: 14px;
  font-weight: 500;
}
.cats a:hover,
.cats a.on {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.post-cat {
  color: var(--brand-dark);
  font-weight: 700;
}

/* Job ads (drsheeft.ir/ads/). */
.ad-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 22px;
}
.ad-filter label {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.ad-filter select {
  min-width: 180px;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.ad-filter select:disabled {
  color: var(--muted);
}
.ad-filter .btn {
  height: 42px;
}
.ad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ad-card {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s, transform 0.15s;
}
.ad-card:hover {
  border-color: var(--brand-line);
  transform: translateY(-2px);
}
.ad-card.urgent {
  border-color: #fcd34d;
}
.ad-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
}
.ad-role {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
}
.ad-urgent {
  padding: 3px 12px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}
.ad-date {
  margin-inline-start: auto;
  color: var(--muted);
}
.ad-card h3 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ad-card h3 a {
  color: var(--ink);
}
.ad-card h3 a:hover {
  color: var(--brand-dark);
}
.ad-where {
  margin-top: 4px;
  color: var(--body);
  font-size: 13px;
}
.ad-text {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--body);
  font-size: 13.5px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.ad-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}
.ad-actions .more-link {
  font-size: 13.5px;
}
.ad-detail h1 {
  margin-top: 8px;
}
.ad-detail .ad-where {
  margin-top: 10px;
  font-size: 16px;
}
.ad-body {
  margin-top: 24px;
}
.ad-call {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding: 26px 28px;
  border: 1px solid var(--brand-line);
  border-radius: 24px;
  background: var(--brand-soft);
}
.ad-call h2 {
  font-size: 16px;
  font-weight: 700;
}
.ad-phone {
  margin-top: 4px;
  color: var(--brand-deep);
  font-size: 24px;
  font-weight: 900;
  text-align: start;
}

.ad-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ad-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ad-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1.5px solid var(--brand);
  border-radius: 12px;
  background: #fff;
  color: var(--brand-deep);
  font-size: 14px;
  font-weight: 500;
}
.ad-channel b {
  font-weight: 700;
}
.ad-channel-phone {
  background: var(--brand);
  color: #fff;
}
.ad-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.ad-tags span {
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--body);
  font-size: 12px;
}
.ad-type {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--body);
}
.ad-nocontact,
.ad-note {
  color: var(--muted);
  font-size: 14px;
}
.ad-features-title {
  margin-top: 28px;
  font-size: 18px;
  font-weight: 700;
}
.ad-map-box {
  margin-top: 32px;
}
.ad-map-box h2 {
  font-size: 18px;
  font-weight: 700;
}
.ad-map {
  height: 280px;
  margin: 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

/* Sign-in dialog for the contacts (ads/_login.html, ads.js). */
.ads-login[hidden] {
  display: none;
}
.ads-login {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(15, 23, 42, 0.45);
}
.ads-login-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 28px 24px 24px;
  border-radius: 28px 28px 0 0;
  background: #fff;
}
.ads-login-close {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--tint);
  color: var(--body);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.ads-login-box h2 {
  font-size: 20px;
  font-weight: 900;
}
.ads-login-box p {
  margin-top: 10px;
  font-size: 15px;
}
.ads-login-error {
  padding: 10px 14px;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
}
.ads-login-box form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.ads-login-box label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.ads-login-box input {
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  font: inherit;
  font-size: 18px;
  letter-spacing: 0.08em;
}
.ads-login-box input:focus {
  border-color: var(--brand);
  outline: none;
}
.ads-login-box .btn {
  width: 100%;
}
.ads-login-box [data-step='register'] .btn {
  margin-top: 12px;
}
body.has-dialog {
  overflow: hidden;
}
@media (min-width: 560px) {
  .ads-login {
    align-items: center;
    padding: 24px;
  }
  .ads-login-box {
    border-radius: 28px;
  }
}

/* Questions under a post. */
.post-faq {
  margin-top: 48px;
}
.post-faq h2 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 900;
}
.post-faq-list {
  display: grid;
  gap: 12px;
}
.post-faq-list details {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.post-faq-list details[open] {
  border-color: var(--brand-line);
}
.post-faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  color: var(--ink);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.post-faq-list summary::-webkit-details-marker {
  display: none;
}
.post-faq-list summary::after {
  content: '';
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-inline-start: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg) translateY(-2px);
}
.post-faq-list details[open] summary::after {
  transform: rotate(135deg);
}
.post-faq-list details p {
  padding: 0 20px 18px;
  font-size: 15px;
}

.post-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 52px;
  padding: 26px 28px;
  border: 1px solid var(--brand-line);
  border-radius: 24px;
  background: var(--brand-soft);
}
.post-cta h2 {
  font-size: 19px;
  font-weight: 900;
}
.post-cta p {
  margin-top: 4px;
  font-size: 15px;
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-block: 44px 28px;
}
.footer-brand p {
  max-width: 380px;
  margin-top: 12px;
  font-size: 14.5px;
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  align-content: start;
  gap: 8px 40px;
  font-size: 14.5px;
}
.footer-nav a {
  color: var(--body);
}
.footer-nav a:hover {
  color: var(--brand-dark);
}
.footer-note {
  padding-block: 18px 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* ── Smaller screens ───────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .post-grid,
  .ad-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
  }
  .nav-blog {
    display: inline;
  }
  .section {
    padding-block: 56px;
  }
  .post-grid {
    grid-template-columns: 1fr;
  }
  .post-cta,
  .ad-call {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 24px;
  }
  .ad-grid {
    grid-template-columns: 1fr;
  }
  .ad-detail-more .ad-grid {
    grid-template-columns: 1fr;
  }
  .footer-row {
    flex-direction: column;
    gap: 24px;
  }
  .section-head.row {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .hero-actions .btn {
    flex: 1 1 100%;
  }
  .pager {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .pager > :first-child,
  .pager > :last-child {
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .post-card {
    transition: none;
  }
}
