/**
 * Newsgraden v3.0.0 - Enhanced CSS Framework with Visual Studio Design
 * Modern, responsive CSS framework with advanced theme system and VS Code-inspired design
 */

/* =============================================================================
   CSS CUSTOM PROPERTIES (CSS VARIABLES)
   ============================================================================= */

/* Visual Studio Theme Variables */
:root {
    /* VS Code Typography */
    --vs-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --vs-font-size-base: 13px;
    --vs-font-size-small: 11px;
    --vs-font-size-large: 15px;
    
    /* VS Code Border & Radius */
    --vs-border-radius: 2px;
    --vs-border-radius-large: 4px;
    --vs-border-width: 1px;
    
    /* VS Code Shadows */
    --vs-shadow-small: 0 1px 3px rgba(0, 0, 0, 0.12);
    --vs-shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --vs-shadow-large: 0 10px 25px rgba(0, 0, 0, 0.15);
    --vs-shadow-focus: 0 0 0 2px rgba(0, 122, 204, 0.3);
    
    /* VS Code Transitions */
    --vs-transition-fast: 0.15s ease;
    --vs-transition-normal: 0.2s ease;
    --vs-transition-slow: 0.3s ease;
    
    /* VS Code Dark Theme Colors (Default) */
    --vs-bg-primary: #1e1e1e;
    --vs-bg-secondary: #2d2d30;
    --vs-bg-tertiary: #3e3e42;
    --vs-bg-quaternary: #454545;
    --vs-bg-hover: #37373d;
    --vs-bg-active: #094771;
    --vs-bg-selected: #094771;
    
    --vs-fg-primary: #cccccc;
    --vs-fg-secondary: #969696;
    --vs-fg-tertiary: #6c6c6c;
    --vs-fg-quaternary: #484848;
    --vs-fg-disabled: #6c6c6c;
    --vs-fg-muted: #888888;
    
    --vs-border: #3e3e42;
    --vs-border-light: #484848;
    --vs-border-focus: #007acc;
    --vs-border-active: #007acc;
    
    --vs-accent: #007acc;
    --vs-accent-hover: #1177bb;
    --vs-accent-active: #005a9e;
    --vs-accent-light: #3794ff;
    --vs-accent-contrast: #ffffff;
    
    --vs-success: #4caf50;
    --vs-warning: #ff9800;
    --vs-error: #f44336;
    --vs-info: #2196f3;
    
    /* Status Colors */
    --vs-status-success: #89d185;
    --vs-status-warning: #ffcc00;
    --vs-status-error: #e51400;
    --vs-status-info: #4fc1ff;
    
    /* Legacy Variables for backward compatibility */
    /* Colors */
    --primary-color: var(--vs-accent);
    --primary-dark: var(--vs-accent-active);
    --primary-light: var(--vs-accent-light);
    
    --secondary-color: #569cd6;
    --accent-color: var(--vs-accent);
    --success-color: var(--vs-success);
    --warning-color: var(--vs-warning);
    --error-color: var(--vs-error);
    --info-color: var(--vs-info);
    
    /* Background Colors */
    --bg-primary: var(--vs-bg-primary);
    --bg-secondary: var(--vs-bg-secondary);
    --bg-tertiary: var(--vs-bg-tertiary);
    --bg-dark: #1a1a1a;
    --bg-darker: #0f0f0f;
    
    /* Text Colors */
    --text-primary: var(--vs-fg-primary);
    --text-secondary: var(--vs-fg-secondary);
    --text-tertiary: var(--vs-fg-tertiary);
    --text-inverse: var(--vs-accent-contrast);
    --text-muted: var(--vs-fg-muted);
    
    /* Border Colors */
    --border-color: var(--vs-border);
    --border-light: var(--vs-border-light);
    --border-dark: var(--vs-border);
    
    /* Shadows */
    --shadow-sm: var(--vs-shadow-small);
    --shadow-md: var(--vs-shadow-medium);
    --shadow-lg: var(--vs-shadow-large);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Typography */
    --font-family-sans: var(--vs-font-family);
    --font-family-serif: Georgia, 'Times New Roman', serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    --font-size-xs: var(--vs-font-size-small);
    --font-size-sm: 0.875rem;
    --font-size-base: var(--vs-font-size-base);
    --font-size-lg: var(--vs-font-size-large);
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;
    
    /* Border Radius */
    --border-radius-sm: var(--vs-border-radius);
    --border-radius-md: var(--vs-border-radius-large);
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 0.75rem;
    --border-radius-2xl: 1rem;
    --border-radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: var(--vs-transition-fast);
    --transition-normal: var(--vs-transition-normal);
    --transition-slow: var(--vs-transition-slow);
    
    /* Z-Index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

/* Light Theme Variables */
[data-theme="light"] {
    --vs-bg-primary: #ffffff;
    --vs-bg-secondary: #f3f3f3;
    --vs-bg-tertiary: #e8e8e8;
    --vs-bg-quaternary: #e8e8e8;
    --vs-bg-hover: #f3f3f3;
    --vs-bg-active: #007acc;
    --vs-bg-selected: #007acc;
    
    --vs-fg-primary: #333333;
    --vs-fg-secondary: #666666;
    --vs-fg-tertiary: #999999;
    --vs-fg-quaternary: #cccccc;
    --vs-fg-disabled: #999999;
    --vs-fg-muted: #666666;
    
    --vs-border: #e8e8e8;
    --vs-border-light: #d0d0d0;
    --vs-border-focus: #007acc;
    --vs-border-active: #007acc;
    
    --vs-accent: #007acc;
    --vs-accent-hover: #005a9e;
    --vs-accent-active: #004578;
    --vs-accent-light: #4fc3f7;
    --vs-accent-contrast: #ffffff;
    
    --vs-success: #2e7d32;
    --vs-warning: #ef6c00;
    --vs-error: #d32f2f;
    --vs-info: #1976d2;
    
    /* Update legacy variables */
    --bg-primary: var(--vs-bg-primary);
    --bg-secondary: var(--vs-bg-secondary);
    --bg-tertiary: var(--vs-bg-tertiary);
    --bg-dark: #ffffff;
    --bg-darker: #f5f5f5;
    
    --text-primary: var(--vs-fg-primary);
    --text-secondary: var(--vs-fg-secondary);
    --text-tertiary: var(--vs-fg-tertiary);
    --text-inverse: var(--vs-accent-contrast);
    --text-muted: var(--vs-fg-muted);
    
    --border-color: var(--vs-border);
    --border-light: var(--vs-border-light);
    --border-dark: var(--vs-border);
}

/* High Contrast Theme */
[data-theme="high-contrast"] {
    --vs-bg-primary: #000000;
    --vs-bg-secondary: #1e1e1e;
    --vs-bg-tertiary: #2d2d30;
    --vs-bg-quaternary: #3e3e42;
    --vs-bg-hover: #37373d;
    --vs-bg-active: #ffff00;
    --vs-bg-selected: #ffff00;
    
    --vs-fg-primary: #ffffff;
    --vs-fg-secondary: #ffffff;
    --vs-fg-tertiary: #ffffff;
    --vs-fg-quaternary: #ffffff;
    --vs-fg-disabled: #ffffff;
    --vs-fg-muted: #ffffff;
    
    --vs-border: #ffffff;
    --vs-border-light: #ffffff;
    --vs-border-focus: #ffff00;
    --vs-border-active: #ffff00;
    
    --vs-accent: #ffff00;
    --vs-accent-hover: #ffff00;
    --vs-accent-active: #ffff00;
    --vs-accent-light: #ffff00;
    --vs-accent-contrast: #000000;
    
    --vs-success: #00ff00;
    --vs-warning: #ffff00;
    --vs-error: #ff0000;
    --vs-info: #00ffff;
}

/* =============================================================================
   RESET AND BASE STYLES
   ============================================================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   VISUAL STUDIO COMPONENTS
   ============================================================================= */

/* VS Code Activity Bar */
.vs-activitybar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 48px;
    background: var(--vs-bg-secondary);
    border-right: var(--vs-border-width) solid var(--vs-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    z-index: var(--z-fixed);
}

.vs-activitybar-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0;
    border-radius: var(--vs-border-radius);
    color: var(--vs-fg-secondary);
    cursor: pointer;
    transition: var(--vs-transition-fast);
    position: relative;
}

.vs-activitybar-item:hover {
    background: var(--vs-bg-hover);
    color: var(--vs-fg-primary);
}

.vs-activitybar-item.active {
    background: var(--vs-bg-active);
    color: var(--vs-accent-contrast);
}

.vs-activitybar-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--vs-bg-primary);
    color: var(--vs-fg-primary);
    padding: 4px 8px;
    border-radius: var(--vs-border-radius);
    font-size: var(--vs-font-size-small);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--vs-transition-fast);
    pointer-events: none;
    z-index: var(--z-tooltip);
}

.vs-activitybar-item:hover::after {
    opacity: 1;
    visibility: visible;
}

/* VS Code Sidebar */
.vs-sidebar {
    position: fixed;
    left: 48px;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--vs-bg-secondary);
    border-right: var(--vs-border-width) solid var(--vs-border);
    display: flex;
    flex-direction: column;
    z-index: var(--z-fixed);
    transition: var(--vs-transition-normal);
}

.vs-sidebar.collapsed {
    width: 48px;
}

.vs-sidebar-header {
    padding: 16px;
    border-bottom: var(--vs-border-width) solid var(--vs-border);
    background: var(--vs-bg-tertiary);
}

.vs-sidebar-title {
    font-size: var(--vs-font-size-base);
    font-weight: 600;
    color: var(--vs-fg-primary);
    margin: 0;
}

.vs-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.vs-sidebar-section {
    margin-bottom: 16px;
}

.vs-sidebar-section-title {
    font-size: var(--vs-font-size-small);
    font-weight: 600;
    color: var(--vs-fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    margin-bottom: 4px;
}

/* VS Code Panel */
.vs-panel {
    background: var(--vs-bg-primary);
    border: var(--vs-border-width) solid var(--vs-border);
    border-radius: var(--vs-border-radius);
    overflow: hidden;
}

.vs-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--vs-bg-secondary);
    border-bottom: var(--vs-border-width) solid var(--vs-border);
}

.vs-panel-title {
    font-size: var(--vs-font-size-base);
    font-weight: 600;
    color: var(--vs-fg-primary);
    margin: 0;
}

.vs-panel-content {
    padding: 16px;
}

/* VS Code Tabs */
.vs-tabs {
    display: flex;
    background: var(--vs-bg-secondary);
    border-bottom: var(--vs-border-width) solid var(--vs-border);
}

.vs-tab {
    padding: 12px 16px;
    background: var(--vs-bg-tertiary);
    border-right: var(--vs-border-width) solid var(--vs-border);
    color: var(--vs-fg-secondary);
    cursor: pointer;
    transition: var(--vs-transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vs-tab:hover {
    background: var(--vs-bg-hover);
    color: var(--vs-fg-primary);
}

.vs-tab.active {
    background: var(--vs-bg-primary);
    color: var(--vs-fg-primary);
    border-bottom-color: var(--vs-bg-primary);
}

.vs-tab-close {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--vs-border-radius);
    cursor: pointer;
    opacity: 0;
    transition: var(--vs-transition-fast);
}

.vs-tab:hover .vs-tab-close {
    opacity: 1;
}

.vs-tab-close:hover {
    background: var(--vs-bg-hover);
}

/* VS Code Buttons */
.vs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--vs-bg-tertiary);
    border: var(--vs-border-width) solid var(--vs-border);
    border-radius: var(--vs-border-radius);
    color: var(--vs-fg-primary);
    font-size: var(--vs-font-size-base);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--vs-transition-fast);
    user-select: none;
}

.vs-button:hover {
    background: var(--vs-bg-hover);
    border-color: var(--vs-border-light);
}

.vs-button:focus {
    outline: none;
    box-shadow: var(--vs-shadow-focus);
}

.vs-button:active {
    background: var(--vs-bg-active);
    color: var(--vs-accent-contrast);
}

.vs-button.primary {
    background: var(--vs-accent);
    border-color: var(--vs-accent);
    color: var(--vs-accent-contrast);
}

.vs-button.primary:hover {
    background: var(--vs-accent-hover);
    border-color: var(--vs-accent-hover);
}

.vs-button.secondary {
    background: var(--vs-bg-quaternary);
    border-color: var(--vs-border);
    color: var(--vs-fg-primary);
}

.vs-button.ghost {
    background: transparent;
    border-color: transparent;
}

.vs-button.ghost:hover {
    background: var(--vs-bg-hover);
    border-color: var(--vs-border);
}

/* VS Code Input */
.vs-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--vs-bg-tertiary);
    border: var(--vs-border-width) solid var(--vs-border);
    border-radius: var(--vs-border-radius);
    color: var(--vs-fg-primary);
    font-size: var(--vs-font-size-base);
    transition: var(--vs-transition-fast);
}

.vs-input:focus {
    outline: none;
    border-color: var(--vs-border-focus);
    box-shadow: var(--vs-shadow-focus);
}

.vs-input::placeholder {
    color: var(--vs-fg-muted);
}

/* VS Code Card */
.vs-card {
    background: var(--vs-bg-secondary);
    border: var(--vs-border-width) solid var(--vs-border);
    border-radius: var(--vs-border-radius);
    overflow: hidden;
    transition: var(--vs-transition-normal);
}

.vs-card:hover {
    border-color: var(--vs-border-light);
    box-shadow: var(--vs-shadow-small);
}

.vs-card-header {
    padding: 16px;
    background: var(--vs-bg-tertiary);
    border-bottom: var(--vs-border-width) solid var(--vs-border);
}

.vs-card-title {
    font-size: var(--vs-font-size-base);
    font-weight: 600;
    color: var(--vs-fg-primary);
    margin: 0;
}

.vs-card-content {
    padding: 16px;
}

.vs-card-footer {
    padding: 12px 16px;
    background: var(--vs-bg-tertiary);
    border-top: var(--vs-border-width) solid var(--vs-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* VS Code Status Bar */
.vs-statusbar {
    position: fixed;
    bottom: 0;
    left: 48px;
    right: 0;
    height: 22px;
    background: var(--vs-bg-secondary);
    border-top: var(--vs-border-width) solid var(--vs-border);
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: var(--vs-font-size-small);
    color: var(--vs-fg-secondary);
    z-index: var(--z-fixed);
}

.vs-statusbar-item {
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
    cursor: pointer;
    transition: var(--vs-transition-fast);
}

.vs-statusbar-item:hover {
    background: var(--vs-bg-hover);
    color: var(--vs-fg-primary);
}

.vs-statusbar-item.right {
    margin-left: auto;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin: 0 0 var(--spacing-md) 0;
    line-height: var(--line-height-relaxed);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover, a:focus {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Code styling */
code {
    font-family: var(--font-family-mono);
    font-size: 0.875em;
    background: var(--vs-bg-tertiary);
    padding: 2px 4px;
    border-radius: var(--vs-border-radius);
    color: var(--vs-accent);
}

pre {
    font-family: var(--font-family-mono);
    background: var(--vs-bg-primary);
    border: var(--vs-border-width) solid var(--vs-border);
    border-radius: var(--vs-border-radius);
    padding: 16px;
    overflow-x: auto;
    line-height: 1.4;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* =============================================================================
   LAYOUT UTILITIES
   ============================================================================= */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--spacing-md) * -0.5);
}

.col {
    flex: 1;
    padding: 0 calc(var(--spacing-md) * 0.5);
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Flexbox Utilities */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.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; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.align-stretch { align-items: stretch; }
.flex-1 { flex: 1 1 0%; }

/* =============================================================================
   SPACING UTILITIES
   ============================================================================= */

.m-0 { margin: 0; }
.m-1 { margin: var(--spacing-xs); }
.m-2 { margin: var(--spacing-sm); }
.m-3 { margin: var(--spacing-md); }
.m-4 { margin: var(--spacing-lg); }
.m-5 { margin: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

/* Margin utilities */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: var(--spacing-xs); }
.ml-2 { margin-left: var(--spacing-sm); }
.ml-3 { margin-left: var(--spacing-md); }
.ml-4 { margin-left: var(--spacing-lg); }
.ml-5 { margin-left: var(--spacing-xl); }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: var(--spacing-xs); }
.mr-2 { margin-right: var(--spacing-sm); }
.mr-3 { margin-right: var(--spacing-md); }
.mr-4 { margin-right: var(--spacing-lg); }
.mr-5 { margin-right: var(--spacing-xl); }

/* Padding utilities */
.pt-0 { padding-top: 0; }
.pt-1 { padding-top: var(--spacing-xs); }
.pt-2 { padding-top: var(--spacing-sm); }
.pt-3 { padding-top: var(--spacing-md); }
.pt-4 { padding-top: var(--spacing-lg); }
.pt-5 { padding-top: var(--spacing-xl); }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: var(--spacing-xs); }
.pb-2 { padding-bottom: var(--spacing-sm); }
.pb-3 { padding-bottom: var(--spacing-md); }
.pb-4 { padding-bottom: var(--spacing-lg); }
.pb-5 { padding-bottom: var(--spacing-xl); }

.pl-0 { padding-left: 0; }
.pl-1 { padding-left: var(--spacing-xs); }
.pl-2 { padding-left: var(--spacing-sm); }
.pl-3 { padding-left: var(--spacing-md); }
.pl-4 { padding-left: var(--spacing-lg); }
.pl-5 { padding-left: var(--spacing-xl); }

.pr-0 { padding-right: 0; }
.pr-1 { padding-right: var(--spacing-xs); }
.pr-2 { padding-right: var(--spacing-sm); }
.pr-3 { padding-right: var(--spacing-md); }
.pr-4 { padding-right: var(--spacing-lg); }
.pr-5 { padding-right: var(--spacing-xl); }

/* =============================================================================
   DISPLAY AND TEXT UTILITIES
   ============================================================================= */

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

.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-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-muted { color: var(--text-muted); }
.text-inverse { color: var(--text-inverse); }

/* =============================================================================
   BACKGROUND AND BORDER UTILITIES
   ============================================================================= */

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-success { background-color: var(--success-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-error { background-color: var(--error-color); }
.bg-info { background-color: var(--info-color); }

.border { border: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-left { border-left: 1px solid var(--border-color); }
.border-right { border-right: 1px solid var(--border-color); }

.border-0 { border: 0; }
.rounded { border-radius: var(--border-radius-md); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }
.rounded-full { border-radius: var(--border-radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* =============================================================================
   POSITION AND OVERFLOW UTILITIES
   ============================================================================= */

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }

.w-auto { width: auto; }
.w-full { width: 100%; }
.w-screen { width: 100vw; }

.h-auto { height: auto; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }

/* =============================================================================
   NEWSGRADEN SPECIFIC COMPONENTS
   ============================================================================= */

/* Header with VS Code styling */
.site-header {
    background: var(--vs-bg-secondary);
    border-bottom: var(--vs-border-width) solid var(--vs-border);
    padding: 0 var(--spacing-md);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--vs-fg-primary);
    font-weight: 600;
    font-size: var(--vs-font-size-base);
}

.brand-logo {
    height: 24px;
    width: auto;
    margin-right: var(--spacing-sm);
}

.header-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-sm);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--vs-fg-secondary);
    text-decoration: none;
    border-radius: var(--vs-border-radius);
    transition: var(--vs-transition-fast);
}

.nav-link:hover {
    background: var(--vs-bg-hover);
    color: var(--vs-fg-primary);
}

.nav-link.active {
    background: var(--vs-bg-active);
    color: var(--vs-accent-contrast);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs);
    background: var(--vs-bg-tertiary);
    border: var(--vs-border-width) solid var(--vs-border);
    border-radius: var(--vs-border-radius);
}

.theme-option {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: transparent;
    border: none;
    border-radius: var(--vs-border-radius);
    color: var(--vs-fg-secondary);
    cursor: pointer;
    transition: var(--vs-transition-fast);
    font-size: var(--vs-font-size-small);
}

.theme-option:hover {
    background: var(--vs-bg-hover);
    color: var(--vs-fg-primary);
}

.theme-option.active {
    background: var(--vs-accent);
    color: var(--vs-accent-contrast);
}

/* Customizer Button */
.customizer-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: var(--vs-accent);
    color: var(--vs-accent-contrast);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: var(--transition-normal);
    z-index: var(--z-fixed);
}

.customizer-btn:hover {
    background: var(--vs-accent-hover);
    transform: scale(1.1);
}

.customizer-btn:active {
    transform: scale(0.95);
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
    .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
    .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
    
    .d-sm-none { display: none; }
    .d-sm-block { display: block; }
    
    .vs-sidebar {
        left: -280px;
        transition: left var(--transition-normal);
    }
    
    .vs-sidebar.open {
        left: 0;
    }
    
    .vs-statusbar {
        left: 0;
    }
    
    .vs-activitybar {
        bottom: 22px;
    }
}

@media (max-width: 640px) {
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    
    .d-md-none { display: none; }
    .d-md-block { display: block; }
}

@media (max-width: 480px) {
    .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
    .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
    
    .d-lg-none { display: none; }
    .d-lg-block { display: block; }
}

/* =============================================================================
   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;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--vs-border-focus);
    outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--vs-border-focus);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .vs-button {
        border-width: 2px;
    }
    
    .vs-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@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;
    }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    .vs-activitybar,
    .vs-sidebar,
    .vs-statusbar,
    .customizer-btn,
    .header-actions {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    .vs-card {
        border: 1px solid #ccc !important;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}
