/* ============================================================
   Elite Agent — Single Post CSS
   Single-column centered layout per article-page-wireframe.html.
   Mobile-first — desktop enhancements in responsive.css.
   ============================================================ */

/* ---- Layout variables ---- */
:root {
  --image-bleed: 820px;
}

/* === Article Layout Grid === */
.article-layout {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

/* === Sidebar === */
/* .article-sidebar visibility controlled in responsive.css (mobile: none, desktop: block) */

/* ---- Article header ---- */
.article-header {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 32px var(--side-padding) 0;
}

.article-header__pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.article-header__pills [class^="badge--"] {
  margin-bottom: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 2px;
}

.article-header__category {
  margin-bottom: 16px;
}

.article-header .category-label--filled {
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 2px;
}

.article-header__headline {
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--black);
  margin-bottom: 16px;
}

.article-header__subheadline {
  font-family: var(--font-body);
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
  color: var(--grey-600);
  margin-bottom: 24px;
}

/* ---- Byline with share buttons ---- */
.article-header__byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--grey-200);
  border-bottom: 1px solid var(--grey-200);
  font-size: 14px;
  color: var(--grey-600);
  margin-bottom: 0;
}

.byline__left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.byline__left a {
  font-weight: 600;
  color: #1a73e8;
  text-decoration: none;
}

.byline__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.byline__right .share-btn {
  width: 32px;
  height: 32px;
}

/* ---- TLDR box ---- */
.article-tldr-wrap {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

.article-tldr {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--grey-50);
  border-left: 3px solid var(--accent-primary);
}

.article-tldr__label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 4px;
}

.article-tldr p {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey-800);
  margin: 0;
}

/* ---- Audio player ---- */
.article-audio-wrap {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

/* ---- Article body (single column, centered) ---- */
.single-article .article-body {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 32px var(--side-padding);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  color: var(--black);
}

/* Paragraphs */
.single-article .article-body p {
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

/* Headings within articles */
.article-body h2 {
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin: 32px 0 12px;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.01em;
  margin: 28px 0 32px;
}

.article-body > h3:first-child {
  margin-top: 0;
}

.article-body h4 {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin: 24px 0 8px;
}

/* Lists within articles */
.article-body ul,
.article-body ol {
  margin: 0 0 20px 24px;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Images within article — full width at mobile, bleed at desktop */
.article-body img {
  margin: 24px 0;
}

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

/* Featured image inside body — wider than text */
.article-featured-media {
  margin: 0 0 24px;
}

.article-featured-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  margin: 0;
  max-height: 480px;
  object-fit: cover;
}

.article-featured-media .featured-caption {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--grey-600);
  font-style: italic;
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--grey-200);
}

.article-featured-media .featured-caption .credit {
  font-style: normal;
  font-weight: 600;
}

/* Video embed — injected after paragraph 1.
   FitVids (Yoast Video SEO) wraps the iframe in .fluid-width-video-wrapper
   at runtime with inline padding-top: 56.25% for 16:9 aspect ratio.
   We just provide the outer wrapper for spacing. */
.article-video-wrap {
  width: 100%;
  margin: 4px 0 0;
  margin-bottom: 64px;
}

.article-video-wrap iframe {
  margin: 0;
}

/* Tables within articles */
.article-body table {
  margin: 24px 0;
  border: 1px solid var(--grey-200);
}

.article-body th,
.article-body td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--grey-200);
  font-size: 15px;
}

.article-body th {
  font-family: var(--font-ui);
  font-weight: 600;
  background: var(--grey-50);
}

/* Embedded video */
.article-body iframe,
.article-body .wp-block-embed {
  margin: 24px 0;
  max-width: 100%;
}

.article-body .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.article-body .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

/* ---- Source attribution ---- */
.article-source-wrap {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

.article-source {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--grey-400);
  padding: 12px 0;
  border-top: 1px solid var(--grey-200);
}

/* ---- Newsletter CTA ---- */
.article-newsletter-cta {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 16px var(--side-padding);
}

.article-newsletter-cta a {
  color: var(--accent-primary, #e03e36);
  text-decoration: underline;
}

/* ---- Share bar (end of article) ---- */
.single-article .share-buttons {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 16px var(--side-padding);
  border-top: 1px solid var(--grey-200);
  border-bottom: 1px solid var(--grey-200);
}

/* ---- Article tags (wireframe style) ---- */
.article-tags {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 16px var(--side-padding) 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.article-tags__label {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--black);
}

.article-tags__tag {
  font-family: var(--font-ui);
  font-size: 13px;
  color: #1a73e8;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid var(--grey-200);
  border-radius: 3px;
  transition: background var(--speed-fast) var(--ease);
}

.article-tags__tag:hover {
  background: var(--grey-50);
  color: #1a73e8;
}

/* ---- Author bio (wireframe style) ---- */
.author-box {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 32px var(--side-padding);
  border-top: 1px solid var(--grey-200);
}

.author-box__name {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.author-box__name a {
  color: #1a73e8;
  text-decoration: none;
}

.author-box__name a:hover {
  color: var(--accent-primary);
}

.author-box__bio {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey-600);
  margin-bottom: 0;
}

/* ---- House event ad ---- */
.article-house-event {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 24px var(--side-padding);
  text-align: center;
}

.article-house-event .adplugg-tag {
  display: inline-block;
}

/* ---- Leaderboard ad above/below article ---- */
.article-leaderboard {
  text-align: center;
  padding: 16px var(--side-padding);
  overflow: hidden;
}

/* ---- Infinite scroll divider ---- */
.infinite-scroll-divider {
  max-width: var(--content-width);
  margin: 48px auto;
  padding: 0 var(--side-padding);
  text-align: center;
}

.infinite-scroll-divider__line {
  height: 3px;
  background: var(--black);
  margin-bottom: 24px;
}

.infinite-scroll-divider__text,
.infinite-scroll-divider__label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--grey-400);
}

.infinite-scroll-divider__title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
  margin-top: 12px;
  line-height: 1.3;
}

@media (max-width: 767px) {
  .infinite-scroll-divider__title {
    font-size: 16px;
  }
}

.infinite-scroll-trigger {
  height: 1px;
  margin-top: 24px;
}

/* ---- In-article ad zones (used by ad injection filter) ---- */
.ad-in-article {
  clear: both;
  text-align: center;
  padding: 24px 0;
  margin: 8px 0;
  border-top: 1px solid var(--grey-100);
  border-bottom: 1px solid var(--grey-100);
}

.ad-interscroller {
  clear: both;
  margin: 32px 0;
  position: relative;
}

.ad-interscroller .adplugg-tag {
  width: 100%;
}

.ad-interscroller .adplugg-tag iframe,
.ad-interscroller .adplugg-tag img {
  display: block;
  width: 100%;
  height: auto;
}

/* In-content MRECs: centred block on mobile, JS relocates to sidebar on desktop */
.ad-mrec-float,
.ad-mrec-centered {
  float: none;
  width: 300px;
  max-width: 100%;
  margin: 36px auto;
  text-align: center;
  clear: both;
}

.ad-mrec-float .adplugg-tag {
  width: 300px;
  max-width: 100%;
}

/* sidebar-mrec-slot base: hidden on mobile, shown in responsive.css desktop block */

/* ---- More in [Category] — card grid ---- */
.more-in-category {
  padding: 24px 0 0;
  border-top: 2px solid var(--black);
}

.more-in-category__heading {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  color: var(--black);
}

.more-in-category__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.more-in-category__card {
  text-decoration: none;
  color: var(--black);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.more-in-category__card:hover .more-in-category__title {
  color: #1a73e8;
}

.more-in-category__thumb {
  aspect-ratio: 3/2;
  overflow: hidden;
  border-radius: 2px;
}

.more-in-category__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.more-in-category__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.more-in-category__list-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: var(--black);
}

.more-in-category__list-link:hover span {
  color: #1a73e8;
}

.more-in-category__list-link span {
  display: block;
  max-width: 170px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.more-in-category__list-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.more-in-category__list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--grey-200);
}

/* Inline version wrapper */
.more-in-category--inline {
  max-width: var(--article-width);
  margin: 40px auto 0;
}

/* More In Category — sidebar list version */
.article-sidebar .more-in-category {
  padding: 24px 0 0;
  border-top: 2px solid var(--black);
}

.article-sidebar .more-in-category__heading {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--black);
}

.article-sidebar .more-in-category__list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--grey-200);
}

.article-sidebar .more-in-category__list-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: var(--black);
}

.article-sidebar .more-in-category__list-link:hover span {
  color: #1a73e8;
}

.article-sidebar .more-in-category__list-link span {
  display: block;
  max-width: 170px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.article-sidebar .more-in-category__list-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---- Gallery ---- */
.article-gallery__slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0;
}

.article-gallery__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin: 0;
}

.article-gallery__slide img {
  width: 100%;
  height: auto;
  display: block;
}

.article-gallery__slide figcaption {
  padding: 8px 0;
  font-size: 13px;
  color: var(--grey-600);
}
