/**
 * PHFUN Modern Responsive Web Portal - Design System & UI Stylesheet
 * Compliance: PAGCOR 21+ Disclaimers, Zero False License Numbers, Fluid Viewports (NO fixed 430px wrappers)
 */

/* ==========================================================================
   1. CSS VARIABLES & DESIGN TOKENS
   ========================================================================== */
:root {
  /* Brand Primaries */
  --primary: #00c3ff;
  --primary-hover: #0284c7;
  --primary-glow: rgba(0, 195, 255, 0.25);

  /* High-Conversion Accent */
  --accent: #fed034;
  --accent-hover: #eab308;
  --accent-glow: rgba(254, 208, 52, 0.35);
  --accent-orange: #ff7a00;

  /* Neutrals & Surfaces (Deep Dark Portal Theme) */
  --bg: #0f141c;
  --bg-secondary: #161d27;
  --surface: #1b2432;
  --surface-hover: #243042;
  --surface-card: #18202c;
  --surface-elevated: #202b3b;
  --border: #2b384c;
  --border-light: rgba(255, 255, 255, 0.08);

  /* Typography Colors */
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #090d14;

  /* Trust & Status */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Typography Scale */
  --font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 32px -4px rgba(0, 195, 255, 0.18);
  --shadow-gold: 0 4px 18px rgba(254, 208, 52, 0.28);

  /* Gradients */
  --grad-brand-ph: linear-gradient(135deg, #38d9f5 0%, #0284c7 100%);
  --grad-brand-fun: linear-gradient(135deg, #fed034 0%, #ff7a00 100%);
  --grad-cta: linear-gradient(135deg, #fed034 0%, #ff9800 100%);
  --grad-surface: linear-gradient(180deg, rgba(27, 36, 50, 0.8) 0%, rgba(24, 32, 44, 0.95) 100%);
}

/* ==========================================================================
   2. GLOBAL RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg);
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

button, input, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* ==========================================================================
   3. VIEWPORT ARCHITECTURE & CONTAINERS
   ========================================================================== */
/* Desktop (>1024px) */
.container {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
  .container {
    max-width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* Mobile (<768px) - Strictly Fluid, NO fixed 430px container or faux phone wrappers */
@media (max-width: 767px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ==========================================================================
   4. GLOBAL NAVIGATION HEADER (.site-header)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 20, 28, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.25s ease;
}

.header-inner,
.header-container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 72px;
  gap: 1rem;
  width: 100%;
}

/* Brand Logo */
.brand-link,
.brand-logo {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0;
}

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

/* Desktop Horizontal Nav */
.desktop-nav {
  display: flex !important;
  align-items: center !important;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s ease;
}

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

.nav-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  background: var(--grad-cta);
  color: #000;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 1240px) and (min-width: 1024px) {
  .desktop-nav {
    gap: 0.15rem !important;
  }
  .nav-link {
    font-size: 0.82rem !important;
    padding: 0.35rem 0.45rem !important;
  }
}

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

/* Quick Search Trigger */
.search-trigger-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-trigger-btn:hover {
  border-color: var(--primary);
  color: var(--text-main);
  background: var(--surface-hover);
}

.search-icon {
  width: 16px;
  height: 16px;
}

.search-kbd {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* Header Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.875rem;
}

.btn-md {
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
}

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

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

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-accent {
  background: var(--grad-cta);
  color: #000000;
  box-shadow: var(--shadow-gold);
  font-weight: 700;
}

.btn-accent:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(254, 208, 52, 0.45);
}

.btn-primary {
  background: var(--grad-brand-ph);
  color: #000000;
  font-weight: 700;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Mobile Nav Toggle */
.nav-toggle,
.mobile-menu-btn {
  display: none;
  background: transparent;
  color: var(--text-main);
  padding: 0.5rem;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
}

@media (max-width: 1023px) {
  .desktop-nav,
  .search-trigger-btn .search-label,
  .search-trigger-btn .search-btn-text,
  .search-kbd {
    display: none !important;
  }
  .nav-toggle,
  .mobile-menu-btn {
    display: flex !important;
  }
}

@media (max-width: 500px) {
  .header-actions .btn-outline,
  .header-actions .header-login-btn {
    display: none !important;
  }
}

/* ==========================================================================
   5. MOBILE SLIDE-OUT DRAWER (.mobile-drawer)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 310px;
  max-width: 85vw;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  z-index: 1999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

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

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

.drawer-close {
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
}

.drawer-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drawer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.drawer-nav-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
}

.drawer-nav-item a:hover {
  background: var(--surface);
  color: var(--primary);
}

.drawer-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   6. CATEGORY HORIZONTAL PILL CAROUSEL / BAR
   ========================================================================== */
.category-pill-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.category-scroll {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

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

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-chip img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.category-chip:hover, .category-chip.active {
  background: rgba(0, 195, 255, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   7. GAME & CATEGORY PLACECARD RESPONSIVE GRIDS
   ========================================================================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1.15rem;
}

/* Tablets (768px - 1023px): Fluid 3 to 4 columns */
@media (max-width: 1023px) and (min-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

/* Mobile (<768px): Fluid 2-column layout */
@media (max-width: 767px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* Placecard Component */
.game-card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.game-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #111722;
  overflow: hidden;
}

.game-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.game-card:hover .game-thumb-img {
  transform: scale(1.06);
}

/* Verified RTP Pill Tag */
.rtp-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 2;
}

.studio-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: var(--text-main);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 2;
}

.game-info {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  background: var(--surface);
}

.game-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Dual-Button Placecard Action */
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.btn-card-play {
  background: var(--grad-cta);
  color: #000;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.btn-card-play:hover {
  filter: brightness(1.1);
}

.btn-card-guide {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.btn-card-guide:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(0, 195, 255, 0.08);
}

/* ==========================================================================
   8. GLOBAL AUTHORITY FOOTER (.site-footer)
   ========================================================================== */
.site-footer {
  background: var(--footer-bg, #0a0e14);
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding-top: 3.5rem;
  color: var(--text-muted);
}

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

@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.footer-col-title {
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--primary);
}

.footer-text {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.compliance-badge-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.compliance-badge-box strong {
  color: var(--accent);
}

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

.footer-link-list a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-link-list a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

/* Security Trust Badges Grid */
.trust-badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.trust-badge-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.trust-badge-item svg {
  color: var(--primary);
}

/* Sub-Footer Compliance Bar */
.sub-footer {
  background: #06090d;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem 0;
  font-size: 0.825rem;
}

.sub-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.responsible-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--warning);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

.pagcor-outbound-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pagcor-outbound-link:hover {
  color: var(--accent);
}

/* ==========================================================================
   9. MOBILE STICKY BOTTOM NAV
   ========================================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(15, 20, 28, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding: 0 0.5rem;
}

@media (max-width: 767px) {
  .mobile-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
  body {
    padding-bottom: 60px;
  }
}

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

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

.bottom-nav-item.highlight-play {
  color: #000;
  background: var(--grad-cta);
  border-radius: var(--radius-md);
  height: 48px;
  margin: 0 4px;
  font-weight: 800;
}

/* ==========================================================================
   10. SEARCH MODAL DIALOG
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 600px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-search-header {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.modal-search-input {
  flex: 1;
  background: transparent;
  color: var(--text-main);
  font-size: 1.05rem;
}

.modal-search-input::placeholder {
  color: var(--text-subtle);
}

.modal-search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: var(--surface-hover);
}


/* ==========================================================================
   11. HOMEPAGE SPECIFIC SECTIONS & COMPONENT EXTENSIONS
   ========================================================================== */

/* Hero 2-Column Split */
.hero-2col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem 0 2rem;
}

@media (max-width: 1023px) {
  .hero-2col {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem 0;
  }
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 195, 255, 0.12);
  border: 1px solid rgba(0, 195, 255, 0.35);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  width: fit-content;
}

.hero-title {
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.hero-cta-group {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.hero-media-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  background: var(--surface-card);
}

.hero-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Trust Bar */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1023px) {
  .trust-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 500px) {
  .trust-bar {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem;
  }
}

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

.trust-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(0, 195, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.trust-item-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.trust-item-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Section Header */
.section-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  max-width: 700px;
}

/* Hub Category Cards Grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

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

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

.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hub-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.hub-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.hub-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface-hover);
  padding: 6px;
  object-fit: contain;
}

.hub-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.hub-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.15rem;
  flex: 1;
}

.hub-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* Promotions Grid */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

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

.promo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.promo-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.promo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-cta);
}

.promo-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(254, 208, 52, 0.15);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  width: fit-content;
}

.promo-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.promo-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.promo-key-rule {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-bottom: 1.25rem;
}

.promo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* Tutorials Step Cards */
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

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

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

.tutorial-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.step-num-pill {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #000;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.tutorial-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.tutorial-step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.tutorial-link-btn {
  color: var(--primary);
  font-size: 0.825rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tutorial-link-btn:hover {
  text-decoration: underline;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--primary);
}

.faq-question {
  padding: 1.15rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-main);
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question svg {
  transition: transform 0.25s ease;
  flex-shrink: 0;
  color: var(--primary);
}

.faq-item[open] .faq-question svg {
  transform: rotate(180deg);
}

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

/* Regulatory Disclaimer Notice */
.regulatory-disclaimer-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 3rem 0;
}

.regulatory-disclaimer-box p {
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.regulatory-disclaimer-box a {
  color: var(--primary);
  text-decoration: underline;
}


/* ==========================================================================
   12. EDITORIAL GATEWAY TEMPLATE & SIDEBAR STYLES
   ========================================================================== */
.editorial-hero {
  position: relative;
  padding: 2.5rem 0 2rem;
  background-color: var(--bg-base);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--border);
}

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

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

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

.editorial-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

@media (max-width: 1023px) {
  .editorial-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem 0 3rem;
  }
}

/* Mobile Jump Menu */
.mobile-jump-menu {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 1023px) {
  .mobile-jump-menu {
    display: block;
  }
}

.mobile-jump-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.mobile-jump-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-jump-list a {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mobile-jump-list a:hover {
  color: var(--primary);
}

/* Article Typography & Elements */
.editorial-article {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.editorial-section {
  scroll-margin-top: 90px;
}

.editorial-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.editorial-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.25rem 0 0.5rem;
}

.editorial-section p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.85rem;
}

.quick-answer-box {
  background: rgba(0, 195, 255, 0.08);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
}

.quick-answer-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.quick-answer-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.55;
}

/* Numbered Step List */
.step-walkthrough {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.step-card {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.step-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #000;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.step-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Dual CTA In-Article Banner */
.inline-cta-banner {
  background: linear-gradient(135deg, rgba(27, 36, 50, 0.95) 0%, rgba(24, 32, 44, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow-sm);
}

.inline-cta-text h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.inline-cta-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.inline-cta-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Data & Comparison Tables (Thumb friendly 2-3 col) */
.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

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

.editorial-table th {
  background: var(--surface-elevated);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.editorial-table td {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.editorial-table tr:last-child td {
  border-bottom: none;
}

/* Warning & Note Alerts */
.editorial-alert {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.25rem 0;
  font-size: 0.875rem;
  line-height: 1.55;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.alert-tip {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

/* Sticky Sidebar Components */
.editorial-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.sidebar-widget-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.toc-list a {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: block;
  transition: color 0.2s ease, transform 0.2s ease;
}

.toc-list a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.sidebar-action-box {
  background: linear-gradient(135deg, rgba(254, 208, 52, 0.08) 0%, rgba(0, 195, 255, 0.05) 100%);
  border: 1px solid rgba(254, 208, 52, 0.3);
  text-align: center;
}

/* Hub-Silo Linking System */
.silo-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.silo-nav-list li a {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.silo-nav-list li a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.silo-hub-link {
  font-weight: 700;
  color: var(--primary) !important;
  border-top: 1px dashed var(--border);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

.silo-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.silo-nav-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.silo-nav-box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.silo-nav-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.silo-nav-box ul li a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  line-height: 1.4;
}

.silo-nav-box ul li a:hover {
  color: var(--primary);
}


/* ==========================================================================
   POSTCARD 3x3 GRID & PAGINATION COMPONENT
   ========================================================================== */
.spoke-postcard-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
  margin-top: 1.5rem !important;
}

@media (max-width: 1023px) and (min-width: 640px) {
  .spoke-postcard-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
}

@media (max-width: 639px) {
  .spoke-postcard-grid {
    grid-template-columns: 1fr !important;
    gap: 1.15rem !important;
  }
}

.spoke-postcard {
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-card);
}

.spoke-postcard:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.postcard-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101622;
  overflow: hidden;
}

.postcard-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.spoke-postcard:hover .postcard-img {
  transform: scale(1.06);
}

.postcard-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 20, 28, 0.88);
  backdrop-filter: blur(4px);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid rgba(0, 195, 255, 0.3);
  z-index: 2;
}

.postcard-rtp {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 20, 28, 0.88);
  backdrop-filter: blur(4px);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(254, 208, 52, 0.35);
  z-index: 2;
}

.postcard-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
}

.postcard-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.postcard-title a {
  color: var(--text-main);
  transition: color 0.2s ease;
}

.postcard-title a:hover {
  color: var(--accent);
}

.postcard-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.postcard-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.postcard-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.postcard-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-radius: 4px;
}

.postcard-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover:not(.disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface-hover);
}

.page-btn.active {
  background: var(--grad-cta);
  color: #000;
  border-color: transparent;
  font-weight: 700;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0.75rem;
}

