/*
Theme Name: Oman22 Revenue Pro
Theme URI: https://oman22.com/
Author: Oman22
Description: RTL-first luxury editorial WordPress theme engineered for mobile perfection, Core Web Vitals, and maximum Google AdSense RPM & Active View viewability.
Version: 1.8.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: oman22-revenue-pro
*/

:root {
  --accent: #0867a7;
  --accent-dark: #062f4f;
  --accent-deep: #041f36;
  --gold: #d4943a;
  --gold-light: #f6e3ba;
  --ink: #112233;
  --muted: #5e7185;
  --line: #e3ebf3;
  --bg: #f3f6fa;
  --white: #ffffff;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 4px 16px rgba(10, 37, 64, 0.05);
  --shadow-md: 0 10px 30px rgba(10, 37, 64, 0.08);
  --max: 1400px;
  --article-font: 19px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Tajawal", "Noto Sans Arabic", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

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

button, input {
  font: inherit;
}

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

/* Reading Progress Bar (Boosts scroll engagement & ad impressions) */
.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  z-index: 10000;
  transition: width 0.1s linear;
}

/* Topbar */
.topbar {
  background: var(--accent-deep);
  color: #dbe7f3;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  gap: 12px;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 700;
}

.topbar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 148, 58, 0.25);
}

/* Luxury Site Header & Professional Logo */
.site-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 22px rgba(6, 47, 79, 0.06);
  position: sticky;
  top: 0;
  z-index: 990;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.custom-logo {
  max-height: 68px;
  width: auto;
  display: block;
}

/* Luxury Vector Brand Mark & Wordmark (Works on Desktop & Mobile) */
.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  direction: rtl;
  text-decoration: none;
  group: brand;
}

.brand-crest {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(145deg, #0b5d99 0%, #052c4a 65%, #031c30 100%);
  border: 1.5px solid rgba(212, 148, 58, 0.65);
  box-shadow: 0 6px 18px rgba(6, 47, 79, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-wordmark:hover .brand-crest {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(6, 47, 79, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

.brand-crest::before {
  content: "";
  position: absolute;
  top: -18px;
  left: -18px;
  width: 42px;
  height: 42px;
  background: radial-gradient(circle, rgba(212, 148, 58, 0.45) 0%, transparent 70%);
  pointer-events: none;
}

.crest-crown {
  width: 18px;
  height: 9px;
  fill: var(--gold);
  margin-bottom: 1px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.crest-num {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  background: linear-gradient(180deg, #ffffff 30%, #f3d194 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.crest-bar {
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin-top: 3px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-family: "Noto Kufi Arabic", "Tajawal", Tahoma, sans-serif;
  font-size: clamp(23px, 2.5vw, 30px);
  font-weight: 900;
  line-height: 1.2;
  color: var(--accent-dark);
  letter-spacing: -0.4px;
  white-space: nowrap;
}

.brand-name-highlight {
  color: var(--gold);
  font-weight: 900;
}

.brand-domain-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 7px;
  border-radius: 99px;
  background: linear-gradient(135deg, #fdf6e9, #f7e4c1);
  color: #8f5b14;
  border: 1px solid rgba(212, 148, 58, 0.4);
  direction: ltr;
  white-space: nowrap;
}

.brand-tagline {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin: 3px 0 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Header Actions (Search + Mobile Controls) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search-wrap {
  min-width: 0;
}

.header-search {
  display: flex;
  align-items: center;
  width: 310px;
  max-width: 100%;
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.header-search:focus-within {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 103, 167, 0.12);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 7px 14px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.header-search button {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: 0;
  padding: 7px 18px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.header-search button:hover {
  opacity: 0.92;
}

/* Mobile Action Buttons (Hidden on Desktop) */
.mobile-action-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f6f9fc;
  color: var(--accent-dark);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.mobile-action-btn.is-active,
.mobile-action-btn:hover {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

.mobile-action-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Expandable Mobile Search Drawer */
.mobile-search-drawer {
  display: none;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 10px 0 12px;
}

.mobile-search-drawer.is-open {
  display: block;
}

.mobile-search-drawer .header-search {
  width: 100%;
}

/* Navigation Bar */
.main-nav {
  background: linear-gradient(90deg, #062f4f 0%, #084877 50%, #062f4f 100%);
  color: #fff;
  border-bottom: 2px solid rgba(212, 148, 58, 0.45);
  box-shadow: 0 4px 14px rgba(5, 34, 56, 0.12);
}

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

.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 9px;
  padding: 7px 13px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  align-items: center;
  gap: 6px;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.main-nav li a {
  display: block;
  padding: 11px 16px;
  font-family: "Noto Kufi Arabic", "Tajawal", sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  color: #f0f6fc;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.main-nav li a:hover,
.main-nav li.current-menu-item > a,
.main-nav li.current-cat > a {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Breadcrumb / News Ticker */
.ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  margin: 14px 0 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-right: 4px solid var(--gold);
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.ticker strong {
  color: var(--accent-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

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

/* ==========================================================================
   AdSense Revenue Optimization & High-Viewability Containers
   ========================================================================== */
.ad-slot {
  width: 100%;
  margin: 18px auto;
  text-align: center;
  clear: both;
  position: relative;
  z-index: 1;
}

.ad-slot-inner {
  background: #ffffff;
  border: 1px solid #e6eef6;
  border-radius: 12px;
  padding: 8px 8px 10px;
  box-shadow: 0 2px 10px rgba(10, 37, 64, 0.03);
  overflow: visible;
}

.ad-label {
  display: block;
  font-size: 10.5px;
  color: #8c9bae;
  letter-spacing: 0.4px;
  margin-bottom: 5px;
  text-align: center;
  line-height: 1.2;
  user-select: none;
}

.ad-slot ins.adsbygoogle {
  display: block !important;
  margin-inline: auto;
  max-width: 100%;
}

.ad-slot-header {
  margin: 14px auto 16px;
  min-height: 90px;
}

.ad-slot-inarticle {
  margin: 26px auto;
  min-height: 250px;
}

.ad-slot-infeed {
  margin: 22px auto;
  min-height: 120px;
}

.ad-slot-sticky-sidebar {
  position: sticky;
  top: 84px;
  z-index: 10;
}

/* Mobile Sticky Bottom Anchor Fallback / Padding for AdSense Anchor Ads */
body {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   Main Grid Layout & Panels
   ========================================================================== */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 26px;
  align-items: start;
}

.main-column,
.panel,
.cards,
.post-card,
.article {
  min-width: 0;
}

.panel,
.article,
.sidebar .widget {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: 22px;
  margin-bottom: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Noto Kufi Arabic", "Tajawal", sans-serif;
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 850;
  line-height: 1.5;
  margin: 0 0 18px;
  padding-right: 14px;
  border-right: 5px solid var(--accent);
  color: var(--accent-dark);
}

/* Post Cards Grid */
.cards,
.featured-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(15, 38, 61, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd9e8;
}

.post-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #eef3f8, #e3ecf5);
  overflow: hidden;
  flex-shrink: 0;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card-media img {
  transform: scale(1.03);
}

.post-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 22px;
  font-weight: 900;
  color: #8fa8bf;
  background: linear-gradient(135deg, #edf4f9, #dbe8f3);
}

.post-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 16px 14px;
}

.post-card-category {
  margin-bottom: 6px;
}

.post-card-category a {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent);
  background: #eef6fc;
  padding: 3px 10px;
  border-radius: 99px;
}

.post-card h2,
.post-card h3 {
  font-family: "Noto Kufi Arabic", "Tajawal", sans-serif;
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.65;
  margin: 2px 0 9px;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.post-meta {
  font-size: 12px;
  color: #7b8c9e;
}

.read-more {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

.all-posts {
  text-align: center;
  margin: 20px 0 4px;
}

.all-posts a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 99px;
  box-shadow: 0 4px 14px rgba(8, 103, 167, 0.22);
}

.all-posts a:hover {
  color: #fff;
  opacity: 0.94;
}

/* ==========================================================================
   Single Article Styling (High Readability + AdSense Friendly)
   ========================================================================== */
.article {
  padding: clamp(18px, 3vw, 38px);
}

.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumbs a {
  color: var(--accent);
  font-weight: 700;
}

.article-title {
  font-family: "Noto Kufi Arabic", "Tajawal", sans-serif;
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 900;
  line-height: 1.55;
  color: var(--accent-dark);
  margin: 0 0 14px;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f6f9fc;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
}

.article-image {
  width: 100%;
  max-width: 860px;
  margin: 20px auto 24px;
  overflow: hidden;
  border-radius: 14px;
  background: #f0f4f8;
  border: 1px solid var(--line);
}

.article-image img,
.article-image .discover-featured {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  object-position: center;
}

.article-body {
  font-size: var(--article-font, 19px);
  line-height: 2.05;
  color: #16283a;
}

.article-body p {
  margin: 0 0 1.4em;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: "Noto Kufi Arabic", "Tajawal", sans-serif;
  color: var(--accent-dark);
  line-height: 1.55;
  margin: 1.6em 0 0.65em;
  font-weight: 850;
}

.article-body h2 {
  font-size: clamp(20px, 2.2vw, 25px);
  padding-right: 12px;
  border-right: 4px solid var(--gold);
}

.article-body h3 {
  font-size: clamp(18px, 1.9vw, 22px);
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

.article-body blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  background: #f4f8fc;
  border-right: 4px solid var(--accent);
  border-radius: 10px;
  font-weight: 600;
  color: var(--accent-dark);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  display: block;
  overflow-x: auto;
}

.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: right;
}

.article-body th {
  background: #f0f5fa;
  color: var(--accent-dark);
  font-weight: 800;
}

.article-body ul,
.article-body ol {
  padding-inline-start: 24px;
  margin: 0 0 1.4em;
}

.article-body li {
  margin-bottom: 0.5em;
}

/* Shortlink Box */
.oman22-shortlink,
.article-body .oman22-shortlink {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  clear: both;
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 30px 0 20px;
  padding: 16px 18px;
  border: 1px solid #cbe0f2;
  border-radius: 14px;
  background: linear-gradient(135deg, #f2f8fe, #e8f2fc);
}

.oman22-shortlink-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.oman22-shortlink-label strong {
  color: var(--accent-dark);
  font-size: 13.5px;
}

.oman22-shortlink-label a {
  color: var(--accent);
  direction: ltr;
  text-align: right;
  unicode-bidi: plaintext;
  font-weight: 700;
  text-decoration: none;
}

.oman22-copy-link {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 9px 18px;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(8, 103, 167, 0.2);
}

/* ==========================================================================
   Sidebar & Widgets
   ========================================================================== */
.sidebar .widget {
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar .widget-title,
.sidebar .widget h2 {
  font-family: "Noto Kufi Arabic", "Tajawal", sans-serif;
  font-size: 19px;
  font-weight: 850;
  margin: 0 0 16px;
  padding-right: 12px;
  border-right: 4px solid var(--accent);
  color: var(--accent-dark);
}

.sidebar-post-list {
  display: grid;
  gap: 0;
}

.sidebar-post {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  transition: transform 0.2s ease;
}

.sidebar-post:first-child {
  padding-top: 0;
}

.sidebar-post:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sidebar-post:hover {
  transform: translateX(-3px);
}

.sidebar-post-thumb {
  width: 112px;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background: #eff4f9;
  overflow: hidden;
  display: block;
}

.sidebar-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-post-info {
  min-width: 0;
}

.sidebar-post-info strong {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: "Noto Kufi Arabic", "Tajawal", sans-serif;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.65;
  color: var(--ink);
}

.sidebar-post-info small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 5px;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0 8px;
}

.pagination .page-numbers {
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 9px;
  font-weight: 700;
}

.pagination .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Footer */
.site-footer {
  margin-top: 44px;
  background: linear-gradient(180deg, #07253d 0%, #041829 100%);
  color: #d5e2ee;
  padding: 40px 0 28px;
  border-top: 3px solid var(--gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
  align-items: center;
}

.site-footer a {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 24px;
  padding-top: 16px;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

/* Accessibility & WordPress Core Classes */
.screen-reader-text {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.skip-link:focus {
  clip: auto;
  height: auto;
  width: auto;
  top: 10px;
  right: 10px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 10001;
}

.aligncenter { display: block; margin-inline: auto; }
.alignleft { float: left; margin: 0 15px 15px 0; }
.alignright { float: right; margin: 0 0 15px 15px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--muted); }
.sticky { border-top: 3px solid var(--gold); }

/* ==========================================================================
   Responsive & Mobile-First Refinements (Max AdSense Viewability & UX)
   ========================================================================== */
@media (max-width: 1120px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 20px;
  }
  .cards,
  .featured-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .topbar {
    display: none;
  }

  .container {
    width: min(calc(100% - 24px), var(--max));
  }

  .site-header .brand-row {
    padding: 9px 0;
    gap: 10px;
    min-height: 62px;
  }

  .brand-crest {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .crest-crown {
    width: 15px;
    height: 8px;
  }

  .crest-num {
    font-size: 19px;
  }

  .brand-name {
    font-size: 21px;
  }

  .brand-domain-pill {
    font-size: 9px;
    padding: 1.5px 6px;
  }

  .brand-tagline {
    font-size: 11px;
    margin-top: 1px;
  }

  .custom-logo {
    max-height: 48px;
  }

  /* Hide desktop inline search, show sleek mobile search & menu buttons */
  .header-search-wrap {
    display: none;
  }

  .mobile-action-btn {
    display: inline-flex;
  }

  /* Horizontal Quick-Scroll Category Bar + Collapsible Drawer on Mobile */
  .main-nav .nav-inner {
    padding: 5px 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .menu-toggle {
    display: none;
  }

  .main-nav ul {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding: 2px 0;
  }

  .main-nav ul::-webkit-scrollbar {
    display: none;
  }

  .main-nav li {
    flex: 0 0 auto;
  }

  .main-nav li a {
    padding: 7px 13px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
  }

  /* When user taps the mobile menu button, expand full vertical grid menu */
  .main-nav.is-expanded ul {
    flex-wrap: wrap;
    overflow-x: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 0;
  }

  .main-nav.is-expanded li a {
    border-radius: 10px;
    text-align: center;
    padding: 9px 10px;
  }

  .ticker {
    margin: 10px 0 12px;
    padding: 9px 12px;
    font-size: 12.5px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .panel {
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 16px;
  }

  .article {
    padding: 16px 15px;
    border-radius: 14px;
  }

  .article-title {
    font-size: clamp(22px, 5.8vw, 28px);
    line-height: 1.5;
  }

  .article-body {
    font-size: 18px;
    line-height: 1.98;
  }

  /* Full-bleed friendly AdSense slots on mobile for maximum CTR */
  .ad-slot-inner {
    padding: 6px 4px 8px;
    border-radius: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .cards,
  .featured-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Horizontal compact cards on mobile archive/home after first featured card for faster browsing & higher ad viewability */
  .cards:not(.featured-cards) .post-card {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: stretch;
  }

  .cards:not(.featured-cards) .post-card-media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 112px;
  }

  .cards:not(.featured-cards) .post-card-content {
    padding: 11px 12px;
  }

  .cards:not(.featured-cards) .post-card h2,
  .cards:not(.featured-cards) .post-card h3 {
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    margin: 2px 0 6px;
  }

  .cards:not(.featured-cards) .post-card p {
    display: none;
  }

  .cards:not(.featured-cards) .post-card-bottom {
    padding-top: 6px;
  }
}

@media (max-width: 370px) {
  .brand-domain-pill {
    display: none;
  }
  .brand-name {
    font-size: 19px;
  }
  .cards:not(.featured-cards) .post-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
