/* ==========================================================================
   EDITORIAL & GATEWAY HUB LAYOUT STYLES
   Desktop sticky Table of Contents & Quick Action Sidebar + Mobile Jump Menu
   ========================================================================== */

.editorial-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .editorial-layout {
    grid-template-columns: minmax(0, 760px) 320px;
    justify-content: center;
    gap: 2.5rem;
  }
}

/* Main Content Area: Narrow readable column (60-70ch optimal reading width) */
.editorial-content {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 740px;
  width: 100%;
}

.editorial-article {
  max-width: 740px;
  width: 100%;
}

.editorial-section {
  margin-bottom: 2.25rem;
}

.editorial-section p,
.editorial-content p {
  max-width: 68ch;
  margin-bottom: 1.15rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #D8D2E3;
}

.editorial-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  max-width: 740px;
}

.editorial-h1 {
  font-size: clamp(1.65rem, 2.8vw, 2.4rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

.editorial-lead {
  font-size: 1.0625rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.editorial-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* Mobile Collapsible Table of Contents */
.mobile-toc {
  background: var(--surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.mobile-toc summary {
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-toc-list {
  list-style: none;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

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

@media (min-width: 1024px) {
  .mobile-toc {
    display: none;
  }
}

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

@media (min-width: 1024px) {
  .editorial-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    height: fit-content;
  }
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-title::after {
  content: '';
  display: block;
  height: 2px;
  width: 20px;
  background: var(--primary);
  border-radius: 9999px;
}

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

.desktop-toc-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
  display: block;
  border-left: 2px solid transparent;
}

.desktop-toc-link:hover,
.desktop-toc-link.active {
  color: var(--primary);
  background: rgba(228, 190, 49, 0.08);
  border-left-color: var(--primary);
  padding-left: 0.85rem;
}

/* Fact Rows (Stacked Label: Value) */
.fact-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.8125rem;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fact-label {
  color: var(--text-muted);
}

.fact-value {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
}

/* Step-by-Step Box Component */
.step-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

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

.step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-contrast);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(228, 190, 49, 0.4);
}

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

.step-body p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Callout Alert Boxes */
.callout {
  background: rgba(34, 24, 52, 0.7);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.15rem 1.35rem;
  margin: 1.5rem 0;
}

.callout.callout-warning {
  border-left-color: var(--accent-alert);
  background: rgba(253, 47, 47, 0.08);
}

.callout.callout-success {
  border-left-color: var(--accent-success);
  background: rgba(16, 185, 129, 0.08);
}

.callout-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.callout p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Dual-CTA Functional Section Banners */
.dual-cta-banner {
  background: linear-gradient(180deg, #271C3D 0%, #1A122B 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.dual-cta-info h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.dual-cta-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.dual-cta-btns {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Compact Responsive Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

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

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

.editorial-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

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

.editorial-table strong {
  color: var(--text-main);
}

/* ==========================================================================
   POSTCARD DIRECTORY & GAME GRID COMPONENT (.postcard)
   ========================================================================== */
.postcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0;
}

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

.postcard {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.postcard:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md), 0 0 16px rgba(228, 190, 49, 0.15);
}

.postcard-media {
  width: 100%;
  height: 140px;
  position: relative;
  overflow: hidden;
  background: #181026;
}

.postcard-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.postcard:hover .postcard-media img {
  transform: scale(1.05);
}

.postcard-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(10, 6, 18, 0.85);
  backdrop-filter: blur(4px);
  color: var(--primary);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(228, 190, 49, 0.3);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.postcard-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

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

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

/* ==========================================================================
   FEATURED EDITORIAL MEDIA (.editorial-featured-media)
   ========================================================================== */
.editorial-featured-media {
  margin: 1.5rem 0 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-md);
  background: #181026;
  max-width: 740px;
}

.editorial-featured-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.editorial-featured-caption {
  padding: 0.6rem 1rem;
  background: var(--surface);
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .editorial-h1 {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
  }
  .editorial-content {
    font-size: 1rem !important;
  }
  .editorial-section p,
  .editorial-content p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }
  .step-card {
    flex-direction: column;
    gap: 0.75rem;
  }
  .step-num {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   HOMEPAGE 6x1 GAMING CATEGORIES GRID (.category-grid-6x1)
   ========================================================================== */
.category-grid-6x1 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin: 1.75rem 0;
  width: 100%;
}

@media (max-width: 1100px) and (min-width: 768px) {
  .category-grid-6x1 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 767px) {
  .category-grid-6x1 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

.category-card-6x1 {
  background: var(--surface-card, #221834);
  border: 1px solid var(--border, #382854);
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.category-card-6x1:hover {
  transform: translateY(-4px);
  border-color: var(--primary, #E4BE31);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(228, 190, 49, 0.25);
}

.category-card-6x1 .card-media-wrap,
.category-card-6x1 .postcard-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  position: relative;
  overflow: hidden;
  background: #181026;
}

.category-card-6x1 .card-media-wrap img,
.category-card-6x1 .postcard-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.category-card-6x1:hover .card-media-wrap img,
.category-card-6x1:hover .postcard-media img {
  transform: scale(1.08);
}

.category-card-6x1 .card-badge-top,
.category-card-6x1 .postcard-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(10, 6, 18, 0.88);
  backdrop-filter: blur(4px);
  color: var(--primary, #E4BE31);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(228, 190, 49, 0.4);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.category-card-6x1 .card-content,
.category-card-6x1 .postcard-body {
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.category-card-6x1 .category-title,
.category-card-6x1 .postcard-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  line-height: 1.25;
  color: #FFFFFF;
}

.category-card-6x1 .category-desc,
.category-card-6x1 .postcard-desc {
  font-size: 0.76rem;
  color: var(--text-muted, #9A90A8);
  line-height: 1.35;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-card-6x1 .card-btn-group,
.category-card-6x1 .postcard-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: auto;
}

.category-card-6x1 .card-btn-group .btn,
.category-card-6x1 .postcard-actions .btn {
  flex: 1;
  text-align: center;
  padding: 0.42rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
}

