/* ==========================================================================
   MEDIA NASIONAL NETWORK - EDITORIAL DESIGN SYSTEM (RESPONSIVE)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,300&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;

  /* Light Theme (Default) */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverted: #ffffff;

  /* Brand Accents */
  --brand-primary: #e11d48;       /* Crimson Red */
  --brand-primary-hover: #be123c;
  --brand-secondary: #1e3a8a;     /* Deep Navy */
  --accent-gold: #f59e0b;
  --accent-blue: #2563eb;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 25px rgba(225, 29, 72, 0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

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

[data-theme="dark"] {
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-card: #131d31;
  --bg-card-hover: #1e293b;
  --border-color: #233149;
  --border-light: #1a2436;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-inverted: #0f172a;

  --brand-primary: #f43f5e;
  --brand-primary-hover: #fb7185;
  --brand-secondary: #3b82f6;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(244, 63, 94, 0.3);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

/* Header & Top Bar */
.top-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 8px 0;
}

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

.top-date {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.theme-toggle-btn:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.main-header {
  background: var(--bg-surface);
  border-bottom: 2px solid var(--brand-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.main-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo-img {
  height: 52px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease;
}

.brand-logo:hover .site-logo-img {
  transform: scale(1.04);
}

.brand-text h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--text-primary);
}

.brand-text p {
  font-size: 0.7rem;
  color: var(--brand-primary);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Category Navbar */
.category-navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.category-navbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.category-list {
  display: flex;
  list-style: none;
  gap: 4px;
  padding: 6px 0;
}

.category-link {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.category-link:hover,
.category-link.active {
  color: var(--brand-primary);
  background: rgba(225, 29, 72, 0.08);
}

/* Breaking News Ticker */
.breaking-news-bar {
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breaking-label {
  background: var(--brand-primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  z-index: 2;
}

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

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: tickerAnim 30s linear infinite;
}

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

.ticker-item {
  display: inline-block;
  margin-right: 45px;
  font-size: 0.88rem;
  color: #e2e8f0;
  cursor: pointer;
}

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

@keyframes tickerAnim {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Ad Banners */
.ad-banner-slot {
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin: 18px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  text-align: center;
}

.ad-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ad-leaderboard {
  max-width: 970px;
  width: 100%;
  min-height: 80px;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.03), rgba(37, 99, 235, 0.03));
}

.ad-sidebar {
  width: 100%;
  min-height: 220px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04), rgba(225, 29, 72, 0.04));
}

.ad-in-article {
  max-width: 100%;
  min-height: 100px;
  margin: 28px 0;
  padding: 16px;
  background: var(--bg-surface-elevated);
}

.ad-placeholder-inner h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.ad-placeholder-inner p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Hero Headlines Section */
.hero-section {
  padding: 20px 0;
}

.headlines-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.main-headline-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 460px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  background: #000;
}

.main-headline-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.headline-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: #ffffff;
}

.badge-category {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 10px;
  width: fit-content;
}

.headline-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.headline-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
  color: #cbd5e1;
  flex-wrap: wrap;
}

.secondary-headlines {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sub-headline-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 220px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  background: #000;
}

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

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

.sub-headline-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #fff;
}

.sub-headline-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

/* Main Content Layout */
.content-layout {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 32px;
  margin-bottom: 50px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 22px;
  gap: 12px;
}

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

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--brand-primary);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

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

.card-img-wrap {
  position: relative;
  height: 190px;
  overflow: hidden;
}

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

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

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 8px 0 6px;
  color: var(--text-primary);
}

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

.card-summary {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

/* Trending Sidebar */
.trending-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
}

.trending-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

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

.trending-number {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--brand-primary);
  line-height: 1;
  font-family: var(--font-heading);
  min-width: 26px;
}

.trending-details h4 {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 4px;
  transition: var(--transition);
}

.trending-item:hover .trending-details h4 {
  color: var(--brand-primary);
}

.trending-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tag Pills */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.tag-pill {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

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

/* Reactions Box */
.reactions-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 32px 0;
  text-align: center;
}

.reactions-box h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.reactions-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reaction-btn {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
  min-width: 72px;
}

.reaction-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
}

.reaction-btn.voted {
  background: rgba(225, 29, 72, 0.1);
  border-color: var(--brand-primary);
}

.reaction-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.reaction-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.reaction-count {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-primary);
}

/* Article Detail Page */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--brand-primary);
  width: 0%;
  z-index: 1100;
  transition: width 0.1s ease-out;
}

.article-container {
  max-width: 860px;
  margin: 28px auto 50px;
  padding: 0 20px;
}

.article-header {
  margin-bottom: 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

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

.article-headline {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.article-summary-lead {
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
  border-left: 4px solid var(--brand-primary);
  padding-left: 14px;
  font-style: italic;
}

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

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.author-meta h5 {
  font-size: 0.92rem;
  font-weight: 700;
}

.author-meta p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.article-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.featured-img-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}

.featured-img-wrap img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

.article-body-content {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.article-body-content p {
  margin-bottom: 20px;
}

.article-body-content h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  margin: 32px 0 14px;
  color: var(--text-primary);
}

.share-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 36px 0;
  gap: 12px;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.share-wa { background: #25d366; }
.share-wa:hover { background: #1eb956; }
.share-tw { background: #1da1f2; }
.share-tw:hover { background: #0c85d0; }
.share-copy { background: var(--text-secondary); }
.share-copy:hover { background: var(--text-primary); }

/* Footer */
.main-footer {
  background: #090d16;
  color: #cbd5e1;
  border-top: 3px solid var(--brand-primary);
  padding: 42px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-brand p {
  font-size: 0.86rem;
  color: #94a3b8;
  margin-top: 12px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: var(--brand-primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Tablet & Smaller Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .headlines-grid {
    grid-template-columns: 1fr;
  }
  .main-headline-card {
    height: 360px;
  }
  .content-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .main-header-inner {
    padding: 10px 0;
  }
  .site-logo-img {
    height: 46px;
  }
  .brand-text h1 {
    font-size: 1.3rem;
  }
  .brand-text p {
    font-size: 0.65rem;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .main-headline-card {
    height: 300px;
  }
  .headline-title {
    font-size: 1.45rem;
  }
  .headline-overlay {
    padding: 18px;
  }
  .article-headline {
    font-size: 1.75rem;
  }
}

/* Mobile Phones (<= 540px) */
@media (max-width: 540px) {
  .container {
    padding: 0 14px;
  }
  .top-bar-inner {
    font-size: 0.76rem;
  }
  .site-logo-img {
    height: 40px;
  }
  .brand-text h1 {
    font-size: 1.15rem;
  }
  .brand-text p {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }
  .breaking-news-bar {
    height: 36px;
  }
  .breaking-label {
    padding: 0 10px;
    font-size: 0.7rem;
  }
  .main-headline-card {
    height: 250px;
    border-radius: var(--radius-md);
  }
  .headline-title {
    font-size: 1.25rem;
    line-height: 1.3;
  }
  .headline-overlay {
    padding: 14px;
  }
  .sub-headline-card {
    height: 170px;
  }
  .sub-headline-title {
    font-size: 0.95rem;
  }
  .article-container {
    padding: 0 14px;
    margin: 16px auto 40px;
  }
  .article-headline {
    font-size: 1.45rem;
  }
  .article-summary-lead {
    font-size: 0.95rem;
  }
  .article-body-content {
    font-size: 1.02rem;
    line-height: 1.75;
  }
  .share-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .share-buttons {
    width: 100%;
    flex-wrap: wrap;
  }
  .share-btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.78rem;
    padding: 8px 10px;
  }
  .reactions-grid {
    gap: 8px;
  }
  .reaction-btn {
    padding: 6px 10px;
    min-width: 60px;
  }
  .reaction-emoji {
    font-size: 1.4rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================================
   FORM CONTROLS & BUTTONS (LOGIN & ADMIN PANEL)
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
  background-color: var(--bg-surface-elevated);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-hover));
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Action Buttons */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-action:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-delete {
  background: #fee2e2;
  color: #b91c1c;
}

[data-theme="dark"] .btn-delete {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ==========================================================================
   ADMIN DASHBOARD RESPONSIVE LAYOUT & COMPONENTS
   ========================================================================== */

/* Admin Sticky Top Navbar */
.admin-navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.admin-nav-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-nav-logo {
  height: 32px;
  width: auto;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.admin-nav-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.admin-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(225, 29, 72, 0.08);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
}

.admin-nav-btn-portal {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.admin-nav-btn-portal:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.admin-nav-btn-logout {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  cursor: pointer;
}
.admin-nav-btn-logout:hover {
  background: #fecaca;
}

[data-theme="dark"] .admin-nav-btn-logout {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Admin Dashboard Hero / Action Header */
.admin-container {
  padding-top: 24px;
  padding-bottom: 60px;
}

.admin-hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface-elevated) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-hero-icon {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.3);
}

.admin-hero-title {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
}

.admin-hero-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.admin-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.admin-card-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Responsive Stats Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 14px;
  background: rgba(225, 29, 72, 0.1);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-info {
  overflow: hidden;
}

.stat-info h3 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  word-break: break-word;
}

.stat-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* Responsive Form Rows */
.form-row-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.form-row-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.upload-grid-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  align-items: center;
}

.admin-checkbox-bar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

/* Custom Upload Dropzone */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  background: var(--bg-surface);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 14px;
}

.upload-dropzone:hover {
  border-color: var(--brand-primary);
  background: var(--bg-card-hover);
}

.img-preview-thumb {
  display: none;
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--radius-md);
  margin-top: 12px;
  border: 1px solid var(--border-color);
  object-fit: cover;
}

/* Table Toolbar (Search & Filter) */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.table-search-box {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.table-search-box input {
  padding-left: 38px;
}

.table-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.table-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.table-filters select {
  min-width: 150px;
}

/* Responsive Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-bottom: 1.5px solid var(--border-color);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.table-title-cell {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.94rem;
  line-height: 1.4;
  min-width: 240px;
  max-width: 380px;
}

.table-action-cell {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

/* Quill Snow custom tweaks */
.ql-toolbar.ql-snow {
  border-color: var(--border-color) !important;
  background: var(--bg-surface-elevated);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px !important;
}

.ql-container.ql-snow {
  border-color: var(--border-color) !important;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  min-height: 220px;
}

[data-theme="dark"] .ql-snow .ql-stroke {
  stroke: #94a3b8;
}

[data-theme="dark"] .ql-snow .ql-fill {
  fill: #94a3b8;
}

[data-theme="dark"] .ql-snow .ql-picker {
  color: #94a3b8;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES FOR ADMIN DASHBOARD
   ========================================================================== */
@media (max-width: 1024px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .admin-nav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 0;
  }

  .admin-nav-top-row {
    justify-content: space-between;
    width: 100%;
  }

  .admin-nav-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
  }

  .admin-nav-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 4px;
    font-size: 0.78rem;
  }

  .admin-container {
    padding-top: 16px;
    padding-bottom: 40px;
  }

  .admin-hero {
    padding: 18px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 18px;
  }

  .admin-hero-left {
    gap: 12px;
  }

  .admin-hero-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 1.3rem;
    border-radius: 10px;
  }

  .admin-hero-title {
    font-size: 1.35rem;
  }

  .admin-hero-subtitle {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .admin-hero-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }

  .admin-card {
    padding: 18px 14px;
    margin-bottom: 18px;
  }

  .form-row-equal {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .upload-grid-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .admin-checkbox-bar {
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .table-search-box {
    width: 100%;
    max-width: none;
  }

  .table-filters {
    width: 100%;
  }

  .table-filters select {
    flex: 1;
  }

  .form-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions-bar button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 14px 10px;
    gap: 8px;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.15rem;
    border-radius: 8px;
  }

  .stat-info h3 {
    font-size: 1.2rem;
  }

  .stat-info p {
    font-size: 0.72rem;
  }

  .admin-user-pill {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
    padding: 3px 8px;
  }
  
  .admin-nav-title {
    font-size: 0.88rem;
  }

  .btn-action {
    padding: 5px 8px;
    font-size: 0.75rem;
  }
}


