/* ============================================================
   QURUM.NET — Main Design System
   Dark bilingual news platform — UAE/GCC/MENA
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&family=Cairo:wght@300;400;600;700;900&display=swap');

/* ── CSS Variables ── */
:root {
  /* Backgrounds */
  --bg-primary:    #0f0f1a;
  --bg-secondary:  #1a1a2e;
  --bg-card:       #16213e;
  --bg-card-hover: #1c2a4a;
  --navy:          #0a0a1a;

  /* Accents */
  --accent-teal:   #00b4a6;
  --accent-teal-dim: rgba(0, 180, 166, 0.15);
  --accent-gold:   #c9a84c;
  --accent-gold-dim: rgba(201, 168, 76, 0.15);

  /* Text */
  --text-primary:   #f0ece4;
  --text-secondary: #a0a0b8;
  --text-muted:     #606080;
  --sand:           #e8dcc8;

  /* Borders */
  --border:         rgba(255, 255, 255, 0.08);
  --border-hover:   rgba(255, 255, 255, 0.15);

  /* Category Colors */
  --cat-uae:        #00b4a6;
  --cat-gcc:        #c9a84c;
  --cat-mena:       #e05c5c;
  --cat-arab:       #8b5cf6;
  --cat-palestine:  #22c55e;
  --cat-markets:    #3b82f6;
  --cat-property:   #f59e0b;
  --cat-tech:       #06b6d4;
  --cat-business:   #6366f1;
  --cat-trending:   #ef4444;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-arabic:  'Cairo', 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --max-width:    1200px;
  --sidebar-w:    300px;
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    16px;

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;

  /* Shadows */
  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow-teal: 0 0 20px rgba(0, 180, 166, 0.3);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
}

/* ── Utility Classes ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.text-teal  { color: var(--accent-teal); }
.text-gold  { color: var(--accent-gold); }
.text-muted { color: var(--text-muted); }

.hidden { display: none !important; }

/* ── Category Badge ── */
.cat-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ── Sponsored / Press Release Badge ── */
.sponsored-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(201,168,76,0.2);
  color: #c9a84c;
  border: 1px solid rgba(201,168,76,0.4);
  margin-bottom: 6px;
}
.press-release-badge {
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border-color: rgba(99,102,241,0.35);
}

.cat-uae-news    { background: rgba(0,180,166,0.18); color: var(--cat-uae); }
.cat-gcc-news    { background: rgba(201,168,76,0.18); color: var(--cat-gcc); }
.cat-mena        { background: rgba(224,92,92,0.18); color: var(--cat-mena); }
.cat-arab-world  { background: rgba(139,92,246,0.18); color: var(--cat-arab); }
.cat-palestine   { background: rgba(34,197,94,0.18); color: var(--cat-palestine); }
.cat-markets     { background: rgba(59,130,246,0.18); color: var(--cat-markets); }
.cat-property    { background: rgba(245,158,11,0.18); color: var(--cat-property); }
.cat-tech        { background: rgba(6,182,212,0.18); color: var(--cat-tech); }
.cat-business    { background: rgba(99,102,241,0.18); color: var(--cat-business); }
.cat-trending    { background: rgba(239,68,68,0.18); color: var(--cat-trending); }

/* ============================================================
   HEADER & NAV
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-lg);
}

/* Logo */
.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  flex-shrink: 0;
}

.logo-en {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.logo-dot {
  color: var(--accent-teal);
}

.logo-ar {
  font-family: var(--font-arabic);
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-weight: 600;
  text-align: right;
  direction: rtl;
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  padding: 4px 12px;
  border-radius: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  transition: all var(--transition);
}

.lang-btn.active {
  background: var(--accent-teal);
  color: var(--navy);
}

.lang-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Search toggle */
.search-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.search-toggle:hover {
  background: var(--bg-card);
  color: var(--accent-teal);
  border-color: var(--accent-teal);
}

/* ── Category Nav Bar ── */
.cat-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-nav::-webkit-scrollbar { display: none; }

.cat-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 44px;
  width: max-content;
  min-width: 100%;
}

.cat-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 var(--space-md);
  height: 100%;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.cat-nav-link .cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.cat-nav-link:hover,
.cat-nav-link.active {
  color: var(--text-primary);
}

.cat-nav-link.active {
  border-bottom-color: var(--accent-teal);
}

.cat-nav-link[data-cat="uae-news"]   { --dot-color: var(--cat-uae); }
.cat-nav-link[data-cat="uae-news"]:hover   .cat-dot,
.cat-nav-link[data-cat="uae-news"].active  .cat-dot { background: var(--cat-uae); opacity: 1; }

.cat-nav-link[data-cat="gcc-news"]:hover   .cat-dot,
.cat-nav-link[data-cat="gcc-news"].active  .cat-dot { background: var(--cat-gcc); opacity: 1; }

.cat-nav-link[data-cat="mena"]:hover       .cat-dot,
.cat-nav-link[data-cat="mena"].active      .cat-dot { background: var(--cat-mena); opacity: 1; }

.cat-nav-link[data-cat="arab-world"]:hover  .cat-dot,
.cat-nav-link[data-cat="arab-world"].active .cat-dot { background: var(--cat-arab); opacity: 1; }

.cat-nav-link[data-cat="palestine"]:hover  .cat-dot,
.cat-nav-link[data-cat="palestine"].active .cat-dot { background: var(--cat-palestine); opacity: 1; }

.cat-nav-link[data-cat="markets"]:hover    .cat-dot,
.cat-nav-link[data-cat="markets"].active   .cat-dot { background: var(--cat-markets); opacity: 1; }

.cat-nav-link[data-cat="property"]:hover   .cat-dot,
.cat-nav-link[data-cat="property"].active  .cat-dot { background: var(--cat-property); opacity: 1; }

.cat-nav-link[data-cat="tech"]:hover       .cat-dot,
.cat-nav-link[data-cat="tech"].active      .cat-dot { background: var(--cat-tech); opacity: 1; }

.cat-nav-link[data-cat="business"]:hover   .cat-dot,
.cat-nav-link[data-cat="business"].active  .cat-dot { background: var(--cat-business); opacity: 1; }

.cat-nav-link[data-cat="trending"]:hover   .cat-dot,
.cat-nav-link[data-cat="trending"].active  .cat-dot { background: var(--cat-trending); opacity: 1; }

/* ── Search Bar (expandable) ── */
.search-bar-wrapper {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.search-bar-wrapper.open {
  max-height: 80px;
  padding: var(--space-sm) 0;
}

.search-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.search-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus {
  border-color: var(--accent-teal);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-submit {
  padding: 10px 20px;
  background: var(--accent-teal);
  color: var(--navy);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  transition: opacity var(--transition);
}

.search-submit:hover {
  opacity: 0.85;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */

.site-main {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--space-xl);
  align-items: start;
}

/* ============================================================
   HERO — FEATURED ARTICLE
   ============================================================ */

.hero-section {
  margin-bottom: var(--space-xl);
}

.hero-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-card);
  aspect-ratio: 16 / 7;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-slow);
}

.hero-card:hover {
  box-shadow: var(--shadow-hover);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.hero-card:hover .hero-image {
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 26, 0.95) 0%,
    rgba(10, 10, 26, 0.5) 50%,
    rgba(10, 10, 26, 0.05) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
}

.hero-content .cat-badge {
  margin-bottom: var(--space-sm);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  max-width: 700px;
}

.hero-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 600px;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero-meta .source {
  color: var(--accent-gold);
  font-weight: 500;
}

.hero-meta .separator {
  opacity: 0.4;
}

/* ============================================================
   BREAKING NEWS TICKER
   ============================================================ */

.ticker-wrapper {
  background: var(--accent-teal);
  color: var(--navy);
  padding: 8px 0;
  overflow: hidden;
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-md);
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
}

.ticker-label {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 var(--space-md);
  white-space: nowrap;
  border-right: 2px solid rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.ticker-track {
  display: flex;
  gap: var(--space-2xl);
  animation: ticker 40s linear infinite;
  white-space: nowrap;
  padding-left: var(--space-lg);
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  font-size: 0.82rem;
  font-weight: 500;
}

.ticker-item a {
  color: var(--navy);
}

.ticker-item a:hover {
  text-decoration: underline;
}

.ticker-dot {
  color: rgba(0,0,0,0.35);
  margin-left: var(--space-2xl);
}

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-title::before {
  content: '';
  width: 3px;
  height: 1.1em;
  background: var(--accent-teal);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-link {
  font-size: 0.8rem;
  color: var(--accent-teal);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}

.section-link:hover {
  gap: 8px;
}

/* ============================================================
   ARTICLE CARDS
   ============================================================ */

/* Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* Standard Card */
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.article-card:hover .card-image {
  transform: scale(1.05);
}

.card-cat {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
}

.card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}

.article-card:hover .card-title {
  color: var(--accent-teal);
}

.card-excerpt {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-md);
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: auto;
}

.card-source {
  font-weight: 500;
  color: var(--text-secondary);
}

.card-time {
  font-size: 0.7rem;
}

/* List Card (for sidebar / latest) */
.article-list-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  transition: opacity var(--transition);
}

.article-list-item:last-child {
  border-bottom: none;
}

.article-list-item:hover {
  opacity: 0.8;
}

.list-item-image {
  width: 72px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.list-item-body {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  transition: color var(--transition);
}

.article-list-item:hover .list-item-title {
  color: var(--accent-teal);
}

.list-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Wide Card (2-col span) */
.article-card.card-wide {
  flex-direction: row;
  grid-column: span 2;
}

.card-wide .card-image-wrap {
  width: 220px;
  flex-shrink: 0;
  aspect-ratio: unset;
}

.card-wide .card-body {
  padding: var(--space-lg);
}

.card-wide .card-title {
  font-size: 1.15rem;
  -webkit-line-clamp: 4;
}

/* ── Ad slot inside grid ── */
.ad-slot {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  min-height: 90px;
}

.ad-in-feed {
  grid-column: 1 / -1;
  height: 90px;
}

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.skeleton-image {
  aspect-ratio: 16/9;
}

.skeleton-body {
  padding: var(--space-md);
}

.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-line.w-full { width: 100%; }
.skeleton-line.w-3-4  { width: 75%; }
.skeleton-line.w-1-2  { width: 50%; }

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  position: sticky;
  top: calc(64px + 44px + var(--space-lg));
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.widget-header {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.widget-header::before {
  content: '';
  width: 3px;
  height: 1em;
  background: var(--accent-gold);
  border-radius: 2px;
}

.widget-body {
  padding: var(--space-sm) var(--space-md);
}

/* Category List Widget */
.cat-list-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.83rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.cat-list-link:last-child { border-bottom: none; }

.cat-list-link:hover { color: var(--accent-teal); }

.cat-list-link .cat-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-list-link .cat-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 2px 7px;
  border-radius: 10px;
}

/* Ad Widget */
.ad-sidebar-top {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */

.article-page {
  max-width: 820px;
}

.article-header {
  margin-bottom: var(--space-xl);
}

.article-header .cat-badge {
  margin-bottom: var(--space-md);
}

.article-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.article-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: var(--space-lg);
  border-left: 3px solid var(--accent-teal);
  padding-left: var(--space-md);
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-meta-row .source-link {
  color: var(--accent-gold);
  font-weight: 600;
}

.article-meta-row .source-link:hover {
  text-decoration: underline;
}

.article-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin: var(--space-xl) 0 var(--space-sm);
}

.image-credit {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  text-align: right;
}

/* Article Body */
.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-body p {
  margin-bottom: 1.4em;
}

.article-body h2, .article-body h3 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin: 2em 0 0.6em;
  line-height: 1.3;
}

.article-body h2 { font-size: 1.4rem; }
.article-body h3 { font-size: 1.15rem; }

.article-body a {
  color: var(--accent-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body blockquote {
  border-left: 3px solid var(--accent-gold);
  padding: var(--space-sm) var(--space-lg);
  margin: var(--space-xl) 0;
  background: var(--bg-card);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* Article Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.article-tag {
  font-size: 0.75rem;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.article-tag:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}

/* Share Bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.share-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: var(--space-sm);
}

.share-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-hover);
}

.share-btn.twitter { color: #1da1f2; }
.share-btn.whatsapp { color: #25d366; }
.share-btn.copy { color: var(--accent-teal); }

/* Related Articles */
.related-section {
  margin-top: var(--space-3xl);
}

/* ── Language version switcher on article page ── */
.lang-version-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-teal-dim);
  border: 1px solid rgba(0,180,166,0.2);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.lang-version-bar .lang-toggle-link {
  color: var(--accent-teal);
  font-weight: 600;
}

/* ============================================================
   CATEGORY PAGE
   ============================================================ */

.cat-page-header {
  padding: var(--space-xl) 0;
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.cat-page-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.cat-page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
}

.page-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.page-btn:hover, .page-btn.active {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: var(--navy);
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ============================================================
   SEARCH PAGE
   ============================================================ */

.search-page-header {
  padding: var(--space-xl) 0;
}

.search-page-bar {
  display: flex;
  gap: var(--space-sm);
  max-width: 600px;
}

.search-page-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-page-input:focus {
  border-color: var(--accent-teal);
}

.search-page-btn {
  padding: 12px 24px;
  background: var(--accent-teal);
  color: var(--navy);
  border-radius: var(--radius-md);
  font-weight: 600;
}

.search-page-btn:hover { opacity: 0.85; }

.search-results-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.search-results-info strong {
  color: var(--accent-teal);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--navy);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand .logo-en {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  max-width: 260px;
}

.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent-teal); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-bottom a:hover { color: var(--accent-teal); }

/* ============================================================
   SPONSORED BADGE
   ============================================================ */

.sponsored-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(201,168,76,0.25);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 320px;
}

.toast.success { border-left: 3px solid var(--accent-teal); }
.toast.error   { border-left: 3px solid var(--cat-trending); }
.toast.info    { border-left: 3px solid var(--accent-gold); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateY(10px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-wide {
    flex-direction: column;
    grid-column: span 1;
  }

  .card-wide .card-image-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-md);
  }

  .header-inner {
    height: 56px;
  }

  .logo-en { font-size: 1.25rem; }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    aspect-ratio: 4 / 3;
  }

  .hero-title {
    font-size: 1.2rem;
  }

  .hero-content {
    padding: var(--space-md);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  .site-header,
  .cat-nav,
  .sidebar,
  .site-footer,
  .share-bar,
  .ad-slot { display: none; }

  body { background: white; color: black; }
  .article-title { color: black; }
}
