/* ========================================
   Centrum Voľného Času - Modern School Website
   ======================================== */

/* CSS Custom Properties (Variables) */
:root {
    /* Primary Blue Color Palette */
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --primary-blue-light: #3b82f6;
    --secondary-blue: #60a5fa;
    --accent-blue: #93c5fd;
    --light-blue: #dbeafe;
    --ultra-light-blue: #eff6ff;
    
    /* Supporting Colors */
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --error-red: #ef4444;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    
    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography */
    --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Breakpoints */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--ultra-light-blue);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Modern overlay pattern */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* Subtle geometric patterns */
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 85%, rgba(96, 165, 250, 0.06) 0%, transparent 30%),
        radial-gradient(circle at 45% 25%, rgba(147, 197, 253, 0.05) 0%, transparent 35%),
        radial-gradient(circle at 75% 65%, rgba(59, 130, 246, 0.07) 0%, transparent 28%),
        /* Modern mesh gradient */
        conic-gradient(from 0deg at 20% 30%, rgba(37, 99, 235, 0.03), rgba(96, 165, 250, 0.02), rgba(147, 197, 253, 0.04), rgba(37, 99, 235, 0.03)),
        conic-gradient(from 180deg at 80% 70%, rgba(59, 130, 246, 0.02), rgba(37, 99, 235, 0.03), rgba(96, 165, 250, 0.02), rgba(59, 130, 246, 0.03));
    background-size: 
        800px 800px, 600px 600px, 400px 400px, 500px 500px,
        1200px 1200px, 1000px 1000px;
    background-position: 
        0% 0%, 100% 100%, 30% 20%, 70% 80%,
        0% 0%, 100% 100%;
    animation: modernFloat 25s ease-in-out infinite;
    z-index: -1;
    opacity: 0.4;
}

/* ========================================
   MODERN BACKGROUND
   ======================================== */

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, var(--ultra-light-blue) 0%, var(--light-blue) 25%, var(--white) 50%, var(--ultra-light-blue) 75%, var(--light-blue) 100%);
    z-index: -2;
}

@keyframes modernFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.4;
    }
    25% { 
        transform: translateY(-15px) rotate(0.5deg) scale(1.02);
        opacity: 0.5;
    }
    50% { 
        transform: translateY(-8px) rotate(-0.3deg) scale(0.98);
        opacity: 0.3;
    }
    75% { 
        transform: translateY(-20px) rotate(0.2deg) scale(1.01);
        opacity: 0.6;
    }
}

/* ========================================
   HEADER STYLES
   ======================================== */

header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--accent-blue);
}

/* Header Top Section */
.header-top {
    padding: var(--space-md) 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
}

.header-top-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}

.header-info {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    flex: 1;
}

.logo-container {
    flex-shrink: 0;
}

.header-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.header-social {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--white);
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: var(--accent-blue);
    color: var(--white);
}

.social-btn i {
    font-size: 1.2rem;
    z-index: 1;
    position: relative;
}

/* Hamburger Menu */
.header-hamburger {
    display: none;
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.hamburger-menu:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--accent-blue);
}

.hamburger-menu span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--primary-blue);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
}

.hamburger-menu:hover span {
    background: var(--white);
}

/* Hamburger menu active state */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Ensure hamburger menu is always accessible on mobile */
@media (max-width: 768px) {
    .hamburger-menu {
        min-width: 44px;
        min-height: 44px;
        z-index: 1001;
        position: relative;
        /* Additional properties for problematic devices */
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        /* Ensure it's always above other elements */
        position: relative;
        background: var(--white) !important;
        border: 2px solid var(--primary-blue);
    }
    
    .hamburger-menu:active {
        transform: scale(0.95);
        background: var(--accent-blue) !important;
    }
    
    .hamburger-menu:hover {
        background: var(--accent-blue) !important;
    }
    
    /* Ensure hamburger menu is always visible and clickable */
    .header-hamburger {
        display: block !important;
        position: relative;
        z-index: 1002;
    }
}

/* Header Bottom Section */
.header-bottom {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    border-top: 1px solid var(--accent-blue);
}

.header-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.header-nav {
    display: flex;
    justify-content: flex-start;
}

.main-nav {
    display: flex;
    gap: var(--space-md);
    list-style: none;
    padding: var(--space-sm) 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: block;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--accent-blue);
    color: var(--white);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content {
    width: 100%;
    max-width: 1200px;
    min-width: 320px;
    margin: var(--space-xl) auto;
    padding: var(--space-2xl) var(--space-lg);
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--light-blue);
    position: relative;
    overflow: hidden;
}

.content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue), var(--secondary-blue), var(--primary-blue));
    background-size: 200% 100%;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1 {
    color: var(--primary-blue);
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--space-xl);
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
    border-radius: var(--radius-full);
}

h2 {
    color: var(--primary-blue-dark);
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    position: relative;
}

h2::before {
    content: "🎨";
    margin-right: var(--space-sm);
    font-size: var(--font-size-2xl);
}

h3 {
    color: var(--text-dark);
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

p {
    margin-bottom: var(--space-lg);
    line-height: 1.7;
    color: var(--text-medium);
}

strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    color: var(--white);
    padding: var(--space-xl) 0;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--secondary-blue), var(--accent-blue));
    background-size: 200% 100%;
    animation: gradient-shift 3s ease-in-out infinite;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.footer-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.footer-logo-img {
    height: 100px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.footer-logo-img:hover {
    transform: scale(1.05);
}

.footer-nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    margin-left: var(--space-lg);
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.footer-nav a:hover {
    color: var(--accent-blue);
}

.footer-contact {
    flex-shrink: 0;
    text-align: right;
    font-weight: 500;
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.footer-contact > div {
    margin-bottom: var(--space-xs);
    white-space: nowrap;
}

.contact-name {
    font-weight: 700;
    font-size: var(--font-size-base);
    margin-bottom: var(--space-sm);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet Styles */
@media (max-width: 1024px) {
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    .header-top-container {
        padding: 0 var(--space-md);
    }
    
    .header-bottom-container {
        padding: 0 var(--space-md);
    }
    
    .content {
        margin: var(--space-lg) 0;
        padding: var(--space-xl) var(--space-md);
        width: 100%;
        max-width: 100%;
    }
    
    .footer-container {
        padding: 0 var(--space-md);
    }
    
    /* Fix footer contact overflow */
    .footer-contact > div {
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Ensure all containers respect viewport width */
    .header-top-container,
    .header-bottom-container,
    .content,
    .footer-container {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    :root {
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
    }
    
    .header-top {
        padding: var(--space-sm) 0;
    }
    
    .header-top-container {
        flex-direction: column;
        gap: var(--space-md);
        padding: 0 var(--space-md);
    }
    
    .header-info {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .header-social {
        justify-content: center;
    }
    
    .header-hamburger {
        display: block;
    }
    
    .header-bottom {
        display: none;
    }
    
    .header-bottom.active {
        display: block;
    }
    
    .header-nav {
        justify-content: center;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 0;
        padding: var(--space-md) 0;
        align-items: center;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }
    
    .main-nav a {
        display: block;
        padding: var(--space-lg);
        text-align: center;
        border-radius: 0;
    }
    
    .content {
        width: calc(100% - var(--space-lg));
        max-width: none;
        margin: var(--space-md) auto;
        padding: var(--space-lg) var(--space-md);
        border-radius: var(--radius-lg);
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
    }
    
    .footer-nav {
        justify-content: center;
        margin-left: 0;
    }
    
    .footer-nav ul {
        align-items: center;
    }
    
    .footer-contact {
        text-align: center;
    }
    
    h1::after {
        width: 60px;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .header-logo {
        height: 50px;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
    }
    
    .hamburger-menu {
        width: 44px;
        height: 44px;
    }
    
    .content {
        width: calc(100% - var(--space-md));
        max-width: none;
        margin: var(--space-sm) auto;
        padding: var(--space-md);
    }
    
    .footer-logo-img {
        height: 60px;
    }
}

/* Very Small Screens (0-319px) */
@media (max-width: 319px) {
    /* Ensure all containers use full width on very small screens */
    .header-top-container,
    .header-bottom-container,
    .footer-container {
        max-width: 100%;
        width: 100%;
        padding: 0 var(--space-sm);
    }
    
    .content {
        max-width: 100%;
        width: 100%;
        margin: var(--space-md) 0;
        padding: var(--space-md) var(--space-sm);
    }
    
    /* Reduce padding on very small screens */
    .header-top {
        padding: var(--space-xs) 0;
    }
    
    .header-bottom {
        padding: var(--space-xs) 0;
    }
    
    .footer {
        padding: var(--space-md) 0;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

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

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

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

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

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

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

/* ========================================
   Image Styling
   
   Usage Examples:
   - <img src="image.jpg" alt="Description"> (basic responsive image)
   - <div class="image-container"><img src="image.jpg" alt="Description"></div> (with hover effects)
   - <div class="image-grid"><img src="image1.jpg"><img src="image2.jpg"></div> (responsive grid)
   - <div class="image-with-caption"><img src="image.jpg"><p class="image-caption">Caption text</p></div>
   - <img src="image.jpg" class="hero-image" alt="Hero"> (large hero images)
   - <img src="image.jpg" class="thumbnail" alt="Thumb"> (small thumbnails)
   - <img src="image.jpg" class="profile-image" alt="Profile"> (circular profile images)
   ======================================== */

/* Base image styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

/* Website content images (from CKEditor output) */
/* CKEditor outputs images as <figure class="image"> on the website */
figure.image {
    margin: var(--space-lg) 0;
    text-align: center;
    display: block;
}

figure.image img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

figure.image img:hover {
    transform: scale(1.02);
}

figure.image figcaption {
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    font-style: italic;
    text-align: center;
}

/* Handle different image alignments that CKEditor might output */
figure.image.image-style-side {
    float: left;
    margin: 0 var(--space-md) var(--space-md) 0;
    max-width: 50%;
}

figure.image.image-style-align-left {
    float: left;
    margin: 0 var(--space-md) var(--space-md) 0;
}

figure.image.image-style-align-right {
    float: right;
    margin: 0 0 var(--space-md) var(--space-md);
}

figure.image.image-style-align-center {
    display: block;
    margin: var(--space-md) auto;
    text-align: center;
}

/* Clear floats after figure images */
figure.image::after {
    content: "";
    display: table;
    clear: both;
}

/* Logo and header image styling */
.header-logo,
.footer-logo-img {
    height: 100px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.header-logo:hover,
.footer-logo-img:hover {
    transform: scale(1.05);
}

/* Social media icons */
.social-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* Navigation images */
nav img {
    max-height: 40px;
    width: auto;
}

/* Image containers */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

/* Responsive image grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.image-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.05);
}

/* Image with caption */
.image-with-caption {
    text-align: center;
    margin: var(--space-xl) 0;
}

.image-with-caption img {
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.image-caption {
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    font-style: italic;
}

/* Hero images */
.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Thumbnail images */
.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-200);
    transition: border-color 0.3s ease;
}

.thumbnail:hover {
    border-color: var(--primary-blue);
}

/* Profile images */
.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Logo images */
.logo-image {
    max-height: 60px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
    transition: filter 0.3s ease;
}

.logo-image:hover {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Image loading states */
.image-loading {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Image error state */
.image-error {
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: var(--font-size-sm);
    min-height: 200px;
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-md);
}

/* Responsive image sizing */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--space-md);
    }
    
    .image-grid img {
        height: 150px;
    }
    
    .hero-image {
        height: 250px;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
    }
    
    /* Website content images responsive styles */
    figure.image {
        margin: var(--space-sm) 0;
    }
    
    figure.image.image-style-side,
    figure.image.image-style-align-left,
    figure.image.image-style-align-right {
        float: none;
        display: block;
        margin: var(--space-sm) auto;
        max-width: 100%;
        text-align: center;
    }
}

/* High contrast mode for images */
@media (prefers-contrast: high) {
    img {
        border: 1px solid var(--text-dark);
    }
    
    .image-container {
        border: 2px solid var(--text-dark);
    }
}

/* Reduced motion for images */
@media (prefers-reduced-motion: reduce) {
    img,
    .image-container,
    .image-grid img {
        transition: none;
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
*:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #0000ff;
        --text-dark: #000000;
        --white: #ffffff;
    }
}

/* ========================================
   Table Styling
   
   Usage Examples:
   - <table><tr><td>Content</td></tr></table> (basic table)
   - <table class="table-striped"><tr><td>Content</td></tr></table> (striped rows)
   - <table class="table-bordered"><tr><td>Content</td></tr></table> (bordered)
   - <table class="table-hover"><tr><td>Content</td></tr></table> (hover effects)
   - <table class="table-responsive"><tr><td>Content</td></tr></table> (responsive wrapper)
   ======================================== */

/* Base table styles */
table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: var(--space-lg) 0;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

/* Table header */
thead {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: var(--white);
}

thead th {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--primary-blue-dark);
}

thead th:first-child {
    border-top-left-radius: var(--radius-md);
}

thead th:last-child {
    border-top-right-radius: var(--radius-md);
}

/* Table body */
tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: background-color 0.2s ease;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-md);
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-md);
}

/* Table cells */
td, th {
    padding: var(--space-md) var(--space-lg);
    vertical-align: top;
    text-align: left;
}

td {
    color: var(--text-dark);
    border-right: 1px solid var(--gray-200);
}

td:last-child {
    border-right: none;
}

/* Striped table variant */
.table-striped tbody tr:nth-child(even) {
    background-color: var(--gray-50);
}

.table-striped tbody tr:nth-child(odd) {
    background-color: var(--white);
}

/* Bordered table variant */
.table-bordered {
    border: 1px solid var(--gray-200);
}

.table-bordered td,
.table-bordered th {
    border: 1px solid var(--gray-200);
}

/* Hover effects */
.table-hover tbody tr:hover {
    background-color: var(--light-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Compact table */
.table-compact td,
.table-compact th {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-xs);
}

/* Large table */
.table-large td,
.table-large th {
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--font-size-lg);
}

/* Table with centered content */
.table-center td,
.table-center th {
    text-align: center;
}

/* Table with right-aligned content */
.table-right td,
.table-right th {
    text-align: right;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table-responsive table {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
}

/* Mobile table styles */
@media (max-width: 768px) {
    table {
        font-size: var(--font-size-xs);
    }
    
    td, th {
        padding: var(--space-sm) var(--space-md);
    }
    
    /* Stack table on very small screens */
    .table-stack {
        display: block;
    }
    
    .table-stack thead {
        display: none;
    }
    
    .table-stack tbody,
    .table-stack tr,
    .table-stack td {
        display: block;
    }
    
    .table-stack tr {
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        margin-bottom: var(--space-md);
        padding: var(--space-md);
        background: var(--white);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .table-stack td {
        border: none;
        padding: var(--space-xs) 0;
        text-align: left;
    }
    
    .table-stack td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--primary-blue);
        display: inline-block;
        width: 40%;
    }
}

/* Table with action buttons */
.table-actions td:last-child {
    text-align: right;
    white-space: nowrap;
}

.table-actions .btn {
    margin-left: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
}

/* Table with status indicators */
.table-status .status {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-status .status.active {
    background-color: var(--success-green);
    color: var(--white);
}

.table-status .status.inactive {
    background-color: var(--text-light);
    color: var(--white);
}

.table-status .status.pending {
    background-color: var(--warning-orange);
    color: var(--white);
}

.table-status .status.error {
    background-color: var(--error-red);
    color: var(--white);
}

/* Table with numeric data */
.table-numeric td:last-child,
.table-numeric th:last-child {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Table with sortable headers */
.table-sortable th {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.table-sortable th:hover {
    background-color: var(--primary-blue-dark);
}

.table-sortable th:after {
    content: "↕";
    position: absolute;
    right: var(--space-sm);
    opacity: 0.5;
}

.table-sortable th.sort-asc:after {
    content: "↑";
    opacity: 1;
}

.table-sortable th.sort-desc:after {
    content: "↓";
    opacity: 1;
}

/* Tables maintain light theme for better readability */
