/*
Theme Name: ThePressUSA
Theme URI: https://thepressusa.su
Author: ThePressUSA
Author URI: https://thepressusa.su
Description: Modern, competitive news theme with dark mode, live search, and responsive design. Built to compete with top Google News publishers.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: thepressusa
Tags: news, magazine, dark-mode, responsive, grid-layout, custom-menu, featured-images, translation-ready
*/

/* ===== CSS RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F0F2F5; /* Exact Facebook light mode canvas background */
  --fg: #050505; /* Exact Facebook primary dark text */
  --card: #FFFFFF;
  --card-bg: #FFFFFF;
  --card-fg: #050505;
  --primary: #1877F2; /* Facebook Blue */
  --primary-fg: #FFFFFF;
  --secondary: #E4E6EB; /* Facebook light gray hover/secondary background */
  --secondary-fg: #050505;
  --muted: #E4E6EB;
  --muted-fg: #65676B; /* Facebook secondary subtext */
  --border: #CED0D4; /* Facebook standard border color */
  --surface-hover: #E4E6EB;
  --nav-bg: #FFFFFF;
  --footer-bg: #1C1E21;
  --footer-fg: #8D949E;
  --radius: 0.75rem;
  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-ui: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --breaking-red: #1877F2;
  --breaking-bg: #E4E6EB;
}

.dark {
  --bg: #18191A; /* Facebook dark mode background */
  --fg: #E4E6EB; /* Facebook dark mode text */
  --card: #242526; /* Facebook dark mode surface */
  --card-bg: #242526;
  --card-fg: #E4E6EB;
  --secondary: #3A3B3C; /* Facebook dark mode hover/secondary button */
  --secondary-fg: #E4E6EB;
  --muted: #3A3B3C;
  --muted-fg: #B0B3B8; /* Facebook dark mode secondary text */
  --border: #3E4042; /* Facebook dark mode border */
  --surface-hover: #3A3B3C;
  --nav-bg: #242526;
  --footer-bg: #18191A;
  --footer-fg: #B0B3B8;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-wrap: break-word;
  word-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main-content {
  flex: 1;
}

h1, h2, h3 {
  font-family: var(--font-ui);
  line-height: 1.1;
}

h4, h5, h6 {
  font-family: var(--font-ui);
  line-height: 1.2;
}

.article-main-col h1,
.article-content h2,
.article-content h3 {
  font-family: var(--font-display);
  line-height: 1.1;
}

.hero-title,
.article-hero h1 {
  font-family: var(--font-display);
  line-height: 1.1;
}

a { color: inherit; text-decoration: none; transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
img { max-width: 100%; height: auto; display: block; }
iframe, object, embed, video { max-width: 100%; height: auto; }
table, pre { max-width: 100%; overflow-x: auto; display: block; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  will-change: background-color, border-color;
}

/* Force GTranslate widget below header if present */
#gt_float_wrapper, .gtranslate_wrapper, .gt_container {
  z-index: 999 !important;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-fg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--fg);
}

/* Custom logo uploaded via Customizer */
.logo-custom-img {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-custom-img .custom-logo {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 639px) {
  .logo-text { font-size: 0.95rem; }
  .logo-custom-img .custom-logo { max-height: 48px; }
}

/* Desktop Nav */
.main-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .main-nav { display: flex; }
}

.main-nav a {
  padding: 0.5rem 0.75rem;
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
  border-radius: 0.5rem;
  transition: color 0.2s ease, background-color 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.trust-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.topic-hub-count {
  font-size: 0.8125rem;
  color: var(--muted-fg);
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.topic-hub-count::before {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
}

.trust-hero {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, var(--secondary), var(--bg));
}

.main-nav a:hover,
.main-nav a.current-cat {
  color: var(--fg);
  background: var(--secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

@media (max-width: 767px) {
  .header-actions .social-link-btn,
  .header-actions .rss-follow-btn {
    display: none;
  }
}

.header-btn {
  padding: 0.75rem;
  min-height: 48px;
  min-width: 48px;
  margin: 0 4px;
  border-radius: 12px;
  background: none;
  border: none;
  color: var(--muted-fg);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn:hover {
  color: var(--fg);
  background: var(--secondary);
}

.header-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.header-btn.social-link-btn svg {
  fill: currentColor;
  stroke: none;
}

.header-btn.social-link-btn svg[stroke="currentColor"] {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.mobile-menu-btn { display: flex; }

@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
}

/* Mobile Nav */
/* Mobile Nav - Unified in side-drawer pattern below (see line 1800+) */


.mobile-nav a {
  padding: 0.875rem 1rem;
  min-height: 48px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  font-size: 1.0625rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--fg);
  border-radius: 0.5rem;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav a:hover { color: var(--primary); background: var(--secondary); }

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
}

.search-overlay.active { display: block; }

.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.search-modal {
  position: relative;
  max-width: 640px;
  margin: 80px auto 0;
  padding: 0 1rem;
}

.search-card {
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
}

.search-input-wrap svg {
  width: 20px;
  height: 20px;
  stroke: var(--muted-fg);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  padding: 1rem 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 1rem;
  font-family: var(--font-sans);
}

.search-input::placeholder { color: var(--muted-fg); }

.search-close {
  padding: 0.375rem;
  border-radius: 0.5rem;
  background: none;
  border: none;
  color: var(--muted-fg);
  cursor: pointer;
}

.search-close:hover { background: var(--secondary); }

.search-results {
  max-height: 60vh;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  transition: background 0.2s;
  border-bottom: 1px solid var(--border);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover,
.search-result-item.selected {
  background: var(--surface-hover);
}

.search-result-img {
  width: 64px;
  height: 64px;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-content { flex: 1; min-width: 0; }

.search-result-cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.search-result-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 0.125rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-meta {
  font-size: 0.75rem;
  color: var(--muted-fg);
  margin-top: 0.25rem;
}

.search-tags {
  padding: 1.5rem 1.25rem;
}

.search-tags-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.search-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.search-tag {
  padding: 0.625rem 1rem; /* Fitts' Law: yields ≥ 48px total touch height */
  min-height: 48px;
  font-size: 0.9375rem;
  background: var(--secondary);
  color: var(--secondary-fg);
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.search-tag:hover {
  background: var(--primary);
  color: var(--primary-fg);
}

.search-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted-fg);
}

/* ===== HERO SECTION ===== */
.hero-section { padding: 2rem 0; }

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

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 2fr 1fr; }
}

.hero-main {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 16/10;
}

@media (min-width: 1024px) {
  .hero-main { aspect-ratio: auto; min-height: 460px; }
}

.hero-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

.hero-main:hover img { transform: scale(1.05); }

.hero-main .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.3) 50%, transparent);
}

.hero-main .content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .hero-main .content { padding: 2rem; }
}

.hero-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary);
  color: var(--primary-fg);
  border-radius: 0.375rem;
}

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

.hero-meta .date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.2;
}

@media (min-width: 640px) { .hero-title { font-size: 1.875rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 2.25rem; } }

/* CTA base styles — MUST come before mobile media query so display:none can override */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.hero-main:hover .hero-cta {
  background: var(--primary);
  border-color: var(--primary);
}

.hero-cta svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 2;
}

/* Mobile tune-up: keep hero headline from swallowing the image */
@media (max-width: 639px) {
  .hero-main {
    border-radius: 0.9rem;
    aspect-ratio: 3 / 4;
  }

  .hero-main .overlay {
    background: linear-gradient(
      to top,
      rgba(0,0,0,0.75) 0%,
      rgba(0,0,0,0.35) 35%,
      transparent 60%
    );
  }

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

  .hero-title {
    font-size: 1.1rem;
    line-height: 1.2;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }

  .hero-meta {
    margin-bottom: 0.375rem;
  }

  .hero-badge {
    font-size: 0.625rem;
    padding: 0.2rem 0.5rem;
  }

  .hero-meta .date {
    font-size: 0.6875rem;
  }

  /* Hide CTA on mobile to free space */
  .hero-cta { display: none; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 1rem; -webkit-line-clamp: 2; line-clamp: 2; }
}

/* Side articles */
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-side-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  flex: 1;
  min-height: 220px;
}

.hero-side-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

.hero-side-card:hover img { transform: scale(1.05); }

.hero-side-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2) 50%, transparent);
}

.hero-side-card .content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
}

.hero-side-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-side-card .meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.5rem;
}

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* ===== Inline "Related" blocks injected by plugins =====
   The bot outputs `.pro-related-section` with hardcoded inline styles
   (background: #f9f9f9; color: #2563eb etc.) that break dark mode.
   We use !important so theme styles win even if JS fails to strip them. */
.pro-related-section {
  margin-top: 1.5rem !important;
  padding: 1.125rem 1.25rem !important;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-left: 4px solid var(--primary) !important;
  border-radius: 0.75rem !important;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.pro-related-section:hover {
  border-left-color: var(--primary) !important;
  box-shadow: 0 4px 20px -6px rgba(0,0,0,0.12);
}

.dark .pro-related-section:hover {
  box-shadow: 0 4px 20px -6px rgba(0,0,0,0.25);
}

.pro-related-section h4 {
  margin: 0 0 0.75rem !important;
  font-size: 0.8125rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  font-family: var(--font-ui) !important;
  color: var(--muted-fg) !important;
}

.pro-related-section ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  gap: 0.625rem !important;
}

.pro-related-section li {
  margin: 0 !important;
  padding: 0 !important;
}

.pro-related-section a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  color: var(--primary) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 0.9375rem !important;
  line-height: 1.4 !important;
  transition: color 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.pro-related-section a:hover {
  text-decoration: underline !important;
  transform: translateX(2px);
}

.pro-related-section a::before {
  content: "→";
  opacity: 0.6;
  font-size: 0.875em;
  flex-shrink: 0;
}

.section-header svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
}

.section-header .line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 1rem;
}

/* ===== NEWS CARDS ===== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .news-grid { grid-template-columns: repeat(4, 1fr); }
  .news-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.news-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background-color 0.3s ease;
}

.news-card:hover { 
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08); 
  transform: translateY(-2px);
}

.news-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

.news-card:hover .news-card-img img { transform: scale(1.05); }

.news-card-img .badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary);
  color: var(--primary-fg);
  border-radius: 0.375rem;
}

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

.news-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--card-fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.news-card:hover .news-card-body h3 { color: var(--primary); }

.news-card-body .excerpt {
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card-body .meta {
  font-size: 0.75rem;
  color: var(--muted-fg);
  margin-top: 0.75rem;
}

/* Card footer — author + date + reading time */
.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
}

.card-author {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.card-author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.card-author-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-fg);
  white-space: nowrap;
}

.card-reading {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.card-reading svg { flex-shrink: 0; }

.card-sep { opacity: 0.4; }

/* BREAKING badge on cards */
.badge-breaking {
  background: var(--breaking-red) !important;
  animation: blink-badge 2s ease-in-out infinite;
}

/* No-thumbnail placeholder */
.news-card-no-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary), var(--muted));
}

/* Horizontal card */
.news-card-h {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  transition: background 0.2s;
}

.news-card-h:hover { background: var(--surface-hover); }

.news-card-h img {
  width: 128px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .news-card-h img { width: 112px; height: 80px; }
}

.news-card-h .content { flex: 1; min-width: 0; }

.news-card-h .cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.news-card-h h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--fg);
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.news-card-h:hover h3 { color: var(--primary); }

.news-card-h .meta {
  font-size: 0.75rem;
  color: var(--muted-fg);
  margin-top: 0.375rem;
}

/* ===== LATEST LIST ===== */
.latest-list {
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

/* ===== ARTICLE PAGE ===== */
.article-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  max-height: 600px;
  overflow: hidden;
  background: #000;
}

@media (min-width: 640px) {
  .article-hero { aspect-ratio: 21/9; max-height: 500px; }
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, 
    rgba(0,0,0,0.9) 0%, 
    rgba(0,0,0,0.6) 50%, 
    rgba(0,0,0,0.3) 100%
  );
  z-index: 1;
}

.article-hero .content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

@media (min-width: 640px) {
  .article-hero .content { padding: 0 1.5rem 2rem; }
}

.article-hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin: 0.5rem 0;
  line-height: 1.15;
  text-shadow: 0 2px 15px rgba(0,0,0,0.6);
  letter-spacing: -0.02em;
}

@media (min-width: 640px) { .article-hero h1 { font-size: 2.25rem; } }

.article-body {
  max-width: 768px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

@media (min-width: 640px) {
  .article-body { padding: 2rem 1.5rem; }
}

/* Single post: allow 3-column layout (left/share + article + right/ad) */
@media (min-width: 1200px) {
  body.single-post .article-body {
    max-width: 1280px;
  }
}

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

.article-meta-bar .meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
}

.share-btn {
  padding: 0.75rem;
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: none;
  border: none;
  color: var(--muted-fg);
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover { background: var(--secondary); }

.share-btn svg {
  width: 20px; height: 20px;
  stroke: currentColor; fill: none;
  stroke-width: 2;
}
.article-content {
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.article-content p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--fg);
  opacity: 1;
  margin-bottom: 1.25rem;
}

.article-content p:first-child {
  font-size: 1.25rem;
  opacity: 1;
  color: var(--fg);
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content li {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--muted-fg);
  font-size: 1.25rem;
  line-height: 1.8;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

.back-link:hover { text-decoration: underline; }

.back-link svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 2;
}

.related-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .related-section { padding: 2.5rem 1.5rem; }
}

.related-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  margin-top: 4rem;
}

.footer-inner {
  padding: 3rem 0;
}

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

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
}

.footer-brand .logo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: white;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 0.5rem; }

.footer-col ul a {
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col ul a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination a {
  background: var(--secondary);
  color: var(--secondary-fg);
}

.pagination a:hover {
  background: var(--primary);
  color: var(--primary-fg);
}

.pagination .current {
  background: var(--primary);
  color: var(--primary-fg);
}

/* ===== UTILITIES ===== */
.section { padding: 2.5rem 0; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

/* =====================================================
   SITEWIDE AD RAILS (left/right 160x600)
   ===================================================== */
.site-rail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.site-rail-content {
  min-width: 0;
}

.site-rail {
  display: none;
  width: 160px;
  min-width: 160px;
  height: fit-content;
  position: sticky;
  top: 80px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px -18px rgba(0,0,0,0.18);
  contain: layout paint;
}

.site-rail::before {
  content: "Sponsored";
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-fg);
  font-family: var(--font-ui);
}

.rail-widget {
  width: 160px;
  min-height: 600px;
}

.rail-widget.rail-empty {
  min-height: 0;
  display: none;
}

/* =====================================================
   MOBILE STICKY AD (bottom)
   ===================================================== */
.mobile-sticky-ad {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 9997;
  width: min(360px, calc(100vw - 20px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.1);
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mobile-sticky-ad.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mobile-sticky-ad-inner {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.mobile-sticky-ad-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-fg);
  font-family: var(--font-ui);
}

.mobile-sticky-ad-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--secondary);
  color: var(--muted-fg);
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.mobile-sticky-ad-close:hover { color: var(--fg); background: var(--surface-hover); }

/* Reserve space and prevent overflow from network markup */
.mobile-sticky-ad-widget {
  width: 320px;
  max-width: 100%;
  min-height: 100px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Only show on mobile/tablet */
@media (min-width: 1024px) {
  .mobile-sticky-ad { display: none !important; }
}

/* Desktop rails on large screens only */
@media (min-width: 1200px) {
  .site-rail-layout.has-left-rail.has-right-rail {
    grid-template-columns: 160px minmax(0, 1fr) 160px;
  }

  .site-rail-layout.has-left-rail:not(.has-right-rail) {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .site-rail-layout.has-right-rail:not(.has-left-rail) {
    grid-template-columns: minmax(0, 1fr) 160px;
  }

  .site-rail-layout.has-left-rail .site-rail-left,
  .site-rail-layout.has-right-rail .site-rail-right {
    display: block;
  }
}

/* Single post: 4-column layout (share + left rail + content + right rail) */
@media (min-width: 1200px) {
  .article-layout.has-left-rail.has-right-rail {
    grid-template-columns: 48px 160px minmax(0, 1fr) 160px;
    gap: 2rem;
    align-items: start;
  }

  .article-layout.has-left-rail:not(.has-right-rail) {
    grid-template-columns: 48px 160px minmax(0, 1fr);
    gap: 2rem;
  }

  .article-layout.has-right-rail:not(.has-left-rail) {
    grid-template-columns: 48px minmax(0, 1fr) 160px;
    gap: 2rem;
  }
}

@media (max-width: 1199px) {
  /* Rails never show on tablet/mobile to avoid squeezing reading width */
  .site-rail { display: none !important; }
}

/* WordPress alignment */
.alignleft { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin: 1rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: var(--muted-fg); margin-top: 0.5rem; }

@media (max-width: 640px) {
  .alignleft, .alignright {
    float: none;
    margin: 1.5rem auto;
    display: block;
    text-align: center;
  }
}

/* =====================================================
   READING PROGRESS BAR
   ===================================================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.reading-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #06b6d4 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.1s linear;
  border-radius: 0 2px 2px 0;
  will-change: transform;
}

/* =====================================================
   LOGO — Updated to newspaper icon style
   ===================================================== */
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.footer-logo-text {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
}

/* ===== RSS Follow Button (header) ===== */
.rss-follow-btn {
  display: none;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-ui);
  background: var(--primary);
  color: #fff !important;
  border-radius: 9999px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.rss-follow-btn:hover { opacity: 0.85; }

@media (min-width: 1024px) {
  .rss-follow-btn { display: flex; }
}

.follow-label { font-size: 0.8125rem; }

/* =====================================================
   BREAKING BADGE (article page)
   ===================================================== */
.breaking-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: var(--breaking-red);
  color: #fff;
  border-radius: 0.25rem;
  animation: blink-badge 2s ease-in-out infinite;
}

@keyframes blink-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* =====================================================
   BREADCRUMBS
   ===================================================== */
.article-breadcrumbs {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.625rem 0;
}

.breadcrumb-nav {
  display: block;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
}

.breadcrumb-item a {
  color: var(--muted-fg);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item a:hover { color: var(--primary); }

.breadcrumb-item.current {
  color: var(--fg);
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .breadcrumb-item.current { max-width: 340px; }
}

.breadcrumb-sep {
  color: var(--muted-fg);
  font-size: 0.75rem;
}

/* =====================================================
   ARTICLE LAYOUT (two-column: share sidebar + content)
   ===================================================== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  position: relative;
}

@media (min-width: 1100px) {
  .article-layout {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }
}

/* =====================================================
   SOCIAL SHARE SIDEBAR (desktop — left floating)
   ===================================================== */
.social-share-sidebar {
  display: none;
  position: sticky;
  top: 100px;
  height: fit-content;
  opacity: 0;
  transition: opacity 0.3s;
}

@media (min-width: 1100px) {
  .social-share-sidebar { display: block; }
}

.share-sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.share-label {
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: var(--font-ui);
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.share-icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  color: var(--secondary-fg);
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.share-icon-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.share-x:hover      { background: #000; color: #fff; border-color: #000; }
.share-fb:hover     { background: #1877F2; color: #fff; border-color: #1877F2; }
.share-li:hover     { background: #0A66C2; color: #fff; border-color: #0A66C2; }
.share-reddit:hover { background: #FF4500; color: #fff; border-color: #FF4500; }
.share-copy:hover   { background: var(--primary); color: #fff; border-color: var(--primary); }

/* =====================================================
   AUTHOR BYLINE (top of article)
   ===================================================== */
.author-byline {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .author-byline {
    gap: 0.75rem;
  }
  .author-byline-info {
    flex: 1;
    min-width: 0;
  }
  .author-byline-name {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
  }
  .direct-share-buttons {
    width: 100%;
    margin-left: 0 !important;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    justify-content: flex-start;
  }
}

.author-byline-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}


.author-byline-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
}

.author-byline-info { 
  flex: 1; 
  min-width: 0; 
}

.author-byline-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.author-byline-label {
  color: var(--muted-fg);
  font-size: 0.875rem;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  visibility: hidden; /* Hide to prevent interaction while closed */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mobile-nav.active { 
  transform: translateX(0); 
  visibility: visible;
}

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

.mobile-nav-logo img {
  height: 32px;
  width: auto;
}

.mobile-nav-close {
  background: none;
  border: none;
  color: var(--fg);
  padding: 0.5rem;
  cursor: pointer;
}

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

.mobile-nav-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted-fg);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem;
  background: var(--secondary);
  border-radius: 0.75rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mobile-nav-item svg {
  margin-left: auto;
  color: var(--muted-fg);
}

.mobile-nav-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.mobile-social-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.mobile-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: var(--secondary);
  border-radius: 0.75rem;
  color: var(--fg);
}

.author-byline-name {
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s;
}

.author-byline-name:hover { color: var(--primary); }

.editorial-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-left: 8px;
  vertical-align: middle;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.editorial-badge svg {
  flex-shrink: 0;
}

.article-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--muted-fg);
}

.meta-sep { opacity: 0.5; }

.article-reading-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.article-updated { font-style: italic; }

.direct-share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-btn-mobile,
.share-wa,
.share-tg,
.share-threads-direct,
.share-bsky-direct,
.share-fb-direct,
.share-x-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; /* Fitts' Law: 48px minimum touch target */
  height: 48px; /* Fitts' Law: 48px minimum touch target */
  padding: 10px;
  border-radius: 10px;
  background: var(--muted);
  border: 1px solid var(--border);
  color: var(--muted-fg);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  text-decoration: none;
}

/* Ensure direct share buttons in byline meet 48px Fitts' Law minimum */
.direct-share-buttons .share-fb,
.direct-share-buttons .share-x {
    width: 48px !important;
    height: 48px !important;
}

.share-wa:hover { background: #25D366; color: #fff; border-color: #25D366; }
.share-tg:hover { background: #0088cc; color: #fff; border-color: #0088cc; }
.share-threads-direct:hover,
.share-threads:hover { background: #000; color: #fff; border-color: #000; }
.share-bsky-direct:hover,
.share-bsky:hover { background: #0085ff; color: #fff; border-color: #0085ff; }
.share-ig:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #fff; border-color: transparent; }
.share-btn-mobile:hover { background: var(--secondary); color: var(--fg); }

.share-btn-mobile svg,
.share-wa svg,
.share-tg svg,
.share-threads-direct svg,
.share-bsky-direct svg { 
  display: block; 
}
.share-btn-mobile svg {
  stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

@media (min-width: 1100px) {
  .direct-share-buttons { display: none; }
}

/* =====================================================
   AI DISCLOSURE BADGE
   ===================================================== */
.ai-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted-fg);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.ai-disclosure svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  stroke: var(--primary);
}

.ai-disclosure strong { color: var(--fg); }

/* =====================================================
   ARTICLE TAGS
   ===================================================== */
.article-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.tags-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-fg);
  font-family: var(--font-ui);
  margin-right: 0.25rem;
}

.article-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--secondary);
  color: var(--secondary-fg);
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.article-tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.article-tag-cat {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* =====================================================
   MOBILE SHARE BAR (inline below article)
   ===================================================== */
.mobile-share-bar {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.mobile-share-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-fg);
  font-family: var(--font-ui);
  display: block;
  margin-bottom: 0.75rem;
}

.mobile-share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.mobile-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-ui);
  background: var(--secondary);
  color: var(--secondary-fg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-share-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (min-width: 1100px) {
  .mobile-share-bar { display: none; }
}

/* =====================================================
   MOBILE FLOATING SHARE BAR (fixed bottom)
   ===================================================== */
.mobile-floating-share {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translate(-50%, 120px);
  opacity: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
}

.floating-share-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  color: var(--secondary-fg);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.floating-share-btn:hover { background: var(--primary); color: #fff; }

@media (min-width: 1100px) {
  .mobile-floating-share { display: none; }
}



/* =====================================================
   AUTHOR CARD (bottom of article)
   ===================================================== */
.author-card {
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  margin-top: 2.5rem;
}

.author-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.author-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
  flex-shrink: 0;
}

.author-card-info { flex: 1; }

.author-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.author-card-name {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--fg);
  font-family: var(--font-ui);
  text-decoration: none;
  transition: color 0.2s;
}

.author-card-name:hover { color: var(--primary); }

.author-card-title {
  font-size: 0.8125rem;
  color: var(--muted-fg);
  margin-top: 0.2rem;
}

.author-card-bio {
  font-size: 0.9375rem;
  color: var(--muted-fg);
  line-height: 1.7;
  margin-top: 0.75rem;
}

.author-card-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.author-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.author-card-link:hover { opacity: 0.75; text-decoration: underline; }

.author-card-social {
  color: var(--muted-fg);
}

.author-card-social:hover { color: var(--primary); opacity: 1; }

/* =====================================================
   SITE FOOTER (PREMIUM OPTIMIZED)
   ===================================================== */
.site-footer {
  background: #000;
  color: var(--footer-fg);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
}



.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

.footer-brand .footer-logo { 
  margin-bottom: 1.5rem; 
  display: block;
}
.footer-logo .custom-logo {
  max-height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}
@media (max-width: 639px) {
  .footer-brand .footer-logo {
    display: flex;
    justify-content: center;
  }
  .footer-logo .custom-logo {
    max-height: 40px;
  }
}
.footer-tagline { font-size: 0.9375rem; line-height: 1.6; margin-bottom: 1.5rem; opacity: 0.7; }

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.875rem;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col-title {
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a {
  color: var(--footer-fg);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-bottom-left { flex: 1; min-width: 300px; }
.copyright { color: #fff; font-size: 0.875rem; margin-bottom: 0.25rem; }
.footer-disclosure { font-size: 0.75rem; opacity: 0.5; }

.footer-social-wrap {
  display: flex;
  gap: 0.75rem;
}

.footer-social-link {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-4px) rotate(8deg);
}

/* =====================================================
   ARTICLE MAIN COL
   ===================================================== */
.article-main-col { min-width: 0; }

/* =====================================================
   DARK MODE — additional overrides
   ===================================================== */

/* Ensure header is fully opaque in dark mode — prevents bleed-through on article images */
.dark .site-header {
  background: var(--nav-bg);
}



.dark .author-card {
  background: var(--card);
}

.dark .ai-disclosure {
  background: var(--card);
}

.dark .mobile-share-bar {
  background: var(--card);
}


/* Dark mode: keep article-note-card from defaulting to white via --card-bg fallback */
.dark .article-note-card,
.dark .trust-section-card,
.dark .trust-highlight-card {
  background: var(--card-bg);
  border-color: var(--border);
}

/* =====================================================
   TRUST / AUTHOR / TRANSPARENCY MODULES
   ===================================================== */
.trust-hero {
  padding: 2.25rem 0 1.5rem;
  background: transparent;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  position: relative;
  overflow: hidden;
}

.trust-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.04), transparent 50%);
  pointer-events: none;
}

.dark .trust-hero::before {
  background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.06), transparent 50%);
}

.trust-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  gap: 2rem;
  align-items: center;
}

.trust-eyebrow {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.dark .trust-eyebrow {
  background: rgba(96, 165, 250, 0.12);
}

.trust-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

.trust-lede {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted-fg);
  max-width: 48rem;
}

.article-summary-deck {
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 58rem;
  margin-top: 1rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  opacity: 0.95;
}

.trust-highlight-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  padding: 1.25rem;
}

.trust-highlight-card h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg);
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  padding-bottom: 0.5rem;
}

.trust-highlight-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted-fg);
  font-size: 0.95rem;
}

.trust-highlight-card li {
  margin-bottom: 0.55rem;
}

.trust-section-wrap {
  padding: 2.5rem 0 4rem;
}

.trust-sections {
  display: grid;
  gap: 1.5rem;
}

.trust-section-card p,
.article-note-card p {
  color: var(--muted-fg);
  line-height: 1.75;
  margin-bottom: 0.85rem;
}

.trust-section-card,
.article-note-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  padding: 1.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.trust-section-card:hover,
.article-note-card:hover {
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.trust-section-card h2,
.article-note-card h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.trust-section-card ul,
.article-note-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted-fg);
}

.trust-section-card li,
.article-note-card li {
  margin-bottom: 0.55rem;
}


.article-transparency-stack {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.article-note-card-warning {
  border-color: rgba(209, 47, 47, 0.22);
  background: rgba(209, 47, 47, 0.04);
}



.author-profile-page .author-hero {
  padding: 3.5rem 0 2rem;
}

.author-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
}

.author-identity {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.author-hero-avatar {
  width: 144px;
  height: 144px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.85);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.author-role,
.topic-hub-count {
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.85rem;
}

.author-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.author-socials a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.author-card-meta {
  opacity: 0.8;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .trust-hero-grid,
  .author-hero-grid {
    grid-template-columns: 1fr;
  }

  .author-identity {
    flex-direction: column;
  }

  .author-hero-avatar {
    width: 112px;
    height: 112px;
  }
}

/* =====================================================
   PAGINATION (UI/UX Pro Max)
   ===================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3.5rem 0;
  width: 100%;
}

.pagination .page-numbers,
.pagination ul {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none !important;
  padding: 0;
  margin: 0;
}

.pagination li {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: inline-flex;
}

.pagination a.page-numbers,
.pagination span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 0.8rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-ui);
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-fg);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.pagination a.page-numbers:hover {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--fg);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.05);
}

.pagination span.page-numbers.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.dark .pagination span.page-numbers.current {
  box-shadow: 0 4px 10px rgba(96, 165, 250, 0.15);
}

.pagination .dots {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  min-width: unset;
  padding: 0 0.5rem;
  color: var(--muted-fg);
}

/* =============================================
   LANGUAGE SWITCHER
   ============================================= */

/* Globe button in header */
.lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-current-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-family: var(--font-ui);
  line-height: 1;
}

/* ── Language Panel Overlay ── */
.lang-panel {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lang-panel.open {
  opacity: 1;
  visibility: visible;
}

.lang-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Panel Inner Card ── */
.lang-panel-inner {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 94%;
  max-width: 800px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.05);
  transform: translateY(40px); /* More dramatic entrance */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.lang-panel.open .lang-panel-inner {
  transform: translateY(0) scale(1);
}

/* ── Panel Header ── */
.lang-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.lang-panel-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-family: var(--font-ui);
}

.lang-panel-header h2 svg {
  stroke: var(--primary);
  flex-shrink: 0;
}

.lang-panel-close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-fg);
  transition: all 0.2s;
  flex-shrink: 0;
}

.lang-panel-close:hover {
  background: var(--secondary);
  color: var(--fg);
  border-color: var(--border);
}

/* ── Search ── */
.lang-search-wrap {
  padding: 14px 24px 8px;
  position: relative;
  flex-shrink: 0;
}

.lang-search-icon {
  position: absolute;
  left: 38px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-fg);
  pointer-events: none;
}

.lang-search-input {
  width: 100%;
  padding: 12px 14px 12px 40px; /* Slightly more padding for touch */
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--secondary);
  color: var(--fg);
  font-size: 16px; /* FIXED: Prevents iOS auto-zoom (min 16px required) */
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.lang-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary), 0.12);
}

.lang-search-input::placeholder { color: var(--muted-fg); }

/* ── Reset / English Button ── */
.lang-reset-wrap {
  padding: 4px 24px 10px;
  flex-shrink: 0;
}

.lang-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--secondary);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s;
}

.lang-reset-btn:hover,
.lang-reset-btn.active-lang {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Language Grid ── */
.lang-grid-wrap {
  overflow-y: auto;
  flex: 1;
  padding: 4px 24px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.lang-grid-wrap::-webkit-scrollbar { width: 5px; }
.lang-grid-wrap::-webkit-scrollbar-track { background: transparent; }
.lang-grid-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 7px;
}

/* ── Language Card ── */
.lang-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px; /* INCREASED: Better touch target */
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--secondary);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
  font-family: var(--font-sans);
  min-height: 48px; /* Standard touch height */
}

.lang-btn:hover {
  border-color: var(--primary);
  background: var(--card);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.lang-btn.active-lang {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.lang-btn.lang-hidden {
  display: none;
}

.lang-flag {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.lang-info {
  min-width: 0;
  flex: 1;
}

.lang-native {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.lang-btn.active-lang .lang-native { color: #fff; }

.lang-english {
  display: block;
  font-size: 10px;
  color: var(--muted-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-top: 1px;
}

.lang-btn.active-lang .lang-english { color: rgba(255,255,255,0.75); }

/* No results */
.lang-no-results {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
  color: var(--muted-fg);
  font-size: 14px;
}

/* ── Suppress Google Translate default UI ── */
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight {
  display: none !important;
  visibility: hidden !important;
}

body { top: 0 !important; }

.skiptranslate { display: none !important; }

/* ── Mobile ── */
@media (max-width: 639px) {
  .lang-panel-inner {
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    align-self: flex-end;
    transform: translateY(100%);
  }

  .lang-panel.open .lang-panel-inner {
    transform: translateY(0);
  }

  .lang-panel {
    align-items: flex-end;
  }

  .lang-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .lang-panel-header { padding: 16px 18px 12px; }
  .lang-search-wrap { padding: 10px 18px 6px; }
  .lang-reset-wrap { padding: 4px 18px 8px; }
  .lang-grid-wrap { padding: 4px 18px 20px; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .lang-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* Ad sidebar */
.article-ad-sidebar {
    position: sticky;
    top: 80px;
    width: 300px;
    min-width: 0;
}

.article-ad-sidebar .sidebar-widget {
    margin-bottom: 20px;
}

/* Mobile — sidebar-ը թաքցնել */
@media (max-width: 1099px) {
    .article-ad-sidebar {
        display: none;
    }
}

/* Site rails: avoid horizontal overflow if an ad injects wide markup */
.site-rail,
.rail-widget,
.site-rail-content {
  max-width: 100%;
  overflow: hidden;
}

/* =====================================================
   CONTEXTUAL TOOLTIPS
   ===================================================== */
.thepressusa-tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted var(--fg);
  cursor: help;
  color: inherit;
}

.thepressusa-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 8px 12px;
  width: max-content;
  max-width: 250px;
  background-color: var(--fg);
  color: var(--bg);
  font-size: 0.85rem;
  line-height: 1.4;
  border-radius: 4px;
  white-space: normal;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.thepressusa-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 2px;
  border-width: 6px;
  border-style: solid;
  border-color: var(--fg) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  pointer-events: none;
}

.thepressusa-tooltip:hover::after,
.thepressusa-tooltip:focus::after,
.thepressusa-tooltip:hover::before,
.thepressusa-tooltip:focus::before {
  opacity: 1;
  visibility: visible;
}

/* =====================================================
   SEARCH UX ENHANCEMENTS
   ===================================================== */
.search-results.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.search-results.loading::after {
    content: '';
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: search-spin 0.6s linear infinite;
}

@keyframes search-spin {
    to { transform: translateX(-50%) rotate(360deg); }
}

.search-result-item.selected {
    background: var(--bg-hover);
    border-color: var(--primary);
    outline: 2px solid var(--primary);
}

.search-result-title mark {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}

.search-result-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.story-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.search-result-item.is-story {
    border-left: 3px solid var(--primary);
}

/* =====================================================
   ACCESSIBILITY & SEO EXTRAS
   ===================================================== */
.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;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link:focus {
  background-color: var(--primary);
  color: var(--primary-fg);
  clip: auto !important;
  clip-path: none;
  display: block;
  font-size: 1rem;
  font-weight: 700;
  height: auto;
  left: 10px;
  line-height: normal;
  padding: 15px 23px 14px;
  position: fixed;
  top: 10px;
  text-decoration: none;
  width: auto;
  z-index: 100000;
}


/* =====================================================
   MOBILE HORIZONTAL SCROLL FIXES (Bug Report 06.05.2026)
   ===================================================== */

/* TASK 8: Global box-sizing fix (catch-all for padding/border overflow) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* TASK 2: Body & HTML horizontal overflow */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

/* TASK 3: Article Share Buttons row overflow */
.direct-share-buttons,
.share-sidebar-inner,
.mobile-share-links,
.share-buttons,
.social-share,
.post-share-row,
.share-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: hidden;
}

/* TASK 4: Article Hero Image fixed width */
img,
.post-thumbnail img,
.article-featured-image img,
.entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* TASK 5, 6, 7: Responsive / Mobile Media Query Overrides */
@media (max-width: 768px) {
  /* TASK 5: Navigation bar mobile collapse */
  .header-social-icons {
    display: none;
  }
  .site-header {
    overflow: hidden;
    max-width: 100vw;
  }
  .nav-menu {
    flex-wrap: wrap;
    overflow: hidden;
  }

  /* TASK 6: Homepage Card Grid fixed column widths */
  .trending-grid,
  .latest-stories-grid,
  .card-grid,
  .posts-grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }
  .post-card,
  .story-card {
    width: 100%;
    min-width: unset;
    max-width: 100%;
  }

}

/* TASK 9: AdSense / Ad blocks fixed width */
ins.adsbygoogle,
.ad-container,
.advertisement {
  max-width: 100% !important;
  overflow: hidden;
}

/* Extra: Shorten share button labels on small mobile views */
@media (max-width: 480px) {
  .mobile-share-btn {
    font-size: 0;
    padding: 0.5rem;
    justify-content: center;
  }
  .mobile-share-btn svg {
    margin: 0;
  }
}

/* Touch Targets for Mobile */
@media (max-width: 768px) {
  .mobile-share-btn, 
  .header-btn, 
  .search-tag,
  .share-icon-btn {
    min-height: 48px;
    min-width: 48px;
  }
}

/* ===== Floating Share Bar & Copy Feedback ===== */
.mobile-floating-share {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 100px);
  z-index: 2500;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px 12px;
  border-radius: 20px;
  display: flex;
  gap: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: none;
}

.dark .mobile-floating-share {
  background: rgba(30, 30, 35, 0.8);
  border-color: rgba(255, 255, 255, 0.05);
}

.mobile-floating-share.visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.floating-share-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  color: var(--fg);
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
  text-decoration: none;
}

.floating-share-btn:active {
  transform: scale(0.9);
}

/* Success State for Copy */
.copied {
  background: #10B981 !important;
  color: white !important;
  border-color: #10B981 !important;
}

/* Brand Colors */
.share-fb { background: #1877F2 !important; color: #fff !important; border: none !important; }
.share-x { background: #000 !important; color: #fff !important; border: none !important; }
.dark .share-x { background: #fff !important; color: #000 !important; }
.share-wa { background: #25D366 !important; color: #fff !important; border: none !important; }
.share-tg { background: #0088cc !important; color: #fff !important; border: none !important; }

/* ===== PHASE 2: Mobile-First UX & Tactile Feedback ===== */

/* Action 2: Instant tactile feedback on touch/click — covers ALL interactive surfaces */
a:active,
button:active,
.header-btn:active,
.main-nav a:active,
.mobile-nav a:active,
.mobile-nav-item:active,
.footer-social-link:active,
.search-tag:active,
.share-icon-btn:active,
.mobile-share-btn:active,

.pagination a.page-numbers:active,
.article-tag:active,
.floating-share-btn:active,
.lang-btn:active,
.story-item:active,
.news-card:active,
.hero-cta:active,
.share-btn-mobile:active,
.share-wa:active,
.share-tg:active,
.share-threads-direct:active,
.share-bsky-direct:active,
.share-fb-direct:active,
.share-x-direct:active {
  opacity: 0.7;
  transform: scale(0.96) !important;
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.1s ease;
}

/* Action 3: Premium Web Story Desktop Background — cinematic dark scrim */
@media (min-width: 1024px) {
  .story-player-overlay {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(40px) !important;
    -webkit-backdrop-filter: blur(40px) !important;
  }
}

/* ===== PHASE 3: AdSense CLS Prevention ===== */

/* Reserve exact slot dimensions to achieve CLS = 0 when AdSense loads */
.ad-slot-leaderboard {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem auto;
    min-height: 90px; /* Reserve height for 728x90 desktop banner */
    width: 100%;
    max-width: 728px;
    contain: layout style; /* Isolate reflow to slot boundary */
}
@media (max-width: 767px) {
    .ad-slot-leaderboard {
        min-height: 250px; /* Reserve height for 300x250 mobile banner */
        max-width: 300px;
    }
}

/* ===== PHASE 3: AEO Extractability Blocks ===== */

/* ── TL;DR Block: Editorial sidebar style ── */
.tpu-tldr {
  display: none !important;
  position: relative;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 1.75rem 1.5rem 1.5rem;
  margin: 2.5rem 0;
  border-radius: 0 0.75rem 0.75rem 0;
  font-family: var(--font-ui);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  line-height: 1.7;
}
.tpu-tldr::before {
  content: '⚡ TL;DR';
  display: block;
  font-weight: 800;
  color: var(--primary);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  font-family: var(--font-ui);
}
.tpu-tldr p { color: var(--fg); opacity: 0.88; font-size: 1rem; }
.tpu-tldr p:last-child { margin-bottom: 0; }
.tpu-tldr ul, .tpu-tldr ol { padding-left: 1.25rem; color: var(--fg); opacity: 0.88; }
.tpu-tldr li { margin-bottom: 0.4rem; }

.dark .tpu-tldr {
  background: hsl(222, 25%, 10%);
  border-color: hsl(222, 20%, 18%);
  border-left-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ── Stats Block: HIDDEN (Key Figures removed) ── */
.tpu-stats { display: none !important; }

/* ── FAQ Block: Distinct Q&A editorial hierarchy ── */
.tpu-faq {
  margin: 2.5rem 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.tpu-faq::before {
  content: '❓ Frequently Asked Questions';
  display: block;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-fg);
  font-family: var(--font-ui);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.tpu-faq dt {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--fg);
  margin-top: 1.25rem;
  padding: 0.75rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.tpu-faq dt::before {
  content: 'Q:';
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-ui);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.tpu-faq dd {
  margin: 0.75rem 0 0 0;
  padding-left: 1.75rem;
  color: var(--muted-fg);
  line-height: 1.7;
  font-size: 0.9375rem;
}
.dark .tpu-faq {
  background: var(--card);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Dynamic Footer Legal Links Menu Styling */
.footer-legal-links ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.footer-legal-links ul li {
  margin: 0;
}
.footer-legal-links ul a {
  color: var(--primary);
  text-decoration: underline;
  font-size: 0.75rem;
  font-weight: 500;
}

/* =====================================================
   SENIOR READABILITY & NARRATIVE LAYOUT SYSTEM
   ===================================================== */
#article-story-content {
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  max-width: 660px;
  margin: 0 auto;
}

#article-story-content p {
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 22px !important;
  line-height: 1.85 !important;
  color: var(--fg) !important;
  opacity: 0.95 !important;
  margin-bottom: 1.6rem !important;
}

@media (min-width: 768px) {
  #article-story-content p {
    font-size: 24px !important;
  }
}

#article-story-content p:first-child {
  font-size: 24.2px !important; /* 22px * 1.1 */
  font-weight: 500;
  opacity: 1 !important;
}

@media (min-width: 768px) {
  #article-story-content p:first-child {
    font-size: 26.4px !important; /* 24px * 1.1 */
  }
}

/* Ensure list items and blockquotes scale too */
#article-story-content li,
#article-story-content blockquote {
  font-family: Georgia, serif;
  font-size: 22px !important;
  line-height: 1.85 !important;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  #article-story-content li,
  #article-story-content blockquote {
    font-size: 24px !important;
  }
}

#article-story-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  font-style: italic;
  opacity: 0.85;
}

#article-story-content h2 {
  font-size: 29.7px !important; /* 22px * 1.35 */
  line-height: 1.2 !important;
  margin-top: 2.2rem !important;
  margin-bottom: 1.1rem !important;
}

@media (min-width: 768px) {
  #article-story-content h2 {
    font-size: 32.4px !important; /* 24px * 1.35 */
  }
}

#article-story-content h3 {
  font-size: 26.4px !important; /* 22px * 1.2 */
  line-height: 1.2 !important;
  margin-top: 1.8rem !important;
  margin-bottom: 0.9rem !important;
}

@media (min-width: 768px) {
  #article-story-content h3 {
    font-size: 28.8px !important; /* 24px * 1.2 */
  }
}

/* Senior Facebook Share Button */
.senior-fb-share-block {
  margin: 3.5rem auto;
  text-align: center;
  max-width: 660px;
  padding: 0 1rem;
}

.senior-fb-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 56px; /* Enhanced touch target */
  padding: 1rem 1.75rem;
  font-family: var(--font-ui);
  font-size: 1.125rem;
  font-weight: 700;
  color: #FFFFFF !important;
  background: #1877F2; /* Facebook Blue */
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.3);
  transition: all 0.2s ease;
  text-decoration: none;
}

.senior-fb-share-btn:hover {
  background: #1565C0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.senior-fb-share-btn:active {
  transform: translateY(0);
}

.senior-fb-share-btn svg {
  fill: currentColor;
  width: 24px;
  height: 24px;
}

/* Story Part Navigation */
.story-part-navigation {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 3.5rem auto;
  max-width: 660px;
  padding: 0 1rem;
}

.story-part-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 80px; /* Highly comfortable click target for seniors */
  text-align: center;
}

/* Pulsing animation for story part navigation button */
@keyframes tpu-pulse {
  0% {
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.25);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.45);
    transform: scale(1.015);
  }
  100% {
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.25);
    transform: scale(1);
  }
}

.story-part-next {
  background: var(--primary);
  color: var(--primary-fg);
  border: 1px solid var(--primary);
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.25);
  animation: tpu-pulse 2.5s infinite ease-in-out;
}

.story-part-next:hover {
  background: #1565C0;
  border-color: #1565C0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.35);
}

.story-part-prev {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border);
}

.story-part-prev:hover {
  background: var(--secondary);
  border-color: var(--border);
  transform: translateY(-2px);
}

.story-part-btn:active {
  transform: translateY(0);
}

.story-part-btn span {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.375rem;
}

.story-part-btn strong {
  font-family: var(--font-ui);
  font-size: 1.125rem;
  font-weight: 700;
}

.story-part-next strong {
  color: #FFFFFF;
}

.story-part-prev strong {
  color: var(--fg);
}

/* ===== SENIOR ACCESSIBILITY & CONTRAST UPGRADES ===== */
.article-content {
  font-family: var(--font-serif);
  font-size: 1.25rem; /* Senior legibility (approx 20px) */
  line-height: 1.8;
  color: var(--fg);
}

.article-content p {
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--fg);
}

/* Touch targets enhancement for senior demographics */
button, 
.header-btn, 
.mobile-nav-close, 
.mobile-sticky-ad-close,
#theme-toggle, 
#menu-toggle,
.floating-share-btn,
.search-close,
.lang-panel-close {
  min-height: 48px;
  min-width: 48px;
}

/* Tactile mobile feedback transitions */
button:active,
.header-btn:active,
.mobile-nav-close:active,
.mobile-sticky-ad-close:active,
#theme-toggle:active,
#menu-toggle:active,
.floating-share-btn:active,
.search-close:active,
.lang-panel-close:active,
.story-part-navigation:active {
  transform: scale(0.96) !important;
  transition: transform 0.1s ease-out !important;
}


/* Prevent layout shifts (CLS) on empty sponsored widgets */
.rail-widget.rail-empty {
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  display: none !important;
}
