/* Mobile-First Black & White CSS for New CMS */

/* CSS Variables for consistent theming */
:root {
    --black: #000000;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    --border-radius: 0.5rem;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--black);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Header and Navigation */
header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

header nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

header nav ul li {
    margin: 0;
}

header nav ul li a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

header nav ul li a:hover {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

/* Main Content */
main {
    padding: 2rem 1rem;
    min-height: calc(100vh - 120px);
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

/* Footer */
footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--gray-600);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.p-4 {
    padding: 1rem;
}

.bg-white {
    background: var(--white);
}

.border {
    border: 1px solid var(--gray-200);
}

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

.shadow {
    box-shadow: var(--shadow);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Forms */
input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    background: var(--white);
    transition: border-color 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gray-500);
}

button {
    padding: 0.75rem 1.5rem;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    background: var(--gray-800);
}

/* Admin Specific Styles */
.admin-dashboard {
    background: var(--gray-50);
    min-height: 100vh;
}

.page-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.page-actions a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.page-actions a:hover {
    background: var(--gray-200);
}

/* Login Form */
.login-form {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.login-form input {
    margin-bottom: 1rem;
}

.error {
    color: var(--gray-700);
    background: var(--gray-100);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid var(--gray-400);
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
    html {
        font-size: 17px;
    }
    
    header nav ul {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    header nav ul li a {
        padding: 0.5rem 1rem;
    }
    
    main {
        padding: 3rem 2rem;
    }
    
    .container {
        max-width: 768px;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    html {
        font-size: 18px;
    }
    
    header nav ul {
        gap: 2rem;
    }
    
    main {
        padding: 4rem 2rem;
    }
    
    .container {
        max-width: 1024px;
    }
}

/* Print Styles */
@media print {
    header, footer {
        display: none;
    }
    
    main {
        padding: 0;
        min-height: auto;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --black: #000000;
        --white: #ffffff;
        --gray-50: #ffffff;
        --gray-100: #f0f0f0;
        --gray-200: #e0e0e0;
        --gray-300: #c0c0c0;
        --gray-400: #808080;
        --gray-500: #606060;
        --gray-600: #404040;
        --gray-700: #202020;
        --gray-800: #000000;
        --gray-900: #000000;
    }
}