/* ============================================================
   OBF Articles — cards, homepage strip, archive, single
   Uses OB Fetish design tokens (:root vars) with fallbacks.
   ============================================================ */

.obf-articles-strip,
.obf-articles-archive {
  --obf-card-bg: var(--bg-card, #22345a);
  --obf-surface: var(--bg-surface, #172440);
  --obf-accent: var(--accent-primary, #c8102e);
  --obf-accent-light: var(--accent-primary-light, #e8193e);
  --obf-text: var(--text-primary, #f5f5f5);
  --obf-text-dim: var(--text-secondary, #a0a0a0);
  --obf-border: var(--border-default, rgba(100,140,200,0.15));
}

/* ---- Homepage strip ---------------------------------------- */
.obf-articles-strip {
  max-width: 1320px;
  margin: 56px auto;
  padding: 0 24px;
}
.obf-articles-strip__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}
.obf-articles-strip__title {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--text-primary, #f5f5f5);
  margin: 0;
  text-transform: uppercase;
}
.obf-articles-strip__more {
  flex: none;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent-primary-light, #e8193e);
  text-decoration: none;
  transition: color .2s ease;
}
.obf-articles-strip__more:hover { color: var(--text-primary, #f5f5f5); }

.obf-articles-strip__grid,
.obf-articles-archive__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

/* ---- Card -------------------------------------------------- */
.obf-article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card, #22345a);
  border: 1px solid var(--border-default, rgba(100,140,200,0.15));
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.obf-article-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary, #c8102e);
  box-shadow: 0 14px 34px rgba(0,0,0,.45);
}
.obf-article-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-surface, #172440);
}
.obf-article-card__thumb.is-empty {
  background-image: linear-gradient(135deg, var(--bg-elevated, #1d2d4e), var(--bg-surface, #172440));
}
.obf-article-card__cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent-primary, #c8102e);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 4px 10px;
  border-radius: 4px;
}
.obf-article-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  flex: 1;
}
.obf-article-card__title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary, #f5f5f5);
  margin: 0;
}
.obf-article-card__excerpt {
  font-size: .9rem;
  line-height: 1.5;
  color: var(--text-secondary, #a0a0a0);
  margin: 0;
  flex: 1;
}
.obf-article-card__date {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted, #5a5a5a);
  margin-top: 4px;
}

/* ---- Archive ----------------------------------------------- */
.obf-articles-archive {
  max-width: 1320px;
  margin: 48px auto 72px;
  padding: 0 24px;
}
.obf-articles-archive__head { margin-bottom: 30px; }
.obf-articles-archive__title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-primary, #f5f5f5);
  margin: 0;
}
.obf-articles-archive__desc {
  margin-top: 10px;
  color: var(--text-secondary, #a0a0a0);
  max-width: 720px;
}
.obf-articles-archive__empty { color: var(--text-secondary, #a0a0a0); }
.obf-articles-archive__pagination { margin-top: 40px; }
.obf-articles-archive__pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 3px;
  border-radius: 6px;
  background: var(--bg-surface, #172440);
  color: var(--text-primary, #f5f5f5);
  text-decoration: none;
}
.obf-articles-archive__pagination .page-numbers.current { background: var(--accent-primary, #c8102e); color:#fff; }

/* ---- Single ------------------------------------------------ */
.obf-article-single {
  max-width: 1100px;
  margin: 48px auto 72px;
  padding: 0 32px;
  color: var(--text-primary, #f5f5f5);
}
.obf-article__cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.obf-article__cat {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #fff;
  background: var(--accent-primary, #c8102e);
  padding: 4px 11px;
  border-radius: 4px;
  text-decoration: none;
}
.obf-article__cat:hover { background: var(--accent-primary-dark, #8b0000); }
.obf-article__title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 14px;
}
.obf-article__meta { color: var(--text-muted, #5a5a5a); font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }
.obf-article__hero {
  display: block;
  position: relative;
  float: left;
  width: 320px;
  max-width: 100%;
  height: 400px;
  margin: 4px 32px 16px 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-surface, #172440);
  cursor: zoom-in;
}
.obf-article__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform .3s ease;
}
.obf-article__hero:hover img { transform: scale(1.04); }
.obf-article__hero-zoom {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

/* Ensure structural blocks always start fresh below the floated image,
   regardless of how much paragraph text preceded them. */
.obf-article__body h2,
.obf-article__body h3,
.obf-article__body blockquote,
.obf-article__body figure,
.obf-article__body .wp-block-embed,
.obf-article__body .wp-block-gallery {
  clear: both;
}

/* Lightbox overlay */
.obf-article__lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: #07090f;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.obf-article__lightbox.is-open {
  display: flex !important;
}
.obf-article__lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.obf-article__lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}
.obf-article__lightbox-close:hover { color: var(--accent-primary-light, #e8193e); }

@media (max-width: 600px) {
  .obf-article__hero {
    float: none;
    width: 100%;
    height: 240px;
    margin: 16px 0;
  }
}
.obf-article__body {
  font-size: 1.06rem;
  line-height: 1.75;
  color: #e6e6e6;
  max-width: 760px; /* keep line-length readable once text clears the floated image at this wider container */
}
.obf-article__body p { margin: 0 0 1.3em; }
.obf-article__body h2 { font-size: 1.7rem; font-weight: 800; margin: 1.6em 0 .5em; }
/* When an article's content opens with its own h2 (often duplicating the post title),
   render it as a smaller sub-heading instead of a second oversized title competing with
   the floated hero image. */
.obf-article__body > h1:first-child,
.obf-article__body > h2:first-child,
.obf-article__body > h3:first-child,
.obf-article__body > h4:first-child {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 .6em;
  color: var(--text-primary, #f5f5f5);
  line-height: 1.4;
}
.obf-article__body h3 { font-size: 1.35rem; font-weight: 700; margin: 1.4em 0 .5em; }
.obf-article__body a { color: var(--accent-primary-light, #e8193e); }
.obf-article__body img { max-width: 100%; height: auto; border-radius: 8px; }
.obf-article__body figure { margin: 1.6em 0; }
.obf-article__body iframe,
.obf-article__body .wp-block-embed iframe { max-width: 100%; }
.obf-article__body blockquote {
  border-left: 3px solid var(--accent-primary, #c8102e);
  padding-left: 18px;
  margin: 1.6em 0;
  color: var(--text-secondary, #a0a0a0);
  font-style: italic;
}
.obf-article__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default, rgba(100,140,200,0.15));
}
.obf-article__share-label { font-weight: 700; color: var(--text-secondary, #a0a0a0); }
.obf-article__share-x {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000;
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #2a2a2a;
  transition: background .2s ease, transform .2s ease;
}
.obf-article__share-x:hover { background: var(--accent-primary, #c8102e); border-color: var(--accent-primary, #c8102e); transform: translateY(-2px); }
.obf-article__share-x svg { display: block; }

@media (max-width: 600px) {
  .obf-articles-strip__grid,
  .obf-articles-archive__grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .obf-article-card__body { padding: 12px 13px 14px; }
  .obf-article-card__title { font-size: .98rem; }
  .obf-article-card__excerpt { display: none; }
}
