/*
Theme Name: A1 Blogs
Theme URI: https://a1blogs.com/
Author: A1 Blogs Development Team
Author URI: https://a1blogs.com/
Description: A modern, high-impact digital news magazine and editorial WordPress theme designed for professional journalism, newsrooms, tech blogs, and multi-category publications. Features dynamic breaking news tickers, editorial hero layouts, dark/light modes, customizable category sections, native WordPress menus, and mobile-first responsiveness.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: a1blogs
Tags: news, blog, editorial, magazine, two-columns, custom-header, custom-menu, featured-images, flexible-header, full-width-template, theme-options, translation-ready
*/

/* ==========================================================================
   CSS Variables & Design Tokens (Light & Dark Themes)
   ========================================================================== */
:root {
  --font-serif: "Merriweather", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-masthead: "Cinzel", "Times New Roman", serif;

  /* Colors - Light Theme */
  --bg-body: #f8f9fa;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-dark: #0f172a;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-on-dark: #ffffff;

  --border-color: #e2e8f0;
  --border-color-dark: #cbd5e1;
  --border-color-subtle: #f1f5f9;

  --color-primary: #0f172a;
  --color-primary-hover: #1e293b;
  --color-accent: #dc2626; /* Red for BREAKING, alerts, badges */
  --color-accent-hover: #b91c1c;

  /* Category accent colors */
  --cat-news: #dc2626;
  --cat-technology: #2563eb;
  --cat-business: #059669;
  --cat-entertainment: #7c3aed;
  --cat-sports: #ea580c;
  --cat-lifestyle: #db2777;
  --cat-opinion: #4b5563;

  /* Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --max-width: 1280px;
  --header-height: 70px;
  --transition: all 0.2s ease-in-out;
}

[data-theme="dark"] {
  --bg-body: #0b0f17;
  --bg-surface: #131b26;
  --bg-surface-alt: #1a2332;
  --bg-dark: #070a10;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --text-on-dark: #ffffff;

  --border-color: #232d3f;
  --border-color-dark: #334155;
  --border-color-subtle: #192231;

  --color-primary: #f8fafc;
  --color-primary-hover: #e2e8f0;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style-position: inside;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.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;
}

.skip-link {
  position: absolute;
  top: -999px;
  left: 20px;
  background: var(--color-accent);
  color: #ffffff;
  padding: 8px 16px;
  z-index: 99999;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 20px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ==========================================================================
   1. Top Information Bar
   ========================================================================== */
.site-top-bar {
  background-color: var(--bg-dark);
  color: #cbd5e1;
  font-size: 0.8125rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  min-width: 0;
}

.top-bar-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  font-weight: 500;
  color: #94a3b8;
}

.top-bar-date svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.breaking-news-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  flex: 1;
}

.breaking-badge {
  background-color: var(--color-accent);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.breaking-ticker {
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  flex: 1;
}

.ticker-item {
  display: inline-block;
  color: #e2e8f0;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

.ticker-item:hover {
  color: #ffffff;
  text-decoration: underline;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-bar-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-bar-social a {
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.top-bar-social a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.top-bar-social svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ==========================================================================
   2. Main Editorial Header
   ========================================================================== */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 40;
  transition: background-color 0.25s ease;
}

.header-main-row {
  padding: 1.5rem 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.875rem;
}

.mobile-menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.header-center {
  text-align: center;
}

.site-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-title {
  margin: 0;
  font-family: var(--font-masthead);
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--color-primary);
}

.site-title a {
  color: inherit;
}

.site-tagline {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.header-action-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.header-action-btn:hover {
  background-color: var(--bg-surface-alt);
  border-color: var(--border-color-dark);
  color: var(--color-accent);
}

.header-action-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.theme-toggle-btn .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle-btn .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle-btn .icon-moon {
  display: block;
}

.btn-subscribe {
  background-color: var(--color-accent);
  color: #ffffff !important;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-subscribe:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   3. Main Navigation
   ========================================================================== */
.site-navigation-bar {
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 35;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s ease;
}

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

.primary-menu {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.primary-menu > li {
  position: relative;
}

.primary-menu > li > a {
  display: block;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-main);
  position: relative;
  transition: var(--transition);
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-ancestor > a {
  color: var(--color-accent);
}

.primary-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.primary-menu > li > a:hover::after,
.primary-menu > li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* Dropdown menus */
.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  min-width: 200px;
  list-style: none;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 50;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
}

.primary-menu .sub-menu a:hover {
  background-color: var(--bg-surface-alt);
  color: var(--color-accent);
}

/* Nav quick link / right section */
.nav-trending-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-trending-tag span {
  color: var(--color-accent);
  font-weight: 700;
}

/* ==========================================================================
   4. Mobile Navigation Drawer & Search Modal
   ========================================================================== */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100%;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  left: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

.mobile-drawer-content {
  padding: 1.25rem;
  flex: 1;
}

.mobile-search-form {
  margin-bottom: 1.5rem;
}

.mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu li {
  border-bottom: 1px solid var(--border-color-subtle);
}

.mobile-menu a {
  display: block;
  padding: 0.875rem 0;
  font-weight: 600;
  font-size: 1rem;
}

.mobile-menu .sub-menu {
  list-style: none;
  padding-left: 1rem;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Search Modal Overlay */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.search-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-modal-content {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.search-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* ==========================================================================
   5. Advertisement Banners & Newsletters
   ========================================================================== */
.ad-slot-leaderboard {
  margin: 1.5rem auto;
  text-align: center;
  max-width: 728px;
  background-color: var(--bg-surface-alt);
  border: 1px dashed var(--border-color);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.ad-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.ad-box-728 {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.ad-slot-sidebar {
  margin: 1.5rem 0;
  text-align: center;
  background-color: var(--bg-surface-alt);
  border: 1px dashed var(--border-color);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.ad-box-300 {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ==========================================================================
   6. Homepage Editorial Hero Section
   ========================================================================== */
.homepage-hero-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
}

.hero-lead-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.hero-lead-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.hero-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-surface-alt);
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-lead-card:hover .hero-image-wrap img {
  transform: scale(1.03);
}

.hero-lead-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: #ffffff !important;
  margin-bottom: 0.75rem;
  align-self: flex-start;
  background-color: var(--color-accent);
}

.badge-news { background-color: var(--cat-news); }
.badge-technology, .badge-tech { background-color: var(--cat-technology); }
.badge-business { background-color: var(--cat-business); }
.badge-entertainment { background-color: var(--cat-entertainment); }
.badge-sports { background-color: var(--cat-sports); }
.badge-lifestyle { background-color: var(--cat-lifestyle); }
.badge-opinion { background-color: var(--cat-opinion); }

.hero-lead-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.hero-lead-title a:hover {
  color: var(--color-accent);
}

.hero-lead-excerpt {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color-subtle);
  padding-top: 0.75rem;
  flex-wrap: wrap;
}

.card-meta-author {
  font-weight: 600;
  color: var(--text-main);
}

.card-meta-dot {
  font-size: 0.75rem;
}

/* Secondary Column */
.hero-secondary-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-sub-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.hero-sub-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.hero-sub-card .sub-image-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--bg-surface-alt);
}

.hero-sub-card .sub-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-sub-card:hover .sub-image-wrap img {
  transform: scale(1.04);
}

.hero-sub-content {
  padding: 1rem;
}

.hero-sub-title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

/* Trending Column */
.hero-trending-col {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.section-block-title {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.section-block-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--color-accent);
}

.trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trending-item {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border-color-subtle);
}

.trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--border-color-dark);
  min-width: 24px;
}

.trending-item:nth-child(1) .trending-number { color: var(--color-accent); }
.trending-item:nth-child(2) .trending-number { color: var(--cat-technology); }
.trending-item:nth-child(3) .trending-number { color: var(--cat-business); }

.trending-content h4 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   7. Homepage Magazine Sections (Tech, Business, Latest, etc.)
   ========================================================================== */
.homepage-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.section-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.section-main-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-main-title::after {
  content: '';
  position: absolute;
  bottom: -0.625rem;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--color-accent);
}

.section-view-all {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-view-all:hover {
  color: var(--color-accent);
}

/* Grid Layouts */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.cards-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.magazine-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.magazine-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.card-thumb-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-surface-alt);
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
}

/* Split Section (e.g. Technology Magazine Split) */
.split-mag-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

.split-left-featured {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.split-right-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.horizontal-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.horizontal-thumb {
  height: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background-color: var(--bg-surface-alt);
}

.horizontal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.horizontal-body {
  padding: 0.875rem 0.875rem 0.875rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.horizontal-title {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

/* Newsletter Signup Box */
.newsletter-cta-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  margin: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter-cta-inner {
  max-width: 640px;
  margin: 0 auto;
}

.newsletter-title {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.newsletter-desc {
  font-size: 1rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.newsletter-form-inline {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto 0.75rem;
}

.newsletter-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  outline: none;
}

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

.newsletter-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
}

.newsletter-btn {
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.newsletter-btn:hover {
  background-color: var(--color-accent-hover);
}

.newsletter-disclaimer {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ==========================================================================
   8. Single Post Template Styles
   ========================================================================== */
.single-post-layout {
  padding: 2.5rem 0;
}

.single-post-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
}

.post-breadcrumbs {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

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

.article-header {
  margin-bottom: 2rem;
}

.article-headline {
  font-family: var(--font-serif);
  font-size: 2.625rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0.75rem 0 1rem;
  color: var(--text-main);
}

.article-subtitle {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-meta-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.author-avatar-wrap img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
}

.article-byline {
  display: flex;
  flex-direction: column;
}

.byline-author {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-main);
}

.byline-date-time {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.article-share-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}

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

.share-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.article-featured-media {
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-featured-media img {
  width: 100%;
  max-height: 580px;
  object-fit: cover;
}

.media-caption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Article Typography */
.article-content {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text-main);
}

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

.article-content h2 {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 2.5rem 0 1rem;
  color: var(--text-main);
  border-left: 4px solid var(--color-accent);
  padding-left: 1rem;
}

.article-content h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 0.875rem;
}

.article-content ul, 
.article-content ol {
  margin: 1.5rem 0 1.5rem 1.5rem;
  line-height: 1.8;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote.pullquote {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--color-primary);
  border-top: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  padding: 1.5rem 1rem;
  margin: 2.5rem 0;
  text-align: center;
  position: relative;
  background-color: var(--bg-surface-alt);
  border-radius: var(--radius-sm);
}

.article-content blockquote.pullquote cite {
  display: block;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.75rem;
  color: var(--text-muted);
}

.article-tags-wrap {
  margin: 2.5rem 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.article-tag-item {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.article-tag-item:hover {
  background-color: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}

/* Author Box */
.author-box-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin: 2.5rem 0;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.author-box-avatar img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
}

.author-box-details h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.author-box-bio {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.author-box-link {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
}

/* Post Navigation (Prev/Next) */
.post-navigation-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.nav-post-card {
  display: flex;
  flex-direction: column;
}

.nav-post-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.nav-post-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.nav-post-title:hover {
  color: var(--color-accent);
}

.nav-post-next {
  text-align: right;
}

/* Related Posts */
.related-posts-section {
  margin: 3rem 0;
}

/* Comments */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.comments-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
  margin: 0 0 2rem 0;
  padding: 0;
}

.comment-list .comment {
  border-bottom: 1px solid var(--border-color-subtle);
  padding: 1.25rem 0;
}

.comment-list .children {
  list-style: none;
  padding-left: 2rem;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.comment-author img {
  border-radius: var(--radius-full);
}

.comment-author .fn {
  font-weight: 700;
}

.comment-metadata {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.comment-body p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.reply a {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: 0.5rem;
}

.comment-respond {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.comment-reply-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.comment-form p {
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-main);
  outline: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--color-primary);
}

.comment-form input[type="submit"] {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.comment-form input[type="submit"]:hover {
  background-color: var(--color-accent);
}

/* ==========================================================================
   9. Page Templates (Contact, Publish With Us, About, Archive)
   ========================================================================== */
.page-hero-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 3rem 0 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.page-hero-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.page-hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Contact Page Layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.contact-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.contact-card-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.contact-card-box:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-accent);
}

.contact-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface-alt);
  border-radius: var(--radius-full);
  color: var(--color-accent);
}

.contact-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.contact-email-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
  word-break: break-all;
}

.contact-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.form-wrapper-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.editorial-guidelines-box {
  background-color: var(--bg-surface-alt);
  border-left: 4px solid var(--color-accent);
  padding: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 2rem;
}

.editorial-guidelines-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.editorial-guidelines-box ul {
  padding-left: 1.25rem;
  color: var(--text-main);
}

.editorial-guidelines-box li {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   10. Multi-Column Footer
   ========================================================================== */
.site-footer {
  background-color: var(--bg-dark);
  color: #cbd5e1;
  border-top: 4px solid var(--color-accent);
  margin-top: 4rem;
}

.footer-widgets-row {
  padding: 3.5rem 0 2.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr;
  gap: 2.5rem;
}

.footer-widget h3 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget h3::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--color-accent);
}

.footer-brand-title {
  font-family: var(--font-masthead);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.footer-social-links {
  display: flex;
  gap: 0.625rem;
}

.footer-social-links a {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  transition: var(--transition);
}

.footer-social-links a:hover {
  background-color: var(--color-accent);
  color: #ffffff;
}

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

.footer-widget li {
  margin-bottom: 0.625rem;
}

.footer-widget a {
  font-size: 0.875rem;
  color: #94a3b8;
  display: inline-block;
  transition: var(--transition);
}

.footer-widget a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
  font-size: 0.8125rem;
  color: #64748b;
}

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

.back-to-top-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
}

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

/* ==========================================================================
   11. Pagination & Search Results
   ========================================================================== */
.pagination {
  margin: 2.5rem 0;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 600;
}

.page-numbers.current {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.page-numbers:hover:not(.current) {
  background-color: var(--bg-surface-alt);
  color: var(--color-accent);
}

/* ==========================================================================
   12. Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.5fr 1fr;
  }
  .hero-trending-col {
    grid-column: span 2;
  }
  .cards-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-widgets-row {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .single-post-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-top-bar {
    display: none;
  }
  .header-main-row {
    grid-template-columns: auto 1fr auto;
    padding: 1rem 0;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .site-navigation-bar {
    display: none;
  }
  .site-title {
    font-size: 1.875rem;
  }
  .site-tagline {
    display: none;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-trending-col {
    grid-column: span 1;
  }
  .cards-grid-3, .cards-grid-4 {
    grid-template-columns: 1fr;
  }
  .split-mag-layout {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-cards-row {
    grid-template-columns: 1fr;
  }
  .footer-widgets-row {
    grid-template-columns: 1fr;
  }
  .article-headline {
    font-size: 2rem;
  }
  .newsletter-form-inline {
    flex-direction: column;
  }
}


/* ==========================================================================
   13. Elementor Page Builder Compatibility
   ========================================================================== */
.elementor-page .site-main {
  padding: 0;
  margin: 0;
}

.elementor-content-wrap,
.elementor-fullwidth-page,
.a1blogs-elementor-builder-container {
  width: 100%;
  position: relative;
}

/* Ensure Elementor stretched sections can expand to 100vw smoothly */
.elementor-section.elementor-section-stretched {
  max-width: 100vw !important;
}

/* Default container width alignment with theme max-width */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: var(--max-width);
}

/* Canvas template styles */
.elementor-template-canvas {
  background-color: var(--bg-body);
  color: var(--text-main);
  padding: 0;
  margin: 0;
}

.elementor-canvas-wrapper {
  width: 100%;
  min-height: 100vh;
}
