/* ========================================
   LAYOUT SYSTEM
======================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: var(--container-wide);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-sm {
  padding: var(--space-2xl) 0;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* Main Content Area */
.main-content {
  min-height: calc(100vh - var(--header-height) - 200px);
  padding-top: var(--header-height);
  overflow-x: clip;
}

/* Page Header */
.page-header {
  padding: var(--space-3xl) 0 var(--space-2xl);
  text-align: center;
  background: var(--gradient-bg);
  border-bottom: 1px solid var(--glass-border);
}

.page-header h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-bottom: var(--space-md);
  background: var(--gradient-hero-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: var(--space-md) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

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

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

.breadcrumbs span {
  margin: 0 var(--space-sm);
}

/* Article Content */
.article-content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
}

.article-content h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.article-content h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  color: var(--neon-blue);
}

.article-content h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.article-content p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

.article-content ul,
.article-content ol {
  margin: var(--space-lg) 0;
  padding-left: var(--space-xl);
}

.article-content li {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

.article-content ul li { list-style: disc; }
.article-content ol li { list-style: decimal; }

.article-content img {
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
  max-width: 100%;
  height: auto;
}

.article-content blockquote {
  border-left: 4px solid var(--neon-blue);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  color: var(--color-text-secondary);
  font-style: italic;
  background: var(--glass-bg);
  padding: var(--space-lg);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content table {
  width: 100%;
  margin: var(--space-xl) 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.article-content th,
.article-content td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.article-content th {
  background: var(--glass-bg);
  font-weight: 600;
  color: var(--color-text);
}

.article-content td {
  color: var(--color-text-secondary);
}

.article-content tr:last-child td {
  border-bottom: none;
}

.article-content a {
  color: var(--neon-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.article-content a:hover {
  border-bottom-color: var(--neon-blue);
}

.article-content code {
  background: var(--glass-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.9em;
  color: var(--neon-cyan);
}

.article-content pre {
  background: var(--color-bg);
  padding: var(--space-lg);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: var(--space-xl) 0;
  border: 1px solid var(--glass-border);
}

.article-content pre code {
  background: none;
  padding: 0;
  color: var(--color-text-secondary);
}

/* Sidebar Layout */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-2xl);
  align-items: start;
}

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

.sidebar-widget {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.sidebar-widget h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

/* Full Width Sections */
.full-width {
  width: 100%;
  margin-left: 0;
}

/* Aspect Ratios */
.aspect-video {
  aspect-ratio: 16/9;
}

.aspect-square {
  aspect-ratio: 1;
}

.aspect-portrait {
  aspect-ratio: 3/4;
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

/* Position */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

/* Inset */
.inset-0 {
  inset: 0;
}

/* Width & Height */
.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.min-h-screen {
  min-height: 100vh;
}

/* Object Fit */
.object-cover {
  object-fit: cover;
}

.object-contain {
  object-fit: contain;
}

/* Visibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Will Change (Performance) */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Pointer Events */
.pointer-events-none {
  pointer-events: none;
}

.pointer-events-auto {
  pointer-events: auto;
}

/* User Select */
.select-none {
  user-select: none;
}

.select-text {
  user-select: text;
}

/* Mobile overflow prevention */
@media (max-width: 768px) {
  body, .site-wrapper, .site-main, main { overflow-x: hidden; max-width: 100%; }
  .container, .art-content, .article-content, .article-body, .prose, section { overflow-wrap: break-word; word-break: break-word; }
  .casino-features, .features { min-width: auto !important; }
  .feature, .bonus-text, .casino-cta, .kw-pill, .keyword-pill { white-space: normal !important; }
}
