/* ==========================================================================
   CD33 BANGLADESH - UI COMPONENT LIBRARY
   Header, Footer, 3x2 Grids, Cards, Pagination, Accordions, and Navigation
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(4, 7, 17, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-bottom-color: var(--border-card);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo {
  height: 42px;
  width: auto;
  transition: transform var(--transition-fast);
}

.header-logo:hover {
  transform: scale(1.03);
}

.nav-desktop {
  display: none;
}

@media (min-width: 992px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-cyan);
  background: rgba(0, 229, 255, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 22, 41, 0.9);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.775rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--brand-cyan) 0%, #1d68f2 100%);
  color: #040711;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-orange) 0%, #ff8c00 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(255, 94, 20, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(255, 94, 20, 0.5);
  color: #ffffff;
}

.btn-gold {
  background: linear-gradient(135deg, #ffb300 0%, #ff8f00 100%);
  color: #070c18;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(255, 179, 0, 0.35);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 179, 0, 0.55);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--brand-cyan);
}

.btn-outline:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--brand-cyan);
  color: #ffffff;
}

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

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
}

@media (min-width: 992px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Mobile Drawer & Overlay */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: rgba(5, 9, 20, 0.98);
  backdrop-filter: blur(20px);
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-left: 1px solid var(--border-card);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.8);
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.mobile-drawer-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--brand-cyan);
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--brand-cyan);
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.2);
}

.mobile-drawer-actions {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

body.no-scroll {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   2. Live Jackpot Ticker & Welcome Banner
   -------------------------------------------------------------------------- */
.jackpot-ticker-bar {
  background: linear-gradient(90deg, #101b33 0%, #0d1527 50%, #101b33 100%);
  border-bottom: 1px solid rgba(255, 179, 0, 0.2);
  padding: 0.5rem 0;
  font-size: 0.825rem;
  overflow: hidden;
}

.ticker-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  white-space: nowrap;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.ticker-amount {
  color: var(--brand-gold);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   3. 3x2 Grid Box Layout & Placecards
   -------------------------------------------------------------------------- */
.grid-3x2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

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

@media (min-width: 992px) {
  .grid-3x2 {
    grid-template-columns: repeat(3, 1fr); /* Strict 3x2 grid */
  }
}

.placecard {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  position: relative;
}

.placecard:hover {
  transform: translateY(-5px);
  border-color: var(--brand-cyan);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.75), var(--shadow-glow-cyan);
}

.placecard-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #0b1120;
}

.placecard-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.placecard:hover .placecard-image {
  transform: scale(1.06);
}

.placecard-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 3;
}

.placecard-rtp {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(4, 7, 17, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-emerald);
}

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

.placecard-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-cyan);
  margin-bottom: 0.4rem;
}

.placecard-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.placecard-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.placecard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   4. Interactive Pagination Controls
   -------------------------------------------------------------------------- */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.5rem 0 1rem;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--brand-cyan);
  color: #ffffff;
}

.pagination-btn.active {
  background: var(--brand-cyan);
  border-color: var(--brand-cyan);
  color: #040711;
  font-weight: 800;
  box-shadow: var(--shadow-glow-cyan);
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-info {
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   5. Interactive Filter Pills
   -------------------------------------------------------------------------- */
.filter-pills-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
}

.filter-pill {
  white-space: nowrap;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.filter-pill.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2) 0%, rgba(29, 104, 242, 0.2) 100%);
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

/* --------------------------------------------------------------------------
   6. Accordion (FAQs)
   -------------------------------------------------------------------------- */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.5rem 0;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--border-card);
}

.faq-question {
  width: 100%;
  padding: 1.25rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--brand-cyan);
  transition: transform var(--transition-normal);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: var(--brand-cyan);
  color: #040711;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.3s ease;
  padding: 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   7. E-E-A-T Author & Regulatory Compliance Bar
   -------------------------------------------------------------------------- */
.eeat-trust-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: 2.5rem 0;
}

@media (min-width: 768px) {
  .eeat-trust-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.eeat-trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eeat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.1);
  color: var(--brand-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.eeat-text strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text-primary);
}

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

.author-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin: 2.5rem 0;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--brand-cyan);
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   8. Comparison Table Styling
   -------------------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

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

.data-table th {
  background: #0e172a;
  color: var(--brand-cyan);
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--border-card);
  white-space: nowrap;
}

.data-table td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: #03060d;
  border-top: 1px solid var(--border-card);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

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

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

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

.footer-col h4 {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-family: var(--font-heading);
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--brand-cyan);
}

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

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.regulatory-badges {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

/* --------------------------------------------------------------------------
   10. Mobile Sticky Bottom Nav
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(4, 7, 17, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
}

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

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.725rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: 0.4rem;
}

.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--brand-cyan);
}

.bottom-nav-icon {
  font-size: 1.25rem;
}

/* --------------------------------------------------------------------------
   11. Tactical Terminal & Schematic Box (Code / Flowcharts)
   -------------------------------------------------------------------------- */
.tactical-terminal-box {
  background: #040814;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin: 2.25rem auto;
  overflow: hidden;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7);
  max-width: 100%;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.25rem;
  background: rgba(14, 22, 41, 0.95);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-size: 0.8rem;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--brand-cyan);
}

.terminal-pre {
  padding: 1.25rem 1.5rem;
  margin: 0;
  overflow-x: auto;
  color: #38bdf8;
  font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.65;
  background: #030610;
}

.inline-code {
  background: rgba(0, 229, 255, 0.1);
  color: var(--brand-cyan);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: 'Consolas', 'Courier New', monospace;
}

/* --------------------------------------------------------------------------
   12. Silo Interlink Cross-Nav Box
   -------------------------------------------------------------------------- */
.silo-interlink-box {
  background: linear-gradient(180deg, rgba(14, 22, 41, 0.9) 0%, rgba(8, 13, 27, 0.95) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-card);
}

.silo-interlink-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.silo-interlink-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .silo-interlink-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.silo-link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: #e2e8f0;
  transition: all var(--transition-fast);
}

.silo-link-card:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: var(--brand-cyan);
  color: #ffffff;
  transform: translateX(4px);
}

