/**
 * Ezee Credit — Single Post Template Styles
 *
 * Pairs with: single.php
 * Enqueue this file from the theme's functions.php on single posts only:
 *
 *   add_action('wp_enqueue_scripts', function() {
 *     if (is_single() && get_post_type() === 'post') {
 *       wp_enqueue_style('ezee-single-post',
 *         get_stylesheet_directory_uri() . '/css/ezee-single-post.css',
 *         array(), '1.0.0');
 *     }
 *   });
 *
 * Design system:
 *   Brand blue: #0055A5
 *   Brand navy (footer): #0D1B2A
 *   Body text: #1A1A1A
 *   Article max width: 740px
 *   Hero max width: 820px
 *
 * All class names prefixed `ez-` to avoid theme collisions.
 *
 * @version 1.0
 */

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --ez-brand-blue: #0055A5;
  --ez-brand-blue-dark: #003D78;
  --ez-brand-blue-light: #E8F1FA;
  --ez-text: #1A1A1A;
  --ez-text-muted: #5C6770;
  --ez-text-soft: #8A929C;
  --ez-surface: #F7F9FC;
  --ez-border: #E5E9F0;
  --ez-white: #FFFFFF;

  --ez-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --ez-font-serif: "Georgia", "Cambria", serif;

  --ez-max-content: 740px;
  --ez-max-wide: 1200px;
}

/* Replace --ez-font-sans with the site's actual brand font, e.g.:
   :root { --ez-font-sans: 'Open Sans', sans-serif; }
   Place this override AFTER this file in the cascade. */

/* ============================================
   SCROLL PROGRESS
   ============================================ */
.ez-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--ez-brand-blue);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.ez-breadcrumb-bar {
  background: var(--ez-surface);
  border-bottom: 1px solid var(--ez-border);
  padding: 14px 0;
  font-size: 13px;
  color: var(--ez-text-muted);
}
.ez-breadcrumb-inner {
  max-width: var(--ez-max-wide);
  margin: 0 auto;
  padding: 0 24px;
}
.ez-breadcrumb-bar a { color: var(--ez-brand-blue); font-weight: 500; text-decoration: none; }
.ez-breadcrumb-bar a:hover { text-decoration: underline; }
.ez-breadcrumb-bar .sep { color: var(--ez-text-soft); margin: 0 8px; }

/* ============================================
   ARTICLE HERO
   ============================================ */
.ez-article-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px 32px;
  text-align: center;
}
.ez-article-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--ez-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
  font-family: var(--ez-font-sans);
}
.ez-article-meta .sep { margin: 0 10px; color: var(--ez-text-soft); }
.ez-article-hero h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ez-text);
  margin: 0 auto 28px;
  max-width: 16ch;
  font-family: var(--ez-font-sans);
}
.ez-article-deck {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ez-text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  font-family: var(--ez-font-serif);
  font-style: italic;
}
.ez-featured-image-wrap {
  margin: 0 auto;
  max-width: 1000px;
  padding: 0 24px;
}
.ez-featured-image {
  border-radius: 16px;
  box-shadow: 0 18px 60px -20px rgba(13, 27, 42, 0.25);
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   ARTICLE BODY
   ============================================ */
.ez-article-body {
  max-width: var(--ez-max-content);
  margin: 0 auto;
  padding: 56px 24px 64px;
  font-size: 18px;
  line-height: 1.78;
  color: var(--ez-text);
  font-family: var(--ez-font-sans);
}
.ez-article-body p {
  font-size: 18px;
  line-height: 1.78;
  margin: 0 0 1.4em;
}
/* Lead paragraph: first paragraph after the hero gets larger treatment.
   Editor can also opt-in by adding class="lead" or wrapping the WordPress
   "Drop cap" toggle which outputs is-style-large. */
.ez-article-body > p:first-of-type,
.ez-article-body p.lead,
.ez-article-body p.is-style-large {
  font-size: 22px;
  line-height: 1.55;
  font-weight: 400;
  color: #2C3540;
  margin-bottom: 1.6em;
}

/* Refined H2 — editorial confident */
.ez-article-body h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ez-brand-blue);
  margin: 2.6em 0 0.4em;
}
.ez-article-body h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--ez-brand-blue);
  border-radius: 2px;
  margin-top: 18px;
}

.ez-article-body h3 {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ez-text);
  margin: 2em 0 0.4em;
}

.ez-article-body h4 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ez-text);
  margin: 1.6em 0 0.3em;
}

.ez-article-body a {
  color: var(--ez-brand-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  font-weight: 600;
  transition: all 0.15s;
}
.ez-article-body a:hover {
  color: var(--ez-brand-blue-dark);
  text-decoration-thickness: 2px;
}

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

.ez-article-body ul, .ez-article-body ol {
  margin: 0 0 1.6em;
  padding-left: 1.4em;
}
.ez-article-body ul li, .ez-article-body ol li {
  margin-bottom: 0.5em;
  line-height: 1.7;
  padding-left: 0.4em;
}
.ez-article-body ul li::marker {
  color: var(--ez-brand-blue);
  font-size: 1.2em;
}
.ez-article-body ol li::marker {
  color: var(--ez-brand-blue);
  font-weight: 700;
}

.ez-article-body blockquote {
  margin: 2em 0;
  padding: 1em 1.6em;
  border-left: 4px solid var(--ez-brand-blue);
  background: var(--ez-surface);
  font-family: var(--ez-font-serif);
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  color: #2C3540;
  border-radius: 0 10px 10px 0;
  line-height: 1.5;
}
.ez-article-body blockquote p:last-child { margin-bottom: 0; }
.ez-article-body blockquote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--ez-font-sans);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  color: var(--ez-text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ez-article-body img {
  border-radius: 12px;
  margin: 2em 0;
  box-shadow: 0 10px 30px -8px rgba(13, 27, 42, 0.15);
  max-width: 100%;
  height: auto;
}

.ez-article-body hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ez-border), transparent);
  margin: 3em 0;
}

/* Optional pull-quote stat block (use with .stat-callout class on a div) */
.ez-article-body .stat-callout {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin: 2.5em 0;
  padding: 28px 0;
  border-top: 1px solid var(--ez-border);
  border-bottom: 1px solid var(--ez-border);
}
.ez-article-body .stat-callout .stat-number {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ez-brand-blue);
  flex-shrink: 0;
}
.ez-article-body .stat-callout .stat-text {
  font-family: var(--ez-font-serif);
  font-size: 19px;
  font-style: italic;
  color: var(--ez-text);
  line-height: 1.4;
}

/* ============================================
   AUTHOR BIO
   ============================================ */
.ez-author-bio {
  max-width: var(--ez-max-content);
  margin: 24px auto 56px;
  padding: 0 24px;
}
.ez-author-bio-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 32px;
  background: var(--ez-white);
  border: 1px solid var(--ez-border);
  border-radius: 16px;
  position: relative;
}
.ez-author-bio-card::before {
  content: "";
  position: absolute;
  top: 0; left: 32px;
  width: 60px;
  height: 4px;
  background: var(--ez-brand-blue);
  border-radius: 0 0 4px 4px;
}
.ez-author-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid var(--ez-brand-blue);
  box-shadow: 0 4px 16px rgba(0,85,165,0.18);
  object-fit: cover;
}
.ez-author-info { flex: 1; min-width: 0; }
.ez-author-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ez-brand-blue);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ez-author-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ez-text);
  margin: 0 0 2px;
}
.ez-author-role {
  font-size: 14px;
  font-weight: 600;
  color: var(--ez-brand-blue);
  margin-bottom: 12px;
}
.ez-author-bio-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ez-text-muted);
  margin: 0 0 12px;
}
.ez-author-links {
  font-size: 13px;
  color: var(--ez-text-soft);
}
.ez-author-links a { color: var(--ez-brand-blue); font-weight: 600; text-decoration: none; }
.ez-author-links a:hover { text-decoration: underline; }
.ez-author-links .sep { margin: 0 8px; color: var(--ez-border); }

/* ============================================
   FAQ
   ============================================ */
.ez-article-faq {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.ez-faq-header {
  text-align: center;
  margin-bottom: 36px;
}
.ez-faq-header h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ez-text);
  margin: 0 0 10px;
}
.ez-faq-header p {
  font-size: 17px;
  color: var(--ez-text-muted);
  margin: 0;
}
.ez-faq-list { display: flex; flex-direction: column; gap: 8px; }
.ez-faq-item {
  border: 1px solid var(--ez-border);
  border-radius: 10px;
  background: var(--ez-white);
  overflow: hidden;
  transition: all 0.2s;
}
.ez-faq-item[open] {
  border-color: var(--ez-brand-blue);
  box-shadow: 0 4px 16px -4px rgba(0,85,165,0.12);
}
.ez-faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  color: var(--ez-text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color 0.15s;
}
.ez-faq-item summary::-webkit-details-marker { display: none; }
.ez-faq-item[open] summary { color: var(--ez-brand-blue); }
.ez-faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ez-brand-blue);
  font-size: 22px;
  transition: transform 0.2s;
  font-weight: 300;
}
.ez-faq-item[open] .ez-faq-icon { transform: rotate(45deg); }
.ez-faq-content {
  padding: 0 22px 22px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ez-text);
}
.ez-faq-content p { margin: 0; }

/* ============================================
   RELATED POSTS
   ============================================ */
.ez-related-posts {
  background: var(--ez-surface);
  border-top: 1px solid var(--ez-border);
  padding: 64px 24px 80px;
}
.ez-related-inner {
  max-width: var(--ez-max-wide);
  margin: 0 auto;
}
.ez-related-header {
  text-align: center;
  margin-bottom: 40px;
}
.ez-related-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ez-brand-blue);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.ez-related-header h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ez-text);
  margin: 0;
}
.ez-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.ez-related-card {
  background: var(--ez-white);
  border: 1px solid var(--ez-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.ez-related-card:hover {
  transform: translateY(-2px);
  border-color: var(--ez-brand-blue);
  box-shadow: 0 16px 40px -16px rgba(0,85,165,0.2);
}
.ez-related-card-image-link { display: block; }
.ez-related-card-image {
  aspect-ratio: 16 / 10;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.ez-related-card-image-fallback {
  background: linear-gradient(135deg, var(--ez-brand-blue) 0%, var(--ez-brand-blue-dark) 100%);
}
.ez-related-card-body {
  padding: 22px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ez-related-card-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ez-brand-blue);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ez-related-card h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ez-text);
  margin: 0 0 12px;
}
.ez-related-card h3 a { color: inherit; text-decoration: none; }
.ez-related-card h3 a:hover { color: var(--ez-brand-blue); }
.ez-related-card-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ez-text-muted);
  margin: 0 0 16px;
  flex: 1;
}
.ez-related-card-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--ez-brand-blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.ez-related-card-link::after {
  content: "→";
  transition: transform 0.2s;
}
.ez-related-card:hover .ez-related-card-link::after { transform: translateX(4px); }

/* ============================================
   PERSONAL CTA — A note from Marc
   ============================================ */
.ez-marc-cta {
  background: #0D1B2A;
  color: #FFFFFF;
  padding: 88px 24px 80px;
  position: relative;
  overflow: hidden;
}
.ez-marc-cta::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 4px;
  width: 240px;
  background: var(--ez-brand-blue);
}
.ez-marc-cta::after {
  /* Subtle radial glow in upper-left corner for atmosphere */
  content: "";
  position: absolute;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,85,165,0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.ez-marc-cta-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.ez-marc-quote-mark {
  display: block;
  font-family: var(--ez-font-serif);
  font-size: 140px;
  line-height: 0.6;
  color: var(--ez-brand-blue);
  font-weight: 800;
  margin: 0 0 -8px -10px;
  user-select: none;
}
.ez-marc-blockquote {
  margin: 0 0 28px;
  border: none;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.ez-marc-quote {
  font-family: var(--ez-font-serif);
  font-size: 28px;
  line-height: 1.45;
  font-weight: 400;
  font-style: italic;
  color: rgba(255,255,255,0.95);
  margin: 0;
  letter-spacing: -0.005em;
}
.ez-marc-attribution {
  font-family: var(--ez-font-sans);
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.4px;
  margin: 0 0 40px;
  padding-left: 4px;
}
.ez-marc-attribution .ez-marc-name {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #FFFFFF;
}
.ez-marc-cta-actions { padding-left: 4px; }
.ez-marc-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: #FFFFFF;
  color: var(--ez-brand-blue);
  border-radius: 999px;
  font-family: var(--ez-font-sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px -4px rgba(0,0,0,0.4);
}
.ez-marc-cta-button::after {
  content: "→";
  transition: transform 0.2s;
}
.ez-marc-cta-button:hover {
  background: var(--ez-brand-blue);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -6px rgba(0,85,165,0.5);
}
.ez-marc-cta-button:hover::after { transform: translateX(4px); }
.ez-marc-cta-fineprint {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  font-family: var(--ez-font-sans);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .ez-related-grid { grid-template-columns: 1fr; gap: 20px; }
  .ez-article-hero { padding: 40px 24px 24px; }
  .ez-author-bio-card { flex-direction: column; gap: 16px; padding: 24px; }
  .ez-author-photo { width: 72px; height: 72px; }
  .ez-article-body .stat-callout { flex-direction: column; gap: 8px; align-items: flex-start; }
  .ez-article-body .stat-callout .stat-number { font-size: 52px; }
}

@media (max-width: 600px) {
  .ez-article-body { font-size: 17px; }
  .ez-article-body p { font-size: 17px; }
  .ez-article-body > p:first-of-type,
  .ez-article-body p.lead { font-size: 19px; }
  .ez-marc-cta { padding: 56px 22px; }
  .ez-marc-quote { font-size: 22px; }
  .ez-marc-quote-mark { font-size: 96px; margin: 0 0 -4px -6px; }
  .ez-marc-attribution { margin-bottom: 28px; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .ez-scroll-progress,
  .ez-breadcrumb-bar,
  .ez-related-posts { display: none; }
  .ez-article-body { max-width: 100%; padding: 0; }
}
