/* ============================================================
   NewsTRP — Main Stylesheet
   Google News-inspired News Aggregator
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800&display=swap');

/* ─── CSS Variables ──────────────────────────────────────── */
:root {
  --primary:        #1a73e8;
  --primary-dark:   #1557b0;
  --primary-light:  #e8f0fe;
  --accent:         #ff6b35;
  --success:        #1e8e3e;
  --warning:        #f9ab00;
  --danger:         #d93025;

  --bg:             #f8fafd;
  --bg-card:        #ffffff;
  --bg-sidebar:     #f1f3f4;
  --bg-nav:         #ffffff;

  --text-primary:   #202124;
  --text-secondary: #5f6368;
  --text-muted:     #9aa0a6;
  --text-link:      #1a73e8;

  --border:         #e0e4ea;
  --border-light:   #f1f3f4;

  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.12);
  --shadow-hover:   0 8px 24px rgba(26,115,232,0.15);

  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      24px;

  --nav-height:     60px;
  --sidebar-width:  300px;

  --font-body:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading:   'Playfair Display', Georgia, serif;

  --transition:     all 0.2s ease;
  --transition-slow:all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Dark mode */
[data-theme="dark"] {
  --bg:             #0f1117;
  --bg-card:        #1a1d23;
  --bg-sidebar:     #16191f;
  --bg-nav:         #1a1d23;
  --text-primary:   #e8eaed;
  --text-secondary: #9aa0a6;
  --text-muted:     #5f6368;
  --border:         #2d3139;
  --border-light:   #252830;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.4);
  --primary-light:  #1e3a5f;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar-newstrp {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #4285f4, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.navbar-brand span { -webkit-text-fill-color: var(--accent); }

/* Search Bar */
.search-wrapper {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.search-form {
  position: relative;
}

.search-input {
  background: var(--bg-sidebar);
  border: 2px solid transparent;
  border-radius: 30px;
  padding: 8px 48px 8px 20px;
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(26,115,232,0.1);
}

.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover { background: var(--primary-dark); transform: translateY(-50%) scale(1.05); }

/* Search Suggestions */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  display: none;
  overflow: hidden;
}

.search-suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.search-suggestion-item:hover { background: var(--bg-sidebar); color: var(--primary); }
.search-suggestion-item i { color: var(--text-muted); font-size: 0.8rem; }

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

.nav-icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.nav-icon-btn:hover { background: var(--bg-sidebar); color: var(--primary); }

/* ─── Category Nav ───────────────────────────────────────── */
.cat-nav {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: var(--nav-height);
  z-index: 999;
}

.cat-nav::-webkit-scrollbar { display: none; }

.cat-nav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  min-width: max-content;
}

.cat-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
}

.cat-nav-link:hover { color: var(--primary); border-color: var(--primary-light); }
.cat-nav-link.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.cat-nav-link i { font-size: 0.9rem; }

/* ─── Breaking News Ticker ───────────────────────────────── */
.breaking-ticker {
  background: linear-gradient(90deg, #ef4444, #dc2626);
  color: white;
  padding: 8px 0;
  overflow: hidden;
}

.breaking-label {
  background: white;
  color: #ef4444;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-track {
  display: flex;
  animation: ticker 30s linear infinite;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
  white-space: nowrap;
  padding: 0 30px;
  font-size: 0.875rem;
  font-weight: 500;
}

.ticker-item::before { content: '•'; margin-right: 30px; opacity: 0.5; }

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Layout ─────────────────────────────────────────────── */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 24px;
}

@media (max-width: 1024px) {
  .main-container { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ─── Section Headers ────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i { color: var(--primary); }

.section-link {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
}

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

/* ─── Hero Article Card ──────────────────────────────────── */
.hero-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-slow);
  height: 100%;
}

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

.hero-img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.hero-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-content { padding: 20px; }

.hero-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.hero-title:hover { color: var(--primary); }

/* ─── Standard Article Card ──────────────────────────────── */
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  gap: 0;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
  border: 1px solid var(--border-light);
  height: 120px;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--primary);
}

.article-img-wrapper {
  flex-shrink: 0;
  width: 140px;
  overflow: hidden;
}

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

.article-card:hover .article-img { transform: scale(1.06); }

.article-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
}

.article-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-title:hover { color: var(--primary); }

.article-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.source-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.source-logo-icon {
  display: inline-block;
  vertical-align: middle;
  border-radius: 4px;
  flex-shrink: 0;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.article-card:hover .source-logo-icon,
.grid-card:hover .source-logo-icon,
.hero-card:hover .source-logo-icon {
  transform: scale(1.12);
}

.source-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 700;
  flex-shrink: 0;
  vertical-align: middle;
}

.article-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.article-bookmark {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 2px 4px;
}

.article-bookmark:hover, .article-bookmark.active { color: var(--primary); }

/* ─── Grid Cards (Category/Country view) ─────────────────── */
.grid-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.grid-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--primary);
}

.grid-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.grid-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grid-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
}

.grid-card-title:hover { color: var(--primary); }

.grid-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

/* ─── Category Badge ─────────────────────────────────────── */
.cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.breaking-badge {
  background: #ef4444;
  color: white;
  animation: pulse-badge 1.5s infinite;
}

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

/* ─── Country Pill ───────────────────────────────────────── */
.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  background: var(--bg-sidebar);
  border-radius: 20px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-widget-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.sidebar-widget-header i { color: var(--primary); }

/* Trending Topics */
.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  cursor: pointer;
}

.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: var(--bg-sidebar); }

.trending-num {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--primary);
  min-width: 24px;
  line-height: 1;
}

.trending-topic { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.trending-count { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* Country Widget */
.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-sidebar);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 4px;
}

.country-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.country-chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); font-weight: 600; }

/* ─── Article Detail Page ────────────────────────────────── */
.article-detail {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.article-detail-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.article-detail-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 20px 0;
}

.article-detail-desc {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.article-detail-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.article-detail-read-more:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,115,232,0.3);
  color: white;
}

/* ─── Loader / Skeleton ──────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%); background-size: 200% 100%; animation: skeleton-shine 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes skeleton-shine { from { background-position: -200% 0; } to { background-position: 200% 0; } }

.skeleton-card { padding: 14px; background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border-light); }
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.wide { width: 90%; }
.skeleton-line.med { width: 60%; }
.skeleton-line.short { width: 40%; }
.skeleton-img { height: 120px; width: 140px; border-radius: var(--radius-sm); }

/* ─── Spinner ────────────────────────────────────────────── */
.spinner-newstrp {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h5 { font-weight: 700; margin-bottom: 8px; color: var(--text-secondary); }

/* ─── Toast ──────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary-newstrp {
  background: linear-gradient(135deg, var(--primary), #4285f4);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary-newstrp:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,115,232,0.4);
  color: white;
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 60px;
  color: var(--text-secondary);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #4285f4, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-link { display: block; font-size: 0.875rem; color: var(--text-secondary); padding: 4px 0; transition: var(--transition); }
.footer-link:hover { color: var(--primary); padding-left: 4px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Country Page Header ────────────────────────────────── */
.country-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 40px;
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.country-header-flag {
  margin-bottom: 12px;
}

.country-header-flag .country-flag-icon {
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.country-header-name {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.country-header-meta {
  font-size: 0.95rem;
  opacity: 0.9;
}

.country-flag-icon {
  display: inline-block;
  vertical-align: -2px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.country-chip:hover .country-flag-icon {
  transform: scale(1.1);
}

/* ─── Auth Pages ─────────────────────────────────────────── */
.auth-wrapper {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%);
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border);
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* ─── Admin Panel ────────────────────────────────────────── */
.admin-sidebar {
  width: 250px;
  min-height: calc(100vh - var(--nav-height));
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: var(--nav-height);
  flex-shrink: 0;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.admin-nav-link:hover { background: var(--bg-sidebar); color: var(--primary); border-color: var(--primary); }
.admin-nav-link.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); font-weight: 600; }

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── PWA Install Banner ─────────────────────────────────── */
.pwa-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  display: none;
  align-items: center;
  gap: 16px;
  min-width: 340px;
  animation: slide-up 0.4s ease;
}

@keyframes slide-up {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ─── Load More Button ───────────────────────────────────── */
.load-more-btn {
  display: block;
  margin: 24px auto 0;
  background: var(--primary-light);
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 12px 40px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.load-more-btn:hover { background: var(--primary); color: white; }

/* ─── Utilities ──────────────────────────────────────────── */
.text-primary-c { color: var(--primary) !important; }
.text-muted-c   { color: var(--text-muted) !important; }
.bg-card        { background: var(--bg-card) !important; }
.border-c       { border-color: var(--border) !important; }

.hover-lift { transition: var(--transition-slow); }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .article-card { height: auto; flex-direction: column; }
  .article-img-wrapper { width: 100%; height: 180px; }
  .article-body { padding: 12px; }
  .hero-img { height: 200px; }
  .hero-title { font-size: 1.2rem; }
  .main-container { padding: 12px; }
  .auth-card { padding: 24px; }
  .article-detail { padding: 20px; }
  .article-detail-title { font-size: 1.4rem; }
  .country-header { padding: 24px; }
  .country-header-name { font-size: 1.8rem; }
  .country-header::after { display: none; }
}

@media (max-width: 480px) {
  :root { --nav-height: 56px; }
  .navbar-brand { font-size: 1.3rem; }
  .search-input { font-size: 0.85rem; }
  .cat-nav-link { padding: 10px 12px; font-size: 0.8rem; }
}

/* ─── Animations ─────────────────────────────────────────── */
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.slide-in { animation: slideIn 0.3s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* Cards fade in on load */
.article-card, .grid-card, .hero-card {
  animation: fadeIn 0.4s ease both;
}

/* ─── Print styles ───────────────────────────────────────── */
@media print {
  .navbar-newstrp, .cat-nav, .sidebar, .footer, .breaking-ticker { display: none; }
  .main-container { grid-template-columns: 1fr; }
  .article-detail { box-shadow: none; padding: 0; }
}
