/**
 * Main Stylesheet
 * CLEWS Hub Course Platform
 * Imports accessibility and responsive styles
 */

@import url('accessibility.css');
@import url('responsive.css');

/* Base styles */
:root {
    --primary-color: #120a02;
    --primary-hover: #0a0502;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #dc2626;
    --warning-color: #f59e0b;
    --text-color: #0a0a0a;
    --text-muted: #6b7280;
    --border-color: #d1d5db;
    --background: #ffffff;
    --background-alt: #f9fafb;
    --accent-color: #f78500;
    --accent-hover: #e67700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background: var(--background);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--foreground, var(--text-color));
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent, var(--accent-color));
    text-decoration: underline;
}

/* a:visited {
    color: var(--foreground, var(--text-color));
} */

/* a:visited:hover {
    color: var(--accent, var(--accent-color));
} */

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    min-height: 44px;
}

.btn-primary {
    background: var(--accent, var(--accent-color));
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    text-decoration: none;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
    text-decoration: none;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    text-decoration: none;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent, var(--accent-color));
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.card-body {
    color: var(--text-color);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: var(--success-color);
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: var(--danger-color);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: var(--warning-color);
}

.alert-info {
    background: #fff3e0;
    color: #e65100;
    border-color: var(--accent, var(--accent-color));
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--accent, var(--accent-color));
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress bar */
.progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent, var(--accent-color));
    transition: width 0.3s ease;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: #fff3e0;
    color: #e65100;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}
