/**
 * Single post â€” article reading experience (presentation only).
 * Scoped to body.single-post â€” does not affect archives, homepage, or CPTs.
 *
 * @package aldoctorz-theme
 */

/* --------------------------------------------------------------------------
   Reading column
   -------------------------------------------------------------------------- */

body.single-post .alz-single-post__wrap {
  background: #fff;
}


/* --------------------------------------------------------------------------
     Base typography
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content {
  color: #334155;
  font-size: 1.125rem;
  line-height: 1.78;
  letter-spacing: 0.01em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

body.single-post .alz-single-post__content>*:first-child {
  margin-top: 0;
}

body.single-post .alz-single-post__content>*:last-child {
  margin-bottom: 0;
}

body.single-post .alz-single-post__content p {
  margin: 0 0 1.35em;
  text-align: start;
}

body.single-post .alz-single-post__content strong,
body.single-post .alz-single-post__content b {
  color: var(--featured-primary, #0a305e);
  font-weight: 700;
}

body.single-post .alz-single-post__content em,
body.single-post .alz-single-post__content i:not([class*="fa-"]) {
  font-style: italic;
}

/* --------------------------------------------------------------------------
     Headings (TOC-ready scroll margin + hierarchy)
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content :is(h2, h3, h4) {
  color: var(--featured-primary, #0a305e);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: 96px;
}

body.single-post .alz-single-post__content h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  margin: 2.4em 0 0.85em;
  padding-bottom: 0.45em;
  border-bottom: 2px solid rgba(52, 195, 219, 0.35);
}

body.single-post .alz-single-post__content h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin: 1.85em 0 0.65em;
}

body.single-post .alz-single-post__content h4 {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  margin: 1.5em 0 0.5em;
  font-weight: 700;
  color: var(--featured-secondary, #3f4079);
}

/* Editors sometimes nest H3 inside list items */
body.single-post .alz-single-post__content li> :is(h2, h3, h4) {
  margin-top: 0;
  margin-bottom: 0.35em;
}

body.single-post .alz-single-post__content li>h3 {
  font-size: 1.2rem;
}

/* --------------------------------------------------------------------------
     Links
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content a {
  color: var(--featured-primary, #0a305e);
  text-decoration: underline;
  text-decoration-color: rgba(52, 195, 219, 0.55);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

body.single-post .alz-single-post__content a:hover,
body.single-post .alz-single-post__content a:focus {
  color: var(--featured-accent, #34c3db);
  text-decoration-color: var(--featured-accent, #34c3db);
}

/* --------------------------------------------------------------------------
     Lists
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content :is(ul, ol) {
  margin: 0 0 1.5em;
  padding-inline-start: 1.35em;
}

body.single-post .alz-single-post__content ul {
  list-style-type: disc;
}

body.single-post .alz-single-post__content ol {
  list-style-type: decimal;
}

body.single-post .alz-single-post__content li {
  margin-bottom: 0.65em;
  padding-inline-start: 0.25em;
}

body.single-post .alz-single-post__content li>ul,
body.single-post .alz-single-post__content li>ol {
  margin-top: 0.5em;
  margin-bottom: 0.35em;
}

/* --------------------------------------------------------------------------
     Blockquotes
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content blockquote,
body.single-post .alz-single-post__content .wp-block-quote,
body.single-post .alz-single-post__content .wp-block-pullquote {
  margin: 2em 0;
  padding: 1.25rem 1.5rem;
  border-inline-start: 4px solid var(--featured-accent, #34c3db);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(52, 195, 219, 0.08) 100%);
  color: var(--featured-primary, #0a305e);
  font-size: 1.0625rem;
  line-height: 1.7;
}

body.single-post .alz-single-post__content blockquote p:last-child,
body.single-post .alz-single-post__content .wp-block-quote p:last-child {
  margin-bottom: 0;
}

body.single-post .alz-single-post__content cite,
body.single-post .alz-single-post__content .wp-block-quote cite {
  display: block;
  margin-top: 0.75em;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--featured-gray, #64748b);
}

[dir="rtl"] body.single-post .alz-single-post__content blockquote,
[dir="rtl"] body.single-post .alz-single-post__content .wp-block-quote,
[dir="rtl"] body.single-post .alz-single-post__content .wp-block-pullquote {
  border-radius: 12px 0 0 12px;
}

/* --------------------------------------------------------------------------
     Images & figures
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(10, 48, 94, 0.1);
}

body.single-post .alz-single-post__content p>img,
body.single-post .alz-single-post__content figure {
  margin: 2em 0;
}

body.single-post .alz-single-post__content figure img {
  margin: 0;
}

body.single-post .alz-single-post__content .aligncenter,
body.single-post .alz-single-post__content .wp-block-image.aligncenter {
  display: block;
  margin-inline: auto;
}

body.single-post .alz-single-post__content .alignleft {
  float: inline-start;
  margin: 0.25em 1.25em 1em 0;
}

body.single-post .alz-single-post__content .alignright {
  float: inline-end;
  margin: 0.25em 0 1em 1.25em;
}

body.single-post .alz-single-post__content figcaption,
body.single-post .alz-single-post__content .wp-caption-text {
  margin-top: 0.65em;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--featured-gray, #64748b);
  text-align: center;
}

body.single-post .alz-single-post__content .wp-caption {
  max-width: 100%;
  margin: 2em 0;
}

/* --------------------------------------------------------------------------
     Tables
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content .alz-table-scroll {
  margin: 2em 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(10, 48, 94, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(10, 48, 94, 0.06);
}

body.single-post .alz-single-post__content table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

body.single-post .alz-single-post__content table th,
body.single-post .alz-single-post__content table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(10, 48, 94, 0.1);
  text-align: start;
  vertical-align: top;
}

body.single-post .alz-single-post__content table th {
  background: var(--featured-primary, #0a305e);
  color: #fff;
  font-weight: 700;
}

body.single-post .alz-single-post__content table tbody tr:nth-child(even) {
  background: var(--featured-light, #f8fafc);
}

body.single-post .alz-single-post__content table tbody tr:last-child td {
  border-bottom: 0;
}

/* Bare tables without wrapper still scroll on small screens */
@media (max-width: 767.98px) {
  body.single-post .alz-single-post__content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(10, 48, 94, 0.1);
    border-radius: 12px;
  }
}

/* --------------------------------------------------------------------------
     Embedded media
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content :is(iframe, embed, video) {
  max-width: 100%;
  border: 0;
  border-radius: 12px;
}

body.single-post .alz-single-post__content .wp-block-embed,
body.single-post .alz-single-post__content .wp-block-video {
  margin: 2em 0;
}

body.single-post .alz-single-post__content .wp-block-embed__wrapper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(10, 48, 94, 0.1);
}

body.single-post .alz-single-post__content .wp-block-embed iframe {
  width: 100%;
}

/* --------------------------------------------------------------------------
     Code
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content pre {
  margin: 1.75em 0;
  padding: 1rem 1.25rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

body.single-post .alz-single-post__content code {
  padding: 0.15em 0.4em;
  background: rgba(10, 48, 94, 0.06);
  border-radius: 4px;
  font-size: 0.9em;
}

body.single-post .alz-single-post__content pre code {
  padding: 0;
  background: transparent;
}

/* --------------------------------------------------------------------------
     Gutenberg blocks
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content .wp-block-button__link {
  background: var(--featured-primary, #0a305e);
  border-radius: 999px;
  padding: 0.65em 1.35em;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

body.single-post .alz-single-post__content .wp-block-button__link:hover {
  background: var(--featured-accent, #34c3db);
  color: #fff;
}

body.single-post .alz-single-post__content .wp-block-columns {
  gap: 1.5rem;
  margin-bottom: 1.5em;
}

body.single-post .alz-single-post__content .wp-block-file {
  margin: 1.5em 0;
}

body.single-post .alz-single-post__content .wp-block-separator {
  margin: 2.5em auto;
  border-color: rgba(10, 48, 94, 0.12);
}

/* --------------------------------------------------------------------------
     Pagination within post
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__content .page-links {
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid rgba(10, 48, 94, 0.1);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--featured-primary, #0a305e);
}

/* --------------------------------------------------------------------------
     Entry footer (categories/tags â€” light touch, same page only)
     -------------------------------------------------------------------------- */

body.single-post .alz-single-post__footer {
  max-width: 720px;
  margin-top: 32px;
  padding-bottom: 24px;
  font-size: 0.875rem;
  color: var(--featured-gray, #64748b);
}

body.single-post .alz-single-post__footer a {
  color: var(--featured-primary, #0a305e);
  text-decoration: none;
}

body.single-post .alz-single-post__footer a:hover {
  color: var(--featured-accent, #34c3db);
}

@media (min-width: 768px) {
  body.single-post .alz-single-post__footer {
    padding-bottom: 32px;
  }
}

/* Clear floats from aligned images */
body.single-post .alz-single-post__content::after {
  content: "";
  display: table;
  clear: both;
}