/*
Theme Name: sp_theme
Theme URI: https://example.com/sp_theme
Author: KDPR / Promofy
Description: Modern, dynamic, high-performance newspaper & magazine WordPress theme with full WP-Admin Customizer controls, responsive layouts, dark mode, breaking news ticker, and monetization ad slots.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: sp_theme
*/

/* -------------------------------------------------------------
 * 1. CSS Variables & Design System Tokens
 * ------------------------------------------------------------- */
:root {
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #0f172a;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-card: #ffffff;
  --surface-dark: #0f172a;
  --accent: #a20d14;
  --accent-hover: #800a10;
  --accent-soft: rgba(162, 13, 20, 0.08);
  --success: #10b981;
  --max: 1240px;
  --radius-sm: 3px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.09);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --ink: #f1f5f9;
  --ink-soft: #cbd5e1;
  --muted: #94a3b8;
  --muted-light: #64748b;
  --line: #334155;
  --line-strong: #64748b;
  --surface: #0f172a;
  --surface-alt: #1e293b;
  --surface-card: #1e293b;
  --surface-dark: #020617;
  --accent: #ef4444;
  --accent-hover: #f87171;
  --accent-soft: rgba(239, 68, 68, 0.15);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.35);
}

/* -------------------------------------------------------------
 * 2. Reset & Base Styles
 * ------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--surface);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

body.nav-locked, body.search-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-top: 0;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.5rem;
  margin: 0 0 1rem;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

.wrap {
  width: min(calc(100% - 36px), var(--max));
  margin-left: auto;
  margin-right: auto;
}

/* Screen reader text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* -------------------------------------------------------------
 * 3. Reading Progress Bar
 * ------------------------------------------------------------- */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  background: transparent;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s ease-out;
}

/* -------------------------------------------------------------
 * 4. Header & Top Bar Strip
 * ------------------------------------------------------------- */
.top-strip {
  border-bottom: 1px solid var(--line);
  background-color: var(--surface-alt);
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
}

.top-strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.top-strip-left, .top-strip-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-strip-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.top-strip-info {
  display: inline-block;
}

.top-strip-socials {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: var(--transition);
}

.social-icon:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 4px 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

[data-theme="light"] .theme-icon-sun,
[data-theme="dark"] .theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-icon-moon,
[data-theme="dark"] .theme-icon-sun {
  display: inline-flex;
}

/* Masthead Header */
.masthead {
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--line);
  background-color: var(--surface);
}

.masthead-centered {
  text-align: center;
}

.masthead-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 58px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -2px;
  margin: 0;
}

.brand-title span {
  color: var(--accent);
}

.tagline {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
}

.site-logo img {
  max-height: 80px;
  width: auto;
  margin: 0 auto;
}

/* -------------------------------------------------------------
 * 5. Navigation Bar
 * ------------------------------------------------------------- */
.nav-wrap {
  border-top: 1px solid var(--line);
  border-bottom: 3px solid var(--line-strong);
  background-color: var(--surface);
  transition: var(--transition);
}

.nav-wrap.is-sticky {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.primary-nav-container {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.primary-nav-container::-webkit-scrollbar {
  display: none;
}

.nav-menu-list {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  white-space: nowrap;
}

.nav-menu-list li {
  position: relative;
}

.nav-menu-list a {
  display: block;
  padding: 13px 2px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink);
  position: relative;
}

.nav-menu-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--accent);
  transition: width 0.2s ease;
}

.nav-menu-list a:hover::after,
.nav-menu-list .current-menu-item > a::after {
  width: 100%;
}

.nav-menu-list a:hover,
.nav-menu-list .current-menu-item > a {
  color: var(--accent);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 10px 4px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--ink);
  transition: var(--transition);
}

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

.nav-action-btn {
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.nav-action-btn:hover {
  color: var(--accent);
  background-color: var(--surface-alt);
}

/* -------------------------------------------------------------
 * 6. Breaking News Ticker Strip
 * ------------------------------------------------------------- */
.breaking-strip {
  border-bottom: 1px solid var(--line);
  background-color: var(--surface-alt);
  font-size: 13px;
  padding: 8px 0;
}

.breaking-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.breaking-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--accent);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.live-dot {
  width: 7px;
  height: 7px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
  100% { opacity: 1; transform: scale(1); }
}

.breaking-ticker-items {
  flex: 1;
  position: relative;
  height: 22px;
  overflow: hidden;
}

.ticker-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s ease;
  pointer-events: none;
}

.ticker-item.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ticker-item a {
  font-weight: 600;
  color: var(--ink);
}

.ticker-item a:hover {
  color: var(--accent);
}

/* -------------------------------------------------------------
 * 7. Category Badges & Meta
 * ------------------------------------------------------------- */
.cat-badge {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.cat-badge:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
}

.cat-kicker, .column-kicker, .section-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
  margin-bottom: 4px;
}

.meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-sep {
  color: var(--muted-light);
}

/* -------------------------------------------------------------
 * 8. Hero Section
 * ------------------------------------------------------------- */
.hero-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.hero-layout-3col_classic {
  display: grid;
  grid-template-columns: 1fr 2.2fr 1fr;
  gap: 24px;
}

.hero-column {
  display: flex;
  flex-direction: column;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--line-strong);
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.column-more-link {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.hero-stories-list {
  display: flex;
  flex-direction: column;
}

.hero-mini-story {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.hero-mini-story:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.hero-mini-title {
  font-size: 17px;
  line-height: 1.25;
  margin: 4px 0 6px;
}

.hero-col-center {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0 20px;
}

.hero-lead-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lead-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.lead-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.lead-media-link:hover .lead-image {
  transform: scale(1.03);
}

.lead-media .lead-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.lead-title {
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0 0 10px;
}

.lead-excerpt {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 14px;
}

.lead-meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.meta-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
}

.author-avatar-mini {
  border-radius: 50%;
}

/* 2-Column Magazine Hero Layout */
.hero-layout-2col_magazine {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 28px;
}

.hero-magazine-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mag-mini-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.mag-mini-thumb img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.mag-mini-title {
  font-size: 15px;
  margin: 2px 0 4px;
}

/* -------------------------------------------------------------
 * 9. News Section & Grids
 * ------------------------------------------------------------- */
.news-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 3px solid var(--line-strong);
  padding-bottom: 8px;
  margin-bottom: 22px;
}

.section-title {
  font-size: 26px;
  letter-spacing: -0.5px;
  margin: 0;
}

.section-tagline {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-weight: 500;
  margin-top: 2px;
}

.section-viewall-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Standard Cards Grids */
.cards-grid {
  display: grid;
  gap: 22px;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.news-card {
  display: flex;
  flex-direction: column;
}

.card-thumb-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.card-thumb-wrap img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card-thumb-link:hover img {
  transform: scale(1.04);
}

.card-thumb-wrap .cat-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.card-title {
  font-size: 19px;
  line-height: 1.25;
  margin: 0 0 6px;
}

.card-excerpt {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 10px;
  line-height: 1.45;
}

/* 2-Col Card with Excerpt */
.card-2col {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.card-2col .card-media img {
  width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* Story Rows Layout */
.story-rows-container, .story-rows-list {
  display: flex;
  flex-direction: column;
}

.story-row-card, .story-row-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.story-row-card:first-child, .story-row-item:first-child {
  padding-top: 0;
}

.story-row-media img, .story-row-thumb img {
  width: 200px;
  height: 130px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: transform 0.3s ease;
}

.story-row-media:hover img, .story-row-thumb:hover img {
  transform: scale(1.03);
}

.story-row-heading {
  font-size: 21px;
  line-height: 1.2;
  margin: 0 0 6px;
}

.story-row-desc {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

/* Magazine Hybrid Layout */
.magazine-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 24px;
}

.mag-featured-card .mag-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.mag-featured-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.mag-featured-card .cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.mag-featured-card .mag-title {
  font-size: 26px;
  margin: 0 0 8px;
}

.mag-sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mag-stack-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.mag-stack-thumb img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.mag-stack-title {
  font-size: 15px;
  margin: 2px 0 4px;
}

/* -------------------------------------------------------------
 * 10. Split Section & Sidebars
 * ------------------------------------------------------------- */
.split-layout-grid, .single-grid-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
}

.sidebar-box, .widget {
  background-color: var(--surface-card);
  border-top: 3px solid var(--line-strong);
  padding: 16px 0;
  margin-bottom: 24px;
}

.sidebar-box-title, .widget-title {
  font-size: 21px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.box-title-icon {
  color: var(--accent);
  display: inline-flex;
}

/* Ranked Most Read List */
.ranked-list, .ranked-list-widget {
  display: flex;
  flex-direction: column;
}

.ranked-story, .ranked-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.ranked-story:last-child, .ranked-item:last-child {
  border-bottom: 0;
}

.ranked-index, .ranked-num {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 800;
  color: var(--muted-light);
  line-height: 1;
}

.ranked-headline, .ranked-title {
  font-size: 16px;
  line-height: 1.25;
  margin: 0 0 4px;
}

/* Styled Categories List */
.styled-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.styled-category-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 14px;
}

.count-badge {
  background-color: var(--surface-alt);
  color: var(--muted);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 20px;
}

/* Author Profile Widget */
.author-profile-widget {
  text-align: center;
  padding: 10px 0;
}

.author-widget-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 12px;
  object-fit: cover;
}

.author-widget-name {
  font-size: 20px;
  margin: 0 0 4px;
}

.author-widget-role {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.author-widget-bio {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* -------------------------------------------------------------
 * 11. Advertisement Slots
 * ------------------------------------------------------------- */
.ad-slot {
  margin: 24px auto;
  text-align: center;
  background-color: var(--surface-alt);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.ad-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ad-banner-link img {
  margin: 0 auto;
  max-width: 100%;
}

.ad-placeholder {
  color: var(--muted);
  font-size: 13px;
  padding: 24px;
}

.ad-slot-side {
  max-width: 300px;
  margin: 20px auto;
}

/* -------------------------------------------------------------
 * 12. Newsletter Box
 * ------------------------------------------------------------- */
.newsletter-box {
  background-color: var(--surface-dark);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 36px 32px;
  margin: 36px 0;
}

.newsletter-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
}

.newsletter-badge {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.newsletter-heading {
  font-size: 30px;
  color: #ffffff;
  margin: 0 0 8px;
}

.newsletter-desc {
  color: #cbd5e1;
  font-size: 14px;
  margin: 0;
}

.newsletter-form .input-group {
  display: flex;
  gap: 8px;
}

.newsletter-input {
  flex: 1;
  padding: 13px 16px;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  background-color: #1e293b;
  color: #ffffff;
  font-size: 14px;
}

.newsletter-input::placeholder {
  color: #94a3b8;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--accent);
}

.newsletter-submit-btn, .btn-primary-editorial {
  background-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 22px;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.newsletter-submit-btn:hover, .btn-primary-editorial:hover {
  background-color: var(--accent-hover);
}

.newsletter-disclaimer {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 8px;
}

/* -------------------------------------------------------------
 * 13. Single Article & Typography
 * ------------------------------------------------------------- */
.single-post-layout {
  padding: 24px 0 40px;
}

.sp_theme-breadcrumbs,
.supernews-breadcrumbs {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.sp_theme-breadcrumbs a:hover,
.supernews-breadcrumbs a:hover {
  color: var(--accent);
}

.single-article-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.single-article-title {
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 10px 0 14px;
}

.single-lead-excerpt p {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 16px;
}

.single-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.meta-author-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar-img {
  border-radius: 50%;
  width: 44px;
  height: 44px;
}

.author-name-link {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.meta-date-row {
  font-size: 12px;
  color: var(--muted);
}

.meta-stats-group {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}

.meta-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Font Resizer */
.font-resizer-tool {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.font-resizer-btn {
  background: transparent;
  border: 0;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.font-resizer-btn:hover {
  background-color: var(--surface-alt);
  color: var(--accent);
}

/* Social Share Bar */
.article-share-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.share-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.share-buttons-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background-color: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition);
}

.share-btn:hover {
  transform: translateY(-1px);
}

.share-twitter:hover { background-color: #000000; color: #ffffff; border-color: #000000; }
.share-facebook:hover { background-color: #1877f2; color: #ffffff; border-color: #1877f2; }
.share-whatsapp:hover { background-color: #25d366; color: #ffffff; border-color: #25d366; }
.share-linkedin:hover { background-color: #0077b5; color: #ffffff; border-color: #0077b5; }

.share-btn-copy.copied {
  background-color: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

/* Single Article Body Typography */
.single-featured-media {
  margin: 0 0 24px;
}

.featured-hero-img {
  width: 100%;
  border-radius: var(--radius-sm);
}

.featured-img-caption {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 6px;
}

.single-article-content {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.8;
  color: var(--ink);
}

.single-article-content p {
  margin-bottom: 1.4rem;
}

.single-article-content h2 {
  font-size: 30px;
  margin: 32px 0 14px;
}

.single-article-content h3 {
  font-size: 24px;
  margin: 28px 0 12px;
}

.single-article-content blockquote {
  border-left: 4px solid var(--accent);
  margin: 24px 0;
  padding: 8px 20px;
  font-style: italic;
  font-size: 21px;
  color: var(--ink-soft);
  background-color: var(--surface-alt);
}

.single-article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Post Tags */
.article-tags-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.tags-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.tags-pills a {
  display: inline-block;
  background-color: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin: 2px 4px 2px 0;
}

.tags-pills a:hover {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* Author Bio Card */
.author-bio-card {
  display: flex;
  gap: 20px;
  background-color: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.author-bio-avatar .author-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.author-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

.author-name {
  font-size: 22px;
  margin: 2px 0 6px;
}

.author-description {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.author-archive-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

/* Previous / Next Post Card Navigation */
.post-navigation-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin: 28px 0;
}

.nav-story {
  display: flex;
  flex-direction: column;
}

.next-story {
  text-align: right;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.nav-story-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

/* Related Posts Section */
.related-posts-section {
  margin: 36px 0;
  padding-top: 18px;
  border-top: 2px solid var(--line-strong);
}

/* -------------------------------------------------------------
 * 14. Comments Area
 * ------------------------------------------------------------- */
.comments-area {
  margin-top: 40px;
  border-top: 2px solid var(--line-strong);
  padding-top: 24px;
}

.comments-title {
  font-size: 24px;
  margin-bottom: 20px;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}

.comment-list .comment {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.comment-list .children {
  list-style: none;
  padding-left: 28px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 6px;
}

.comment-author .avatar {
  border-radius: 50%;
}

.comment-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.comment-content {
  font-size: 14px;
}

.reply a {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

.comment-form {
  background-color: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--ink);
  margin-bottom: 14px;
}

/* -------------------------------------------------------------
 * 15. Archive & Search Layouts
 * ------------------------------------------------------------- */
.archive-layout {
  padding: 24px 0 40px;
}

.archive-header-card {
  border-bottom: 3px solid var(--line-strong);
  padding-bottom: 14px;
  margin-bottom: 24px;
}

.archive-title {
  font-size: 38px;
  margin: 0 0 6px;
}

.highlight-query {
  color: var(--accent);
}

.archive-description {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--muted);
}

.search-count-text {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Numeric Pagination */
.archive-pagination {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.archive-pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
}

.archive-pagination .page-numbers.current {
  background-color: var(--line-strong);
  color: #ffffff;
  border-color: var(--line-strong);
}

.archive-pagination .page-numbers:hover:not(.current) {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* -------------------------------------------------------------
 * 16. 404 Error Page
 * ------------------------------------------------------------- */
.error-404-layout {
  padding: 40px 0 60px;
}

.error-404-hero {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 50px;
}

.error-code-badge {
  font-family: var(--font-serif);
  font-size: 90px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.error-title {
  font-size: 36px;
  margin: 10px 0 12px;
}

.error-desc {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 24px;
}

.error-search-box {
  margin: 20px 0;
}

/* -------------------------------------------------------------
 * 17. Search Modal Popup & Off-Canvas Drawer
 * ------------------------------------------------------------- */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.search-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.search-modal-box {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-hover);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.search-modal.is-open .search-modal-box {
  transform: translateY(0);
}

.search-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--muted);
}

.search-modal-close:hover {
  color: var(--accent);
}

.search-modal-title {
  font-size: 24px;
  margin-bottom: 16px;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--surface-alt);
  color: var(--ink);
}

.search-form input[type="submit"] {
  background-color: var(--accent);
  color: #ffffff;
  border: 0;
  padding: 12px 20px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.search-suggestions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.suggestion-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.suggestion-pill {
  font-size: 11px;
  background-color: var(--surface-alt);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.suggestion-pill:hover {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* Off-Canvas Mobile Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 85%;
  background-color: var(--surface);
  z-index: 99998;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-shadow: var(--shadow-hover);
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99997;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-brand {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 800;
}

.drawer-brand span {
  color: var(--accent);
}

.drawer-close {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink);
}

.drawer-body {
  padding: 20px;
}

.drawer-search {
  margin-bottom: 20px;
}

.drawer-menu-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.drawer-menu-list li {
  border-bottom: 1px solid var(--line);
}

.drawer-menu-list a {
  display: block;
  padding: 12px 0;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
}

.drawer-social-links {
  display: flex;
  gap: 12px;
}

/* -------------------------------------------------------------
 * 18. Footer
 * ------------------------------------------------------------- */
.site-footer {
  background-color: var(--surface-dark);
  color: #cbd5e1;
  margin-top: 40px;
}

.footer-main-area {
  padding: 48px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
}

.footer-brand a {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
}

.footer-brand span {
  color: var(--accent);
}

.footer-about-text {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
  margin: 12px 0 16px;
}

.footer-widget-title {
  color: #ffffff;
  font-size: 16px;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-list li {
  margin-bottom: 8px;
}

.footer-links-list a {
  font-size: 13px;
  color: #94a3b8;
}

.footer-links-list a:hover {
  color: #ffffff;
}

.footer-rss-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.footer-rss-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

.footer-desc-sm {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 12px;
}

.footer-bottom-strip {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  font-size: 12px;
  color: #64748b;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-to-top-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  transition: var(--transition);
}

.back-to-top-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* -------------------------------------------------------------
 * 19. Responsive Media Queries
 * ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-layout-3col_classic {
    grid-template-columns: 1fr 1.6fr;
  }
  .hero-col-right {
    display: none;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .split-layout-grid, .single-grid-container {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-strip-inner {
    justify-content: center;
  }
  .top-strip-left span:last-child {
    display: none;
  }
  .brand-title {
    font-size: 42px;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .primary-nav-container {
    display: none;
  }
  .hero-layout-3col_classic {
    display: flex;
    flex-direction: column;
  }
  .hero-col-center {
    border-left: 0;
    border-right: 0;
    padding: 0;
  }
  .lead-title {
    font-size: 28px;
  }
  .single-article-title {
    font-size: 32px;
  }
  .card-2col, .story-row-card, .story-row-item {
    grid-template-columns: 120px 1fr;
    gap: 12px;
  }
  .card-2col .card-media img, .story-row-media img, .story-row-thumb img {
    width: 120px;
    height: 85px;
  }
  .newsletter-inner {
    grid-template-columns: 1fr;
  }
  .newsletter-form .input-group {
    flex-direction: column;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .post-navigation-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .grid-4, .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2-container {
    grid-template-columns: 1fr;
  }
  .single-meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
