/* ==========================================================================
   GAMENOMA BLOG CUSTOM STYLESHEET (LIGHT THEME EDITORIAL)
   ========================================================================== */

/* Design Tokens & Root Variables */
:root {
  --blog-bg: #f8fafc;
  --panel-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-body: #334155;
  --border-color: #cbd5e1;
  --border-light: #e2e8f0;
  
  /* Brand Highlights & Accent Colors */
  --brand-primary: #ef4444; /* Brand Red */
  --brand-success: #16a34a; /* Safe Green */
  --brand-gold: #fbbf24;    /* Logo Star */
  --brand-gold-dark: #d97706; /* Darker Gold for text contrast */
  
  /* Font Families */
  --sans-font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --code-font: 'Fira Code', monospace;
}

/* Global Reset & Base Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans-font);
  background-color: var(--blog-bg);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* Layout Utilities */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.blog-header {
  background-color: var(--panel-bg);
  border-bottom: 1.5px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--sans-font);
}

.blog-logo svg {
  filter: drop-shadow(0 1px 3px rgba(251, 191, 36, 0.5));
}

.blog-nav {
  display: flex;
  gap: 20px;
}

.blog-nav a {
  color: var(--text-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
}

.blog-nav a:hover,
.blog-nav a.active {
  color: var(--brand-primary);
  background-color: var(--border-light);
}

/* ==========================================================================
   BLOG INDEX (HOMEPAGE)
   ========================================================================== */
.blog-hero {
  text-align: center;
  padding: 64px 0 40px 0;
}

.blog-badge {
  background-color: rgba(239, 68, 68, 0.08);
  color: var(--brand-primary);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(239, 68, 68, 0.15);
  display: inline-block;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -1px;
  margin-bottom: 12px;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Controls (Filters & Search) */
.blog-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
  background-color: var(--panel-bg);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
}

@media (min-width: 768px) {
  .blog-controls {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background-color: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background-color: #e2e8f0;
}

.tab-btn.active {
  background-color: var(--text-main);
  border-color: var(--text-main);
  color: #ffffff;
}

.search-box input {
  font-family: var(--sans-font);
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 320px;
  background-color: #f8fafc;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--brand-primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 80px;
}

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

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

.post-card {
  background-color: var(--panel-bg);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
}

.tag-crash-games { background-color: rgba(239, 68, 68, 0.1); color: var(--brand-primary); }
.tag-payments-product { background-color: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.tag-trust-responsible-play { background-color: rgba(16, 185, 129, 0.1); color: var(--brand-success); }
.tag-casino-slots { background-color: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.tag-betting-education-traffic { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.tag-data-entertainment { background-color: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.tag-glossary-faq { background-color: rgba(100, 116, 139, 0.1); color: var(--text-muted); }

.card-readtime {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
}

.card-title a {
  color: var(--text-main);
  text-decoration: none;
}

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

.card-desc {
  font-size: 0.9rem;
  color: var(--text-body);
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
  margin-top: auto;
}

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

.read-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

.no-results {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
  background-color: var(--panel-bg);
  border-radius: 12px;
  border: 1px dashed var(--border-color);
}

.no-results h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.no-results p {
  color: var(--text-muted);
  max-width: 400px;
}

/* ==========================================================================
   BLOG POST DETAIL VIEW
   ========================================================================== */

/* Progress Bar at Top */
.progress-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: transparent;
  z-index: 2000;
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  background-color: var(--brand-primary);
  transition: width 0.1s ease-out;
}

.article-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.article-meta-header {
  margin-bottom: 32px;
  border-bottom: 1.5px solid var(--border-light);
  padding-bottom: 24px;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 16px;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

.article-title {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.author-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.author-badge {
  background-color: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.divider {
  opacity: 0.5;
}

/* Detail Grid Layout */
.article-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

@media (min-width: 1024px) {
  .article-layout-grid {
    grid-template-columns: 3fr 1fr;
  }
}

/* Rich Text & Article Body styling */
.article-body {
  background-color: var(--panel-bg);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 32px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

@media (max-width: 640px) {
  .article-body {
    padding: 20px;
  }
}

.article-rich-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-body);
}

.article-rich-text p {
  margin-bottom: 24px;
}

.article-rich-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 40px 0 16px 0;
  letter-spacing: -0.5px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 8px;
}

.article-rich-text h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 24px 0 12px 0;
}

.article-rich-text ul,
.article-rich-text ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-rich-text li {
  margin-bottom: 8px;
}

.article-rich-text strong {
  color: var(--text-main);
}

/* Code Highlights / Expected Values */
.article-rich-text code {
  font-family: var(--code-font);
  font-size: 0.9rem;
  background-color: #f1f5f9;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-weight: bold;
}

/* Pre-formatted code blocks */
.article-rich-text pre {
  background-color: #1e1b29; /* Dark code block */
  color: #e4e4e7;
  padding: 16px;
  border-radius: 8px;
  font-family: var(--code-font);
  font-size: 0.85rem;
  overflow-x: auto;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.05);
}

.article-rich-text pre code {
  background-color: transparent;
  padding: 0;
  border: none;
  color: inherit;
  font-weight: normal;
}

/* Table layout */
.article-rich-text table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.article-rich-text th,
.article-rich-text td {
  padding: 12px;
  border: 1px solid var(--border-light);
  text-align: left;
}

.article-rich-text th {
  background-color: #f1f5f9;
  color: var(--text-main);
  font-weight: bold;
}

.article-rich-text tr:nth-child(even) td {
  background-color: #f8fafc;
}

/* Blockquotes / Callout boxes */
.article-rich-text blockquote,
.article-callout-box {
  background-color: #f1f5f9;
  border-left: 4px solid var(--brand-primary);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.article-callout-box {
  font-style: normal;
}

/* Responsive Images */
.article-rich-text img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 24px;
}

/* Safe Responsible play Warning alert box */
.responsible-warning-box {
  background-color: rgba(16, 185, 129, 0.05);
  border: 1.5px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 40px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
}

.responsible-warning-box .warning-icon {
  font-size: 24px;
  line-height: 1;
}

.responsible-warning-box p {
  margin: 0;
  font-size: 0.9rem;
  color: #065f46;
}

/* Share / Print Guide Box */
.article-share-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px solid var(--border-light);
  margin-top: 32px;
  padding-top: 24px;
}

.article-share-bar h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

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

.share-buttons button {
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--sans-font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-buttons button:hover {
  background-color: #cbd5e1;
}

/* ==========================================================================
   DYNAMIC DUAL CTA CARDS IN ARTICLES
   ========================================================================== */
.article-cta-box {
  background: linear-gradient(135deg, #1e1b4b 0%, #311042 100%); /* Premium dark CTA banner */
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  color: #ffffff;
}

@media (min-width: 640px) {
  .article-cta-box {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
  }
}

.cta-content {
  text-align: left;
}

.cta-content h4 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--brand-gold);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.cta-content p {
  margin: 0 !important;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 450px;
  line-height: 1.4;
}

.cta-action-btn {
  background-color: var(--brand-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none !important;
  display: inline-block;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cta-action-btn:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
  color: #ffffff;
}

/* ==========================================================================
   SIDEBAR (TABLE OF CONTENTS)
   ========================================================================== */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sticky-toc-box {
  position: sticky;
  top: 100px;
  background-color: var(--panel-bg);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.sticky-toc-box h3 {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.sticky-toc-box ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1.5px solid var(--border-light);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.sticky-toc-box li {
  font-size: 0.9rem;
  line-height: 1.3;
}

.toc-link {
  color: var(--text-body);
  text-decoration: none;
  font-weight: 500;
}

.toc-link:hover,
.toc-link.active {
  color: var(--brand-primary);
  font-weight: 700;
  text-decoration: none;
}

.sidebar-promo {
  text-align: left;
}

.sidebar-promo h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.sidebar-promo p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

.promo-btn {
  width: 100%;
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.2);
  transition: transform 0.2s ease;
}

.promo-btn.btn-success {
  background-color: var(--brand-success);
  color: #ffffff;
}

.promo-btn:hover {
  transform: translateY(-1px);
  color: #ffffff;
}

/* ==========================================================================
   RELATED READINGS SECTION
   ========================================================================== */
.related-section {
  border-top: 1.5px solid var(--border-light);
  padding-top: 40px;
  margin-top: 40px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

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

@media (min-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related-card {
  background-color: var(--panel-bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.04);
}

.related-category {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-primary);
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 8px;
}

.related-card h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}

.related-card h4 a {
  color: var(--text-main);
  text-decoration: none;
}

.related-card h4 a:hover {
  color: var(--brand-primary);
}

.related-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.blog-footer {
  background-color: var(--panel-bg);
  border-top: 1.5px solid var(--border-light);
  padding: 40px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text-body);
  font-weight: 600;
}

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

.footer-license {
  margin-bottom: 12px;
  max-width: 600px;
  margin: 0 auto 12px auto;
  line-height: 1.5;
}

.footer-responsible {
  color: var(--brand-primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-copy {
  font-size: 0.75rem;
  opacity: 0.8;
}
