/*
 * ZiarMedical — single.css
 * Pagina articol single (Medium-style, max 720px)
 */

/* ═══════════════════════════════════════════════
   ARTICLE LAYOUT
   ═══════════════════════════════════════════════ */

.zm-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 60px;
}

/* HEAD */
.zm-article-head {
  margin-bottom: 32px;
}

.zm-article-cat {
  display: inline-block;
  font-family: var(--zm-font-h);
  font-size: var(--zm-fs-meta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  background: var(--zm-red);
  padding: 5px 12px;
  border-radius: var(--zm-r-pill);
  margin-bottom: 18px;
  text-decoration: none;
}

.zm-article h1 {
  font-family: var(--zm-font-h);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 18px;
  color: var(--zm-t1);
}

.zm-article-sub {
  font-size: var(--zm-fs-xl);
  color: var(--zm-t2);
  line-height: 1.55;
  margin-bottom: 28px;
  font-weight: 500;
}

.zm-article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--zm-bd);
  margin-bottom: 28px;
}

.zm-article-meta-author {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.zm-article-meta-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--zm-ac-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--zm-font-h);
  font-size: var(--zm-fs-sm);
  font-weight: 800;
  color: #fff;
}

.zm-article-meta-info {
  display: flex;
  flex-direction: column;
}

.zm-article-meta-name {
  font-family: var(--zm-font-h);
  font-size: var(--zm-fs-sm);
  font-weight: 700;
  color: var(--zm-t1);
}

.zm-article-meta-date {
  font-size: var(--zm-fs-meta);
  color: var(--zm-t3);
}

.zm-article-meta-extra {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.zm-article-meta-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--zm-fs-sm);
  color: var(--zm-t3);
}

/* FEATURED IMAGE */
.zm-article-featured {
  margin-bottom: 32px;
}

.zm-article-featured img {
  width: 100%;
  height: auto;
  border-radius: var(--zm-r-lg);
  display: block;
}

.zm-article-featured-caption {
  font-size: var(--zm-fs-sm);
  color: var(--zm-t3);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════
   BODY / CONTENT
   ═══════════════════════════════════════════════ */

.zm-article-body {
  font-size: 19px;
  line-height: 1.85;
  color: var(--zm-t2);
}

.zm-article-body p {
  margin-bottom: 24px;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.zm-article-body h2 {
  font-family: var(--zm-font-h);
  font-size: 28px;
  font-weight: 800;
  color: var(--zm-t1);
  margin: 40px 0 18px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.zm-article-body h3 {
  font-family: var(--zm-font-h);
  font-size: 22px;
  font-weight: 800;
  color: var(--zm-t1);
  margin: 32px 0 14px;
  letter-spacing: -0.3px;
}

.zm-article-body blockquote {
  border-left: 4px solid var(--zm-ac);
  padding: 20px 24px;
  background: var(--zm-ac-light);
  border-radius: 0 var(--zm-r-md) var(--zm-r-md) 0;
  margin: 32px 0;
  font-style: italic;
  color: var(--zm-ac-dark);
  font-size: 21px;
  line-height: 1.5;
}


.zm-article-body strong {
  color: var(--zm-t1);
  font-weight: 700;
}

.zm-article-body a {
  color: var(--zm-ac);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.zm-article-body a:hover {
  color: var(--zm-ac-dark);
}

.zm-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--zm-r-md);
  margin: 24px 0;
}

.zm-article-body ul,
.zm-article-body ol {
  margin: 0 0 24px 24px;
  padding-left: 0;
}

.zm-article-body li {
  margin-bottom: 10px;
  font-size: inherit;
}

.zm-article-body figure {
  margin: 32px 0;
}

.zm-article-body figcaption {
  font-size: var(--zm-fs-sm);
  color: var(--zm-t3);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

.zm-article-body code {
  background: var(--zm-bg3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  color: var(--zm-ac);
}

.zm-article-body pre {
  background: var(--zm-bg3);
  padding: 20px;
  border-radius: var(--zm-r-md);
  overflow-x: auto;
  margin: 24px 0;
}

/* ═══════════════════════════════════════════════
   SAVE BUTTON
   ═══════════════════════════════════════════════ */

.zm-save-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.zm-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--zm-r-md);
  border: 2px solid var(--zm-ac);
  background: var(--zm-bg);
  color: var(--zm-ac);
  font-family: var(--zm-font-h);
  font-size: var(--zm-fs-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--zm-tr);
  min-height: 44px;
}

.zm-save-btn:hover {
  background: var(--zm-ac-light);
}

.zm-save-btn.is-saved {
  background: var(--zm-ac);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   SHARE BUTTONS GRID (8 platforms)
   ═══════════════════════════════════════════════ */

.zm-share {
  margin: 28px 0;
}

.zm-share-hd {
  font-family: var(--zm-font-h);
  font-size: var(--zm-fs-meta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--zm-t3);
  margin-bottom: 14px;
}

.zm-share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 500px) {
  .zm-share-grid { grid-template-columns: repeat(2, 1fr); }
}

.zm-share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: var(--zm-r-md);
  border: 1.5px solid var(--zm-bd);
  background: var(--zm-bg);
  cursor: pointer;
  transition: all var(--zm-tr);
  font-family: var(--zm-font-h);
  text-decoration: none;
  min-height: 44px;
}

.zm-share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--zm-bd2);
}

.zm-share-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--zm-r-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.zm-share-label {
  font-size: var(--zm-fs-sm);
  font-weight: 600;
  color: var(--zm-t2);
}

/* Branduri share — culori native */
.zm-sh-whatsapp  { background: #E8FFF1; color: #25D366; }
.zm-sh-messenger { background: #EEF0FF; color: #0084FF; }
.zm-sh-facebook  { background: #EEF2FF; color: #1877F2; }
.zm-sh-twitter   { background: #F0F9FF; color: #1DA1F2; }
.zm-sh-telegram  { background: #EFF8FF; color: #26A5E4; }
.zm-sh-signal    { background: #F0FFF4; color: #3A76F0; }
.zm-sh-reddit    { background: #FFF4EE; color: #FF4500; }
.zm-sh-linkedin  { background: #EEF5FF; color: #0A66C2; }


/* ═══════════════════════════════════════════════
   VOTE BOX
   ═══════════════════════════════════════════════ */

.zm-vote-box {
  background: var(--zm-bg2);
  border: 1.5px solid var(--zm-bd);
  border-radius: var(--zm-r-lg);
  padding: 28px;
  margin: 36px 0;
}

.zm-vote-hd {
  font-family: var(--zm-font-h);
  font-size: var(--zm-fs-xl);
  font-weight: 800;
  color: var(--zm-t1);
  margin-bottom: 6px;
  text-align: center;
}

.zm-vote-sub {
  font-size: var(--zm-fs-base);
  color: var(--zm-t3);
  text-align: center;
  margin-bottom: 22px;
}

.zm-vote-opts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 500px) {
  .zm-vote-opts { grid-template-columns: repeat(2, 1fr); }
}

.zm-vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: var(--zm-r-md);
  border: 1.5px solid var(--zm-bd);
  background: var(--zm-bg);
  cursor: pointer;
  transition: all var(--zm-tr);
  font-family: var(--zm-font-h);
  min-height: 88px;
}

.zm-vote-btn:hover {
  border-color: var(--zm-ac);
  background: var(--zm-ac-light);
  transform: translateY(-2px);
}

.zm-vote-btn.is-voted {
  border-color: var(--zm-ac);
  background: var(--zm-ac);
}

.zm-vote-emoji { font-size: 26px; }

.zm-vote-label {
  font-size: var(--zm-fs-sm);
  font-weight: 700;
  color: var(--zm-t2);
}

.zm-vote-btn.is-voted .zm-vote-label { color: #fff; }

.zm-vote-count {
  font-size: var(--zm-fs-sm);
  color: var(--zm-t3);
  font-weight: 600;
}

.zm-vote-btn.is-voted .zm-vote-count { color: rgba(255, 255, 255, 0.85); }

/* ═══════════════════════════════════════════════
   AUTHOR CARD
   ═══════════════════════════════════════════════ */

.zm-author-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--zm-bg2);
  border: 1.5px solid var(--zm-bd);
  border-radius: var(--zm-r-lg);
  padding: 24px;
  margin: 32px 0;
}

@media (max-width: 500px) {
  .zm-author-card { flex-direction: column; text-align: center; align-items: center; }
}

.zm-author-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--zm-ac-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--zm-font-h);
  font-size: var(--zm-fs-2xl);
  font-weight: 800;
  color: var(--zm-ac);
  flex-shrink: 0;
  overflow: hidden;
}

.zm-author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zm-author-info {
  flex: 1;
}

.zm-author-name {
  font-family: var(--zm-font-h);
  font-size: var(--zm-fs-xl);
  font-weight: 800;
  color: var(--zm-t1);
  margin-bottom: 4px;
}

.zm-author-role {
  font-family: var(--zm-font-h);
  font-size: var(--zm-fs-sm);
  font-weight: 600;
  color: var(--zm-ac);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zm-author-bio {
  font-size: var(--zm-fs-base);
  color: var(--zm-t2);
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════
   RELATED POSTS
   ═══════════════════════════════════════════════ */

.zm-related {
  max-width: 1200px;
  margin: 60px auto 0;
  padding: 0 16px;
}

.zm-related-hd {
  font-family: var(--zm-font-h);
  font-size: var(--zm-fs-meta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--zm-ac);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--zm-ac);
}

.zm-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 600px) { .zm-related-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .zm-related-grid { grid-template-columns: 1fr 1fr 1fr; } }


/* ══════════════════════════════════════════════════════
   TEXT-WRAP — single post
   ══════════════════════════════════════════════════════ */
.zm-article h1,
.zm-article h2,
.zm-article h3,
.zm-article h4 { text-wrap: balance; }

.zm-article-body p,
.zm-article-body li { text-wrap: pretty; }

.zm-article-sub { text-wrap: pretty; }

/* ══════════════════════════════════════════════════════
   SPACING — single post mobile-first
   ══════════════════════════════════════════════════════ */
.zm-article { padding: 20px 16px 40px; }
@media (min-width: 640px)  { .zm-article { padding: 32px 20px 56px; } }
@media (min-width: 1024px) { .zm-article { padding: 48px 20px 72px; } }

.zm-article-head { margin-bottom: 24px; }
@media (min-width: 640px) { .zm-article-head { margin-bottom: 32px; } }

.zm-article-featured { margin-bottom: 24px; }
@media (min-width: 640px) { .zm-article-featured { margin-bottom: 32px; } }

.zm-related { margin-top: 48px; padding: 0 16px; }
@media (min-width: 640px)  { .zm-related { margin-top: 64px; padding: 0 20px; } }
@media (min-width: 1024px) { .zm-related { margin-top: 80px; } }

/* ══════════════════════════════════════════════════════
   WCAG 2.1 AA — single post
   ══════════════════════════════════════════════════════ */

/* Min reading time — touch target */
.zm-article-meta-time { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }

/* Save button touch target */
.zm-save-btn { min-height: 44px; min-width: 44px; }

/* Share buttons — touch targets */
.zm-share-btn { min-height: 48px; }

/* Vote buttons */
.zm-vote-btn { min-height: 48px; }

/* Focus visible article links */
.zm-article-cat:focus-visible,
.zm-save-btn:focus-visible,
.zm-article-body a:focus-visible {
  outline: 3px solid var(--zm-ac);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Line length articol — WCAG lecturabilitate */
.zm-article {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.zm-article-body {
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: 1.8;
  color: var(--zm-t1);
}

/* Heading hierarchy clară vizual */
.zm-article-body h2 { font-size: clamp(20px, 3vw, 26px); margin-top: 2em; margin-bottom: .6em; }
.zm-article-body h3 { font-size: clamp(18px, 2.5vw, 22px); margin-top: 1.75em; margin-bottom: .5em; }
.zm-article-body p  { margin-bottom: 1.25em; }
.zm-article-body ul,
.zm-article-body ol { margin-bottom: 1.25em; padding-left: 1.5em; }
.zm-article-body li { margin-bottom: .5em; }

/* Related articles section */
.zm-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px)  { .zm-related-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 900px)  { .zm-related-grid { grid-template-columns: repeat(3, 1fr); } }

.zm-related-hd {
  font-family: var(--zm-font-h);
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  color: var(--zm-t1);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--zm-bd);
  text-wrap: balance;
}


/* ══════════════════════════════════════════════════════
   SINGLE ARTICLE — MOBILE
   ══════════════════════════════════════════════════════ */

@media (max-width: 639px) {
  .zm-article { padding: 0; }

  .zm-article-head { padding: 20px 16px 0; }
  .zm-article-head h1 { font-size: clamp(22px, 6vw, 30px); line-height: 1.2; }
  .zm-article-sub { font-size: 15px; }

  .zm-article-featured { margin: 16px 0 0; border-radius: 0; }
  .zm-article-featured img { border-radius: 0; }

  .zm-article-body {
    padding: 20px 16px;
    font-size: 16px;
    line-height: 1.8;
  }
  .zm-article-body p { margin-bottom: 1.25em; }
  .zm-article-body h2 { font-size: 20px; margin: 1.5em 0 .6em; }
  .zm-article-body h3 { font-size: 17px; }

  .zm-save-wrap,
  .zm-share-wrap { padding: 0 16px; }

  .zm-author-card { margin: 20px 16px 0; }

  .zm-vote-box { margin: 20px 16px 0; }

  .zm-related { padding: 0 16px 40px; }
  .zm-related-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ══ WCAG font overrides — single.css v4.0.2 ══ */
.zm-article-body {
  font-size: 17px !important;
  line-height: 1.8;
}
.zm-article-body p {
  font-size: 17px !important;
  line-height: 1.8;
}
.zm-article-body h2 { font-size: 24px !important; }
.zm-article-body h3 { font-size: 20px !important; }
.zm-article-body h4 { font-size: 18px !important; }
.zm-article-cat    { font-size: 13px !important; }
.zm-article-meta-time { font-size: 14px !important; }
.zm-article-sub { font-size: 18px !important; line-height: 1.55; }
