/* ==========================================================================
   R777 BANGLADESH - LAYOUT & STRUCTURAL SYSTEM
   Header, Footer, Mobile Bottom-Nav, Sidebars, Responsive Shell
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Header & Primary Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(10, 13, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
}

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

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-tagline {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-top: 2px;
}

/* Desktop Navigation Menu */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.menu-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

@media (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }
  .menu-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Mobile Off-Canvas Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  max-width: 85%;
  height: 100vh;
  background-color: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.6);
  z-index: 200;
  transition: right var(--transition-normal);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-md);
}

.drawer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex-grow: 1;
  overflow-y: auto;
}

.drawer-link {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.drawer-link:hover {
  background: var(--brand-red-subtle);
  color: #ffffff;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   2. Sticky Mobile Bottom Navigation Bar
   -------------------------------------------------------------------------- */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--mobile-nav-height);
  background: rgba(13, 17, 24, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  z-index: 99;
  justify-content: space-around;
  align-items: center;
  padding: 0 var(--space-xs);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  gap: 2px;
  flex: 1;
  height: 100%;
  transition: color var(--transition-fast);
}

.bottom-nav-icon {
  font-size: 1.2rem;
  line-height: 1;
}

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

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
  }
  body {
    padding-bottom: var(--mobile-nav-height);
  }
}

/* --------------------------------------------------------------------------
   3. Page Layouts & Structural Wrappers
   -------------------------------------------------------------------------- */
.page-hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.12) 0%, rgba(10, 13, 20, 0) 70%);
  pointer-events: none;
}

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

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

.breadcrumbs a:hover {
  color: var(--brand-red);
}

.page-subtitle {
  font-size: 1.15rem;
  color: #cbd5e1;
  max-width: 800px;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

/* Two-Column Layout for Long-Form Articles & Sidebar */
.content-grid-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
}

.main-article-content {
  min-width: 0; /* Prevents table blowout */
}

.sticky-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
  height: fit-content;
}

@media (max-width: 992px) {
  .content-grid-wrapper {
    grid-template-columns: 1fr;
  }
  .sticky-sidebar {
    display: none;
  }
}

/* Sidebar TOC Widget */
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: #ffffff;
  border-bottom: 2px solid var(--brand-red);
  padding-bottom: var(--space-xs);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: 0.88rem;
}

.toc-link {
  color: var(--text-secondary);
  display: block;
  transition: color var(--transition-fast);
}

.toc-link:hover {
  color: var(--brand-red);
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   4. Footer Template & Compliance
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background-color: #07090e;
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

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

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: 0.9rem;
}

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

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

/* Payment & Regulator Ribbon */
.footer-trust-ribbon {
  padding: var(--space-lg) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.mfs-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.mfs-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
}

/* Responsible Gaming Compliance Banner */
.footer-rg-banner {
  background: rgba(229, 9, 20, 0.06);
  border: 1px solid rgba(229, 9, 20, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.rg-icon-18 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brand-red);
  border: 2px solid var(--brand-red);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rg-text {
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.rg-text a {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: 0.82rem;
  color: var(--text-muted);
}
