/* ==========================================
   LAYOUT - Grid & Container
   Premium Casino Design
   ========================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  overflow-x: hidden;
}

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

/* Main Layout */
.site-main {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Section Base */
section {
  position: relative;
}

/* 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);
}

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

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

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

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

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

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

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.gap-xl {
  gap: var(--space-xl);
}

/* Card Base */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--small-size);
  color: var(--text-light-gray);
  margin-bottom: var(--space-lg);
}

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

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

.breadcrumbs span {
  color: var(--text-light-gray);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-md);
  font-weight: var(--weight-medium);
  transition: all var(--transition-fast);
}

.pagination a {
  background: var(--bg-white);
  border: 1px solid var(--bg-gray);
  color: var(--text-dark);
}

.pagination a:hover {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #000;
}

.pagination span.current {
  background: var(--primary-blue);
  color: var(--text-white);
}

.pagination span.dots {
  background: transparent;
  border: none;
  min-width: auto;
  padding: 0;
}

/* Two Column Layout */
.two-column {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
}

.two-column .main-content {
  min-width: 0;
}

.two-column .sidebar {
  position: static;
  height: fit-content;
}

/* Article Page Specific */
.article-page-header {
  padding: var(--space-3xl) 0 var(--space-2xl);
  background: var(--hero-gradient);
  color: var(--text-white);
}

.article-page-header .page-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--text-white) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-meta-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  font-size: var(--small-size);
  color: rgba(255, 255, 255, 0.8);
}

.article-meta-header span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.article-meta-header svg {
  opacity: 0.7;
}

.article-date,
.article-reading-time {
  padding: var(--space-xs) var(--space-md);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  backdrop-filter: blur(4px);
}

.article-page-content {
  padding: var(--space-3xl) 0;
  background: var(--bg-light-gray);
}

.article-body {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.article-body h1 {
  font-size: var(--h2-size);
}

.article-body h2 {
  font-size: 1.5rem;
}

.article-body h3 {
  font-size: var(--h3-size);
}

.article-body p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
  color: var(--text-dark);
}

.article-body ul,
.article-body ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.article-body li {
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

.article-body img {
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

.article-body blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--bg-light-gray);
  border-left: 4px solid var(--accent-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}

.article-body table {
  width: 100%;
  margin: var(--space-lg) 0;
  border-collapse: collapse;
}

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

.article-body th {
  background: var(--bg-light-gray);
  font-weight: var(--weight-semibold);
}

.article-body a {
  color: var(--primary-blue);
  text-decoration: underline;
  text-decoration-color: var(--accent-gold);
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--accent-gold);
}

/* Article Footer */
.article-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xl);
  margin-top: var(--space-xl);
  background: linear-gradient(135deg, var(--bg-light-gray) 0%, #f8f9fa 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Article Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.tag-label {
  font-size: var(--small-size);
  font-weight: var(--weight-semibold);
  color: var(--text-gray);
  margin-right: var(--space-xs);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  color: var(--text-white);
  font-size: var(--small-size);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border-radius: 50px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
}

.tag:hover {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #e6951f 100%);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

/* Article Share */
.article-share {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.share-label {
  font-size: var(--small-size);
  font-weight: var(--weight-semibold);
  color: var(--text-gray);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-white);
  transition: all var(--transition-fast);
}

.share-btn:hover {
  transform: translateY(-3px) scale(1.1);
}

.share-facebook {
  background: linear-gradient(135deg, #1877f2 0%, #0d5bbd 100%);
  box-shadow: 0 3px 10px rgba(24, 119, 242, 0.3);
}

.share-facebook:hover {
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.share-twitter {
  background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
  box-shadow: 0 3px 10px rgba(29, 161, 242, 0.3);
}

.share-twitter:hover {
  box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}

/* Related Links */
.related-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-links li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--bg-gray);
}

.related-links li:last-child {
  border-bottom: none;
}

.related-links a {
  display: block;
  color: var(--text-dark);
  text-decoration: none;
  font-size: var(--small-size);
  line-height: 1.5;
  transition: all var(--transition-fast);
  padding-left: var(--space-md);
  position: relative;
}

.related-links a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.related-links a:hover {
  color: var(--primary-blue);
  padding-left: calc(var(--space-md) + 4px);
}

.related-links a:hover::before {
  width: 8px;
  height: 8px;
  background: var(--primary-blue);
}

/* Sidebar Card */
.sidebar-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--bg-gray);
  overflow: hidden;
}

.sidebar-card-title {
  font-family: var(--font-heading);
  font-size: var(--h4-size);
  font-weight: var(--weight-semibold);
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sidebar-card-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--accent-gold);
  border-radius: 2px;
  flex-shrink: 0;
}

/* CTA Card */
.cta-card {
  background: var(--hero-gradient);
  color: var(--text-white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  text-align: center;
}

.cta-card h3 {
  font-family: var(--font-heading);
  font-size: var(--h4-size);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-sm);
}

.cta-card p {
  font-size: var(--small-size);
  opacity: 0.9;
  margin-bottom: var(--space-lg);
}

/* 404 Page */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: var(--space-2xl);
  background: var(--hero-gradient);
}

.error-content {
  max-width: 500px;
}

.error-code {
  font-family: var(--font-heading);
  font-size: 8rem;
  font-weight: var(--weight-extrabold);
  color: var(--accent-gold);
  line-height: 1;
  text-shadow: 0 4px 20px rgba(245, 166, 35, 0.3);
}

.error-title {
  font-family: var(--font-heading);
  font-size: var(--h2-size);
  font-weight: var(--weight-bold);
  color: var(--text-white);
  margin: var(--space-md) 0;
}

.error-description {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-xl);
}

/* Responsive Grid */
@media (max-width: 1024px) {
  .two-column {
    grid-template-columns: 1fr;
  }

  .two-column .sidebar {
    position: static;
    order: 1;
  }

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

@media (max-width: 768px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .error-code {
    font-size: 5rem;
  }

  .article-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .article-tags {
    width: 100%;
  }

  .article-share {
    width: 100%;
    justify-content: flex-start;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .article-body {
    padding: var(--space-lg);
  }

  .article-page-header {
    padding: var(--space-2xl) 0 var(--space-xl);
  }
}

/* Sidebar overflow */
.sidebar {
  min-width: 0;
}

/* Scrollable tables on mobile */
.table-wrapper, .article-content table { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 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; }
}
