/* ==========================================================================
   KKBD88 Bangladesh - Premium iGaming Design System (2026)
   Optimized for Fast Mobile UX, 0 CLS, High Readability & Conversion
   ========================================================================== */

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #162032;
  --bg-card-hover: #1c2a42;
  --bg-elevated: #1f2e48;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-gold: #f59e0b;
  --accent-gold-hover: #d97706;
  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --accent-crimson: #ef4444;
  --accent-blue: #3b82f6;
  
  --border-color: #1e293b;
  --border-highlight: rgba(245, 158, 11, 0.3);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 20px rgba(245, 158, 11, 0.3);
  
  --max-width: 1200px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 70px; /* Space for mobile sticky nav */
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fbbf24;
}

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(11, 15, 25, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  height: 38px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  list-style: none;
  flex: 1;
}

@media (min-width: 992px) {
  .nav-links {
    display: flex;
  }
}

@media (min-width: 1200px) {
  .nav-links {
    gap: 1.05rem;
  }
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.25rem;
  position: relative;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-gold);
}

.nav-links a.active {
  color: var(--accent-gold);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-gold);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-actions .btn {
  font-size: 0.84rem;
  padding: 0.45rem 0.95rem;
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
  color: #0b0f19;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, var(--accent-gold));
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-hover));
  color: #ffffff;
}

.btn-emerald:hover {
  background: #059669;
  color: #fff;
}

/* Mobile Sticky Bottom Nav */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0.25rem;
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--accent-gold);
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Main Content & Layout
   ========================================================================== */
.main-wrapper {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  width: 100%;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

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

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

.breadcrumbs span.separator {
  color: var(--border-color);
}

/* Hero Section */
.page-hero {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .page-hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-content h1 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .hero-content h1 {
    font-size: 2.35rem;
  }
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.badge-gold {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-gold);
}

.badge-green {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.hero-image-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Key Highlights Box / AEO Answer Target */
.aeo-highlights-box {
  background: linear-gradient(135deg, rgba(22, 32, 50, 0.95), rgba(17, 24, 39, 0.95));
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-gold);
}

.aeo-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.aeo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .aeo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.aeo-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.aeo-item-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.aeo-item-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Content Layout (Article Body + Sticky Sidebar) */
.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 992px) {
  .content-layout {
    grid-template-columns: 1fr 340px;
  }
}

.article-body {
  font-size: 1rem;
  color: #cbd5e1;
  line-height: 1.75;
}

.article-body h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 1.75rem 0 0.75rem;
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

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

/* High Conversion CTA Box */
.cta-banner {
  background: radial-gradient(circle at top right, #1f2e48, #111827);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-lg);
}

.cta-banner h3 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.cta-banner p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

th {
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

tr:nth-child(even) {
  background-color: rgba(22, 32, 50, 0.4);
}

tr:hover {
  background-color: rgba(245, 158, 11, 0.05);
}

/* Grid Cards (Games / Silos) */
.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}

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

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

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md);
}

.card-img-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

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

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

.card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* FAQ Accordion */
.faq-section {
  margin: 3rem 0;
}

.faq-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  padding: 1.1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-question:hover {
  color: var(--accent-gold);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Author Box */
.author-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .author-box {
    flex-direction: row;
    align-items: center;
  }
}

.author-avatar {
  width: 75px;
  height: 75px;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent-gold);
  overflow: hidden;
  flex-shrink: 0;
}

.author-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.author-role {
  font-size: 0.82rem;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.author-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.widget-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.widget-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-links a:hover {
  color: var(--accent-gold);
}

/* Footer */
.site-footer {
  background-color: #070a11;
  border-top: 1px solid var(--border-color);
  padding: 3rem 1rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

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

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 1rem 0 1.5rem;
}

.footer-col h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-col a:hover {
  color: var(--accent-gold);
}

.footer-compliance {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}
