/**
 * LUXURY DARK PREMIUM Layout System
 * luotettavakasino.ai
 */

/* =================================
   Container
   ================================= */

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

.container-narrow {
    max-width: 800px;
}

.container-wide {
    max-width: 1600px;
}

/* =================================
   Grid System
   ================================= */

.grid {
    display: grid;
    gap: var(--space-6);
}

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

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* =================================
   Flexbox Utilities
   ================================= */

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-none { flex: none; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

/* =================================
   Main Layout Structure
   ================================= */

.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.main-content {
    flex: 1;
    position: relative;
}

/* Hero pages don't need padding-top since hero handles it */
.main-content.with-hero {
    padding-top: 0;
}

/* Standard pages need padding for fixed header */
.main-content:not(.with-hero) {
    padding-top: var(--header-height-mobile);
}

@media (min-width: 768px) {
    .main-content:not(.with-hero) {
        padding-top: var(--header-height);
    }
}

/* =================================
   Section Styles
   ================================= */

.section {
    padding: var(--section-padding-y) 0;
    position: relative;
}

.section-lg {
    padding: calc(var(--section-padding-y) * 1.5) 0;
}

.section-sm {
    padding: calc(var(--section-padding-y) * 0.6) 0;
}

/* Section Backgrounds */
.section-dark {
    background: var(--bg-primary);
}

.section-darker {
    background: var(--bg-secondary);
}

/* Collapse padding between adjacent same-background sections */
.section-darker + .section-darker {
    padding-top: 0;
}

.section-dark + .section-dark {
    padding-top: 0;
}

.section-elevated {
    background: var(--bg-tertiary);
}

/* Section with radial gradient */
.section-glow {
    position: relative;
}

.section-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-radial-section);
    pointer-events: none;
}

/* =================================
   Page Header
   ================================= */

.page-header {
    position: relative;
    padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-10);
    background: var(--gradient-radial-hero);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.page-header-content {
    position: relative;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    line-height: var(--leading-tight);
}

.page-header p {
    color: var(--text-tertiary);
    font-size: var(--text-lg);
    max-width: 700px;
    line-height: var(--leading-relaxed);
}

/* =================================
   Breadcrumbs
   ================================= */

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

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

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

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

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

/* =================================
   Sidebar Layout
   ================================= */

.layout-sidebar {
    display: grid;
    gap: var(--space-10);
}

@media (min-width: 1024px) {
    .layout-sidebar {
        grid-template-columns: 1fr 340px;
    }
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.sidebar-widget {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: var(--space-6);
    backdrop-filter: blur(var(--glass-blur));
}

.sidebar-widget h3 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--glass-border);
}

/* =================================
   Text Utilities
   ================================= */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-muted { color: var(--text-muted); }

.text-gold {
    background: var(--gradient-gold-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }

.leading-none { line-height: var(--leading-none); }
.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }
.leading-loose { line-height: var(--leading-loose); }

.tracking-tight { letter-spacing: var(--tracking-tight); }
.tracking-normal { letter-spacing: var(--tracking-normal); }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-wider { letter-spacing: var(--tracking-wider); }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =================================
   Spacing Utilities
   ================================= */

.m-0 { margin: 0; }
.m-auto { margin: auto; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }
.mt-auto { margin-top: auto; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-10 { padding-top: var(--space-10); padding-bottom: var(--space-10); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }

/* =================================
   Display Utilities
   ================================= */

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }

.visible { visibility: visible; }
.invisible { visibility: hidden; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

@media (min-width: 640px) {
    .sm\:hidden { display: none; }
    .sm\:block { display: block; }
    .sm\:flex { display: flex; }
    .sm\:grid { display: grid; }
}

@media (min-width: 768px) {
    .md\:hidden { display: none; }
    .md\:block { display: block; }
    .md\:flex { display: flex; }
    .md\:grid { display: grid; }
}

@media (min-width: 1024px) {
    .lg\:hidden { display: none; }
    .lg\:block { display: block; }
    .lg\:flex { display: flex; }
    .lg\:grid { display: grid; }
}

@media (max-width: 639px) {
    .mobile-hidden { display: none; }
}

@media (max-width: 767px) {
    .tablet-hidden { display: none; }
}

/* =================================
   Width & Height Utilities
   ================================= */

.w-full { width: 100%; }
.w-auto { width: auto; }
.max-w-full { max-width: 100%; }
.max-w-screen { max-width: 100vw; }

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

/* =================================
   Position Utilities
   ================================= */

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* =================================
   Border & Radius Utilities
   ================================= */

.border { border: 1px solid var(--glass-border); }
.border-0 { border: 0; }
.border-t { border-top: 1px solid var(--glass-border); }
.border-b { border-bottom: 1px solid var(--glass-border); }
.border-l { border-left: 1px solid var(--glass-border); }
.border-r { border-right: 1px solid var(--glass-border); }

.border-gold { border-color: var(--glass-border-gold); }

.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }
.rounded-none { border-radius: 0; }

/* =================================
   Background Utilities
   ================================= */

.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }
.bg-tertiary { background: var(--bg-tertiary); }
.bg-elevated { background: var(--bg-elevated); }
.bg-glass { background: var(--glass-bg); }
.bg-transparent { background: transparent; }

/* =================================
   Shadow Utilities
   ================================= */

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-gold { box-shadow: var(--shadow-gold); }
.shadow-none { box-shadow: none; }

/* =================================
   Overflow Utilities
   ================================= */

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* =================================
   Cursor & Pointer Utilities
   ================================= */

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* =================================
   Selection Utilities
   ================================= */

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

/* =================================
   Transition Utilities
   ================================= */

.transition { transition: var(--transition-all); }
.transition-colors { transition: var(--transition-colors); }
.transition-transform { transition: var(--transition-transform); }
.transition-opacity { transition: var(--transition-opacity); }
.transition-shadow { transition: var(--transition-shadow); }
.transition-none { transition: none; }

/* =================================
   Transform Utilities
   ================================= */

.scale-100 { transform: scale(1); }
.scale-105 { transform: scale(1.05); }
.scale-110 { transform: scale(1.1); }

.translate-y-0 { transform: translateY(0); }
.-translate-y-1 { transform: translateY(-0.25rem); }
.-translate-y-2 { transform: translateY(-0.5rem); }

.rotate-0 { transform: rotate(0deg); }
.rotate-45 { transform: rotate(45deg); }
.rotate-90 { transform: rotate(90deg); }
.rotate-180 { transform: rotate(180deg); }

/* =================================
   Aspect Ratio
   ================================= */

.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-4-3 { aspect-ratio: 4 / 3; }

/* =================================
   Accessibility
   ================================= */

.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;
}

.focus-visible:focus {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
}

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