/* ============================================================
   layout-n/style.css — Breaking News Ticker Wire
   StorymMag Wire1-inspired: sticky ticker + featured grid
   ============================================================ */

/* ── TICKER BAR ──────────────────────────────────────────── */
.layout-n-ticker {
  height: 36px;
  background: var(--clr-bg-dark);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: sticky;
  top: 58px;
  z-index: 150;
  border-bottom: 1px solid var(--clr-border-dark);
}

.layout-n-ticker-label {
  background: var(--clr-accent);
  color: #fff;
  padding: 0 12px;
  height: 36px;
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  flex-shrink: 0;
  white-space: nowrap;
}

.layout-n-ticker-track {
  overflow: hidden;
  flex: 1;
  position: relative;
}

.layout-n-ticker-items {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: layout-n-scroll 20s linear infinite;
  padding-left: 24px;
}

/* Pause animation on hover for accessibility */
.layout-n-ticker:hover .layout-n-ticker-items {
  animation-play-state: paused;
}

@keyframes layout-n-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.layout-n-ticker-item {
  font-size: 13px;
  color: var(--clr-text-inv-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.layout-n-ticker-item::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--clr-accent);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.layout-n-ticker-item a {
  color: var(--clr-text-inv-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.layout-n-ticker-item a:hover { color: var(--clr-accent-light); }

/* ── FEATURED SECTION ────────────────────────────────────── */
.layout-n-featured-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-8) var(--space-5) 0;
}

.layout-n-featured {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 767px) {
  .layout-n-featured { grid-template-columns: 1fr; }
}

/* Large featured card (left 2/3) */
.layout-n-feat-main {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--clr-bg-alt);
}
.layout-n-feat-main-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--clr-bg-alt);
  display: block;
}
.layout-n-feat-main-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 65%;
  background: linear-gradient(to top, var(--clr-bg-dark) 0%, rgba(0,0,0,0.55) 50%, transparent 100%);
  pointer-events: none;
}
.layout-n-feat-main-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: var(--space-5) var(--space-5) var(--space-6);
}
.layout-n-feat-main-cat {
  display: inline-block;
  background: var(--clr-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-2);
}
.layout-n-feat-main-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.layout-n-feat-main-title:hover { color: var(--clr-accent-light); }
.layout-n-feat-main-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin-top: var(--space-2);
}

/* Right small card stack (right 1/3) */
.layout-n-feat-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.layout-n-feat-small {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--clr-bg-alt);
  flex: 1;
}
.layout-n-feat-small-img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
  background: var(--clr-bg-alt);
  display: block;
}
.layout-n-feat-small-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70%;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  pointer-events: none;
}
.layout-n-feat-small-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: var(--space-3) var(--space-3);
}
.layout-n-feat-small-cat {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--clr-accent);
  display: block;
  margin-bottom: 3px;
}
.layout-n-feat-small-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.layout-n-feat-small-title:hover { color: var(--clr-accent-light); }

/* ── SECTION DIVIDER BAR ──────────────────────────────────── */
.layout-n-section-bar {
  max-width: var(--container);
  margin: var(--space-8) auto 0;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.layout-n-section-bar-label {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 900;
  color: var(--clr-text);
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  border-left: 4px solid var(--clr-accent);
  padding-left: var(--space-3);
}
.layout-n-section-bar-line {
  flex: 1;
  height: 1px;
  background: var(--clr-border);
}
.layout-n-section-bar-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--clr-accent);
  white-space: nowrap;
  transition: opacity var(--transition);
}
.layout-n-section-bar-link:hover { opacity: .75; }

/* ── MAIN CONTENT + SIDEBAR GRID ─────────────────────────── */
.layout-n-main {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-8);
  max-width: var(--container);
  margin: var(--space-6) auto 0;
  padding: 0 var(--space-5);
  align-items: start;
}
@media (max-width: 899px) {
  .layout-n-main { grid-template-columns: 1fr; }
}

/* Article grid */
.layout-n-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 1024px) { .layout-n-articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .layout-n-articles-grid { grid-template-columns: 1fr; } }

/* Sidebar widgets */
.layout-n-sidebar { display: flex; flex-direction: column; gap: var(--space-5); }
.layout-n-widget {
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.layout-n-widget-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--clr-accent);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--clr-border);
}

/* ── ARTICLE PAGE (layout-n) ─────────────────────────────── */
.article-page { padding: var(--space-10) 0 var(--space-16); }
.article-h1 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 4.5vw, 46px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: var(--space-4) 0 var(--space-5);
  color: var(--clr-text);
}
.article-hero-img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-8);
  background: var(--clr-bg-alt);
}
.article-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 900px) {
  .article-layout-grid { grid-template-columns: 1fr 280px; }
}

/* Article inline styles */
.article-lead {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--clr-border);
}
.qa-box {
  background: var(--clr-accent-faint);
  border: 1px solid var(--clr-accent);
  border-left: 3px solid var(--clr-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.qa-box-label {
  display: inline-block;
  background: var(--clr-accent);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.blog-banner { margin: 20px 0; }
.blog-banner img {
  width: 100%;
  border-radius: var(--radius-md);
  display: block;
  max-height: 380px;
  object-fit: cover;
}
.related-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--clr-border);
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}
@media (min-width: 600px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }
.rel-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-decoration: none;
  display: block;
  transition: border-color .2s;
}
.rel-card:hover { border-color: var(--clr-accent); }
.rel-cat {
  font-size: 10px;
  color: var(--clr-accent);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
  text-transform: uppercase;
}
.rel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text);
  line-height: 1.45;
}

/* ── SECTION SPACING ─────────────────────────────────────── */
.section { padding: var(--space-12) 0; }
.bg-alt { background: var(--clr-bg-alt); }
