/* MyTCRPlus Learning Platform - Design System v3 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Wix+Madefor+Display:wght@700;800&display=swap');

/* ===================================
   1. DESIGN TOKENS (MyTCRPlus Brand)
   =================================== */
:root {
    /* Brand Colors - Purple Palette */
    --brand-50: #FDF9FF;
    --brand-100: #F5EDFF;
    --brand-200: #E9D5FF;
    --brand-300: #D8B4FE;
    --brand-400: #C084FC;
    --brand-500: #A586FE;
    --brand-600: #8F6DD6;
    --brand-700: #7C3AED;
    --brand-800: #6D28D9;
    --brand-900: #2E1A47;

    /* Accent Color - Peach/Orange */
    --accent: #FEA68B;
    --accent-light: #FFDDD4;

    /* Text Colors */
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Slate Scale */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Typography */
    --font-display: 'Wix Madefor Display', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --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);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   2. RESET & BASE STYLES
   =================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--brand-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   3. TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--text-dark);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-4);
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-muted);
}

.text-gradient {
    background: linear-gradient(to right, var(--brand-400), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   4. LAYOUT SYSTEM
   =================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.grid {
    display: grid;
    gap: var(--space-8);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 1024px) {
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .lg\:col-span-1 { grid-column: span 1; }
    .lg\:col-span-3 { grid-column: span 3; }
}

/* ===================================
   5. BUTTONS
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background-color: var(--brand-600);
    color: white;
}

.btn-primary:hover {
    background-color: var(--brand-700);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--brand-600);
    color: var(--brand-600);
}

.btn-outline:hover {
    background-color: var(--brand-600);
    color: white;
}

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

.btn-light:hover {
    background-color: var(--brand-50);
}

.btn-link {
    background: none;
    border: none;
    color: var(--brand-600);
    padding: 0.5rem;
    text-decoration: underline;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ===================================
   6. CARDS & GLASSMORPHISM
   =================================== */
.card {
    background-color: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-500);
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
}

/* ===================================
   7. HERO SECTION
   =================================== */
.hero {
    position: relative;
    padding: 6rem 0;
    background: #1a1033;
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(143, 109, 214, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(254, 166, 139, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    color: white;
    margin-bottom: var(--space-6);
}

.hero .lead {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
}

.badge-pill {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: white;
    margin-bottom: var(--space-4);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================
   8. NAVIGATION
   =================================== */
.site-header {
    background-color: white;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    max-height: 40px;
    width: auto;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-700);
}

.navbar-menu {
    display: none;
}

.navbar-menu.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--slate-200);
    box-shadow: var(--shadow-lg);
}

.navbar-nav {
    list-style: none;
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.navbar-nav li a {
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.navbar-nav li a:hover {
    color: var(--brand-600);
}

.navbar-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-dark);
    margin: 5px 0;
    transition: all var(--transition-fast);
}

@media (min-width: 768px) {
    .navbar-toggle {
        display: none;
    }

    .navbar-menu {
        display: block !important;
        position: static;
        box-shadow: none;
        border: none;
    }

    .navbar-nav {
        flex-direction: row;
    }
}

/* ===================================
   9. SIDEBAR NAVIGATION
   =================================== */
.sidebar-nav {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
}

.sidebar-nav.sticky {
    position: sticky;
    top: calc(var(--space-8) + 60px);
}

.sidebar-nav a {
    display: block;
    padding: var(--space-3) var(--space-4);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-2);
}

.sidebar-nav a:hover {
    background-color: var(--slate-50);
    border-left-color: var(--brand-500);
}

.sidebar-nav a.active {
    color: var(--brand-600);
    background-color: var(--slate-50);
    border-left-color: var(--brand-600);
}

/* ===================================
   10. COURSES
   =================================== */
.courses-section {
    padding: var(--space-16) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-8);
}

.course-card {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--slate-200);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-500);
}

.course-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-thumbnail-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: white;
}

.course-card-content {
    padding: var(--space-6);
}

.course-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-3);
}

.course-meta {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    margin: var(--space-4) 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* ===================================
   11. BADGES
   =================================== */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary { background-color: var(--brand-100); color: var(--brand-700); }
.badge-success { background-color: #d1fae5; color: #065f46; }
.badge-warning { background-color: #fef3c7; color: #92400e; }
.badge-danger { background-color: #fee2e2; color: #991b1b; }

/* ===================================
   12. ALERTS
   =================================== */
.alert {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.alert-success {
    background-color: #d1fae5;
    border-color: var(--success);
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border-color: var(--error);
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: var(--warning);
    color: #92400e;
}

.alert-info {
    background-color: var(--brand-50);
    border-color: var(--brand-500);
    color: var(--brand-900);
}

/* ===================================
   13. FORMS
   =================================== */
.form-group {
    margin-bottom: var(--space-6);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    line-height: 1.5;
    color: var(--text-dark);
    background-color: white;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(143, 109, 214, 0.1);
}

.form-help {
    display: block;
    margin-top: var(--space-2);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.required {
    color: var(--error);
}

/* ===================================
   14. FOOTER
   =================================== */
.site-footer {
    background-color: white;
    border-top: 1px solid var(--slate-200);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: var(--space-16);
}

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

.footer-section h3,
.footer-section h4 {
    font-size: 1rem;
    margin-bottom: var(--space-4);
    color: var(--text-dark);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--brand-600);
}

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

.powered-by {
    margin-top: var(--space-2);
    font-size: 0.75rem;
}

/* ===================================
   15. CTA SECTION
   =================================== */
.cta-section {
    background: linear-gradient(135deg, var(--brand-900) 0%, var(--slate-900) 100%);
    color: white;
    padding: var(--space-16) 0;
    text-align: center;
    border-radius: var(--radius-xl);
    margin: var(--space-16) 0;
}

.cta-content h2 {
    color: white;
    margin-bottom: var(--space-4);
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
}

/* ===================================
   16. ANIMATIONS
   =================================== */
@keyframes mytcrFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===================================
   17. UTILITY CLASSES
   =================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.hidden { display: none !important; }
.block { display: block !important; }

.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.space-y-8 > * + * { margin-top: var(--space-8); }

/* ===================================
   18. RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .navbar-nav {
        flex-direction: column;
        padding: var(--space-4);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
