:root {
    --primary-color: #0076a8;
    --secondary-color: #004d6b;
    --accent-color: #ff6b35;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --background-light: #ffffff;
    --background-gray: #f8f9fa;
    --border-color: #e1e5e9;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;

    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-gray);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.header .subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}
/* --- HERO SHRINK + LAYOUT --- */
.header {
    padding: 3rem 0;        /* was 4rem */
    margin-bottom: 2.5rem; /* was 4rem */
}

.header-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    gap: 2.5rem;
}

/* Right-aligned QR card inside hero */
.hero-qr {
    background: rgba(255,255,255,0.95);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    max-width: 420px;
    justify-self: end;
}

.hero-qr .qr-code-image {
    width: 160px;
    height: 160px;
}

.hero-qr h3 {
    font-size: 1.25rem;
}

/* Mobile */
@media (max-width: 900px) {
    .header-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-qr {
        justify-self: center;
    }
}


/* Gallery Styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.demo-card {
    background: var(--background-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
}

.demo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

.demo-card-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
}

.demo-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.demo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.demo-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
}

.status-indicator.inactive {
    background: #6c757d;
}

.demo-card-body {
    padding: 2rem 2.5rem 2.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.demo-thumbnail {
        max-width: 100%;
        height: auto;
    }

.demo-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Demo Image Styles */
.demo-image {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.demo-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: var(--transition);
}

.demo-thumbnail:hover {
    transform: scale(1.02);
}

.demo-tags {
    display: none; //flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    background: var(--background-gray);
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.demo-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-light);
}

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

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Footer Styles */
.footer {
    background: var(--background-light);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: #fff5f5;
    color: #c53030;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid #fed7d7;
    margin: 2rem 0;
}

.error strong {
    display: block;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header {
        padding: 3rem 0;
        margin-bottom: 2rem;
    }
    
    .header h1 {
        font-size: 2.25rem;
    }
    
    .header .subtitle {
        font-size: 1.1rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .demo-card-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .demo-card-body {
        padding: 1.5rem 1.5rem 2rem 1.5rem;
    }
    
    .demo-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    .demo-thumbnail {
        max-width: 180px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.875rem;
    }
    
    .demo-card-header {
        padding: 1rem 1rem 0.75rem 1rem;
    }
    
    .demo-card-body {
        padding: 1rem 1rem 1.5rem 1rem;
    }
    
    .demo-title {
        font-size: 1.25rem;
    }
    
    .demo-thumbnail {
        max-width: 160px;
        height: auto;
    }
}

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

.btn:focus,
.tag:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.qr-code-section {
    margin: 3rem 0;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.qr-code-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.qr-code-image {
    width: 256px;
    height: 256px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.qr-code-text {
    max-width: 400px;
    text-align: center
}

.qr-code-text h3 {
    margin-top: 0;
    color: #0076a8;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.qr-code-text p {
    color: #555;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .qr-code-container {
        flex-direction: column;
        text-align: center;
    }
    
    .qr-code-image {
        width: 150px;
        height: 150px;
    }
}
