/* ========================================
   LAKUM ARTSPACE - GLOBAL STYLES
   Premium Minimalistic Design System
   ======================================== */

/* ===== UNIVERSAL FONT FAMILY ===== */
* {
    font-family: 'Greta Arabic', 'Greta Text Arabic', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

body {
    font-family: 'Greta Arabic', 'Greta Text Arabic', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ===== CSS VARIABLES - DESIGN TOKENS ===== */

:root {
    /* Premium Color Palette */
    --color-primary: #1a1a1a;
    --color-secondary: #2d2d2d;
    --color-accent: #8a7968;
    --color-accent-light: #b8a896;
    --color-background: #f6f6eb;
    --color-background-alt: #edecdf;
    --color-surface: #ffffff;
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #525252;
    --color-text-muted: #8a8a8a;
    --color-text-light: #ffffff;
    --color-border: #d1d1d1;
    --color-border-light: #e8e8e8;
    --color-success: #4caf50;
    --color-warning: #f8a63a;
    --color-error: #e53935;
    /* Typography Scale - Refined */
    --font-family-primary: 'Greta Arabic', 'Greta Text Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-secondary: 'Greta Arabic', 'Greta Text Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 0.75rem;
    /* 12px */
    --font-size-sm: 0.875rem;
    /* 14px */
    --font-size-base: 1rem;
    /* 16px */
    --font-size-md: 1.125rem;
    /* 18px */
    --font-size-lg: 1.25rem;
    /* 20px */
    --font-size-xl: 1.5rem;
    /* 24px */
    --font-size-2xl: 1.875rem;
    /* 30px */
    --font-size-3xl: 2.25rem;
    /* 36px */
    --font-size-4xl: 3rem;
    /* 48px */
    --font-size-5xl: 3.75rem;
    /* 60px */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-tight: 1.3;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.8;
    /* Spacing Scale - Consistent */
    --spacing-xs: 0.25rem;
    /* 4px */
    --spacing-sm: 0.5rem;
    /* 8px */
    --spacing-md: 1rem;
    /* 16px */
    --spacing-lg: 1.5rem;
    /* 24px */
    --spacing-xl: 2rem;
    /* 32px */
    --spacing-2xl: 3rem;
    /* 48px */
    --spacing-3xl: 4rem;
    /* 64px */
    --spacing-4xl: 6rem;
    /* 96px */
    --spacing-5xl: 8rem;
    /* 128px */
    /* Border Radius - Minimalistic */
    --radius-none: 0;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;
    /* Shadows - Subtle */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 24px 0 rgba(0, 0, 0, 0.1);
    /* Transitions - Smooth */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    /* Image Aspect Ratios */
    --aspect-square: 1 / 1;
    --aspect-portrait: 3 / 4;
    --aspect-landscape: 4 / 3;
    --aspect-wide: 16 / 9;
    --aspect-ultrawide: 21 / 9;
}

/* ===== GLOBAL RESETS ===== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-background);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== TYPOGRAPHY - REFINED ===== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Greta Arabic', 'Greta Text Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-medium);
}

h2 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-medium);
}

h3 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-medium);
}

h4 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-medium);
}

h5 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-normal);
}

h6 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

p {
    margin: 0;
    line-height: var(--line-height-relaxed);
    text-align: justify;
    text-justify: inter-word;
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    font-family: 'Greta Arabic', 'Greta Text Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: var(--font-weight-light);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
    font-family: 'Greta Arabic', 'Greta Text Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: var(--font-weight-light);
}

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

/* Text Utilities */

.text-justify {
    text-align: justify;
    text-justify: inter-word;
}

.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

/* ===== BUTTONS ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-xl);
    font-family: 'Greta Arabic', 'Greta Text Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-light);
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-ghost {
    background-color: transparent;
    color: var(--color-primary);
    border-color: transparent;
}

.btn-ghost:hover {
    background-color: var(--color-background-alt);
}

/* ===== LOADING STATES ===== */

.loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border-light);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: var(--spacing-3xl);
}

.skeleton {
    background: linear-gradient( 90deg, var(--color-border-light) 25%, #f0f0f0 50%, var(--color-border-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--spacing-sm);
}

.skeleton-title {
    height: 2em;
    width: 60%;
    margin-bottom: var(--spacing-md);
}

.skeleton-image {
    width: 100%;
    height: 300px;
}

/* ===== EMPTY STATES ===== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-4xl) var(--spacing-xl);
    min-height: 300px;
}

.empty-state-icon {
    font-size: var(--font-size-5xl);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
}

.empty-state-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
}

.empty-state-description {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    max-width: 400px;
    margin-bottom: var(--spacing-lg);
}

/* ===== IMAGE HANDLING - PERFECT & ORGANIZED ===== */

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

img[data-src] {
    opacity: 0;
    transition: opacity var(--transition-base);
}

img.loaded {
    opacity: 1;
}

/* Image Wrapper - Aspect Ratio Control */

.image-wrapper {
    position: relative;
    overflow: hidden;
    background-color: var(--color-border-light);
    border-radius: var(--radius-sm);
}

.image-wrapper::before {
    content: '';
    display: block;
    padding-top: 75%;
    /* 4:3 aspect ratio default */
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Aspect Ratio Variants */

.image-wrapper--square::before {
    padding-top: 100%;
}

.image-wrapper--portrait::before {
    padding-top: 133.33%;
}

.image-wrapper--landscape::before {
    padding-top: 75%;
}

.image-wrapper--wide::before {
    padding-top: 56.25%;
}

.image-wrapper--ultrawide::before {
    padding-top: 42.86%;
}

/* Image Object Fit Utilities */

.img-cover {
    object-fit: cover;
}

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

.img-fill {
    object-fit: fill;
}

/* Consistent Image Heights */

.img-h-200 {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.img-h-250 {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

.img-h-300 {
    height: 300px;
    object-fit: cover;
    width: 100%;
}

.img-h-350 {
    height: 350px;
    object-fit: cover;
    width: 100%;
}

.img-h-400 {
    height: 400px;
    object-fit: cover;
    width: 100%;
}

.img-h-450 {
    height: 450px;
    object-fit: cover;
    width: 100%;
}

.img-h-500 {
    height: 500px;
    object-fit: cover;
    width: 100%;
}

/* Rounded Corners */

.img-rounded-none {
    border-radius: 0;
}

.img-rounded-sm {
    border-radius: var(--radius-sm);
}

.img-rounded-md {
    border-radius: var(--radius-md);
}

.img-rounded-lg {
    border-radius: var(--radius-lg);
}

.img-rounded-xl {
    border-radius: var(--radius-xl);
}

/* ===== LAYOUT UTILITIES ===== */

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

.container-wide {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.container-narrow {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* Grid System - Minimalistic */

.grid {
    display: grid;
    gap: var(--spacing-xl);
}

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

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

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

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

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

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

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

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

.gap-2xl {
    gap: var(--spacing-2xl);
}

/* Flexbox Utilities */

.flex {
    display: flex;
}

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

.flex-row {
    flex-direction: row;
}

.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-start {
    justify-content: flex-start;
}

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

/* Text Alignment */

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

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

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

/* Font Weights */

.font-light {
    font-weight: var(--font-weight-light);
}

.font-normal {
    font-weight: var(--font-weight-normal);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

/* Text Colors */

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

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

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

/* Spacing Utilities */

.mb-xs {
    margin-bottom: var(--spacing-xs);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.mb-2xl {
    margin-bottom: var(--spacing-2xl);
}

.mb-3xl {
    margin-bottom: var(--spacing-3xl);
}

.mt-xs {
    margin-top: var(--spacing-xs);
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mt-2xl {
    margin-top: var(--spacing-2xl);
}

.mt-3xl {
    margin-top: var(--spacing-3xl);
}

.py-sm {
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

.py-md {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

.py-lg {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.py-xl {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.py-2xl {
    padding-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
}

.py-3xl {
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-3xl);
}

.px-sm {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

.px-md {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.px-lg {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

.px-xl {
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
}

.px-2xl {
    padding-left: var(--spacing-2xl);
    padding-right: var(--spacing-2xl);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

@media (max-width: 1440px) {
    :root {
        --font-size-5xl: 3.5rem;
        --font-size-4xl: 2.75rem;
    }
}

@media (max-width: 1024px) {
    :root {
        --font-size-5xl: 3rem;
        --font-size-4xl: 2.5rem;
        --font-size-3xl: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.75rem;
        --font-size-2xl: 1.5rem;
    }
    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-5xl: 2rem;
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.5rem;
    }
}

/* ===== 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-width: 0;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ===== SMOOTH ANIMATIONS ===== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   LAKUM ARTSPACE - COMPONENT STYLES
   Perfect Cards & Event Displays
   ======================================== */

/* ===== EVENT CARD - MINIMALISTIC ===== */

.event-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.event-card__image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.event-card__content {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.event-card__date {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-card__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-light);
    color: var(--color-text-primary);
    line-height: var(--line-height-tight);
    margin: 0;
}

.event-card__description {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== SECTION HEADERS ===== */

.section-header {
    margin-bottom: var(--spacing-3xl);
    text-align: center;
}

.section-header__title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-light);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.section-header__subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    text-align: justify;
    text-justify: inter-word;
}

/* ===== HERO SECTIONS ===== */

.hero {
    position: relative;
    width: 100%;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-text-light);
    max-width: 800px;
    padding: 0 var(--spacing-xl);
}

.hero__title {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
    font-family: 'Greta Arabic', 'Greta Text Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Lakum specific hero title */
.lakum-hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: #fff;
    font-family: 'Greta Arabic', 'Greta Text Arabic', -apple-system, BlinkMacSystemFont, sans-serif !important;
    letter-spacing: -0.02em;
}

.hero__description {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-2xl);
}

/* ===== GALLERY GRID ===== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin: var(--spacing-3xl) 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition-base);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item__image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-lg);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-item:hover .gallery-item__overlay {
    opacity: 1;
}

.gallery-item__title {
    color: var(--color-text-light);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-normal);
    margin: 0;
}

/* ===== TEXT TRUNCATION ===== */

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

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

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

/* ===== RESPONSIVE IMAGES ===== */

@media (max-width: 1024px) {
    .event-card__image,
    .gallery-item__image {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .event-card__image,
    .gallery-item__image {
        height: 250px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .event-card__image,
    .gallery-item__image {
        height: 220px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ===== PAGE LOADER ===== */

.lakum-page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.lakum-page-loader--active {
    opacity: 1;
    pointer-events: auto;
}

.lakum-page-loader__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.lakum-page-loader__spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: lakum-spin 0.6s linear infinite;
}

@keyframes lakum-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== IMAGE LOADING STATES ===== */

.lakum-img-loading {
    background: linear-gradient( 90deg, var(--color-border-light) 25%, #f0f0f0 50%, var(--color-border-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    min-height: 200px;
}

.lakum-img-loaded {
    animation: fadeIn 0.3s ease-in;
}

.lakum-img-error {
    background: var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.lakum-img-error::after {
    content: '⚠️ Image failed to load';
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== RESPONSIVE IMAGE OPTIMIZATION ===== */

img {
    /* Prevent layout shift */
    aspect-ratio: attr(width) / attr(height);
    height: auto;
}

/* Picture element styling */

picture {
    display: block;
    position: relative;
}

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

/* Lazy loading placeholder */

img[loading="lazy"]:not([src]) {
    background: var(--color-border-light);
    min-height: 200px;
}

/* WebP support detection */

.no-webp picture source[type="image/webp"] {
    display: none;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Reduce motion for users who prefer it */

@media (prefers-reduced-motion: reduce) {
    .lakum-img-loading {
        animation: none;
    }
    .lakum-img-loaded {
        animation: none;
    }
}

/* GPU acceleration for smooth animations */

.lakum-exhibition-card,
.lakum-upcoming-card,
.gallery-item {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize font rendering */

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1;
    font-kerning: normal;
}

/* Contain layout shifts */

.lakum-hero,
.lakum-featured-event,
.lakum-upcoming-banner {
    contain: layout style paint;
}

/* Optimize repaints */

.lakum-hero__image,
.lakum-featured-event__background,
.lakum-upcoming-banner__image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.lakum-upcoming-banner__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lakum-hero__image,
.lakum-featured-event__background,
.lakum-upcoming-banner__image {
    will-change: transform;
    transform: translateZ(0);
}

/* ===== SLOW CONNECTION OPTIMIZATIONS ===== */

.slow-connection * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
}

.slow-connection img {
    image-rendering: auto;
}

/* Reduce motion for performance */

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* ===== CRITICAL PERFORMANCE FIXES ===== */

/* Prevent layout shifts with aspect ratios */

img:not([width]):not([height]) {
    aspect-ratio: attr(width) / attr(height);
}

/* Optimize hero image rendering */

.lakum-hero__image {
    content-visibility: auto;
    contain-intrinsic-size: 1920px 1080px;
}

/* GPU acceleration for smooth performance */

.lakum-hero,
.lakum-hero__image,
.lakum-exhibition-card,
.lakum-upcoming-card {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize font rendering for performance */

body {
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: subpixel-antialiased;
}

/* Contain layout for better performance */

.lakum-hero,
.lakum-section,
.lakum-exhibition-card,
.lakum-upcoming-card {
    contain: layout style paint;
}