/**
 * STMICA - Sitamarhi Institute of Computer Application
 * Core Stylesheet & Design Tokens
 * 
 * Based on the approved STMICA Visual System:
 * Academic, Modern, Clean, Blue/Navy/White palette
 */

:root {
    /* Brand Color Tokens */
    --primary: #0066FF;
    --primary-hover: #0052CC;
    --primary-dark: #0B2545;
    --primary-deep: #071526;
    --primary-light: #EFF6FF;
    --primary-subtle: #E0E7FF;
    --primary-gradient: linear-gradient(135deg, #0066FF 0%, #0047BA 100%);

    /* Accent & Highlight Colors */
    --accent: #F59E0B;
    --accent-hover: #D97706;
    --accent-light: #FEF3C7;
    --accent-cyan: #00A3FF;

    /* Semantic / Status Colors */
    --success: #10B981;
    --success-light: #ECFDF5;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    --info: #3B82F6;
    --info-light: #EFF6FF;

    /* Course Category Pastel Accents */
    --badge-blue: #E0F2FE;
    --badge-blue-text: #0284C7;
    --badge-purple: #F3E8FF;
    --badge-purple-text: #7E22CE;
    --badge-orange: #FFEDD5;
    --badge-orange-text: #C2410C;
    --badge-green: #DCFCE7;
    --badge-green-text: #15803D;
    --badge-pink: #FCE7F3;
    --badge-pink-text: #BE185D;

    /* Typography System */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    --text-5xl: 3rem;      /* 48px */

    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Neutral Tokens */
    --text: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --white: #FFFFFF;
    --bg-body: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F1F5F9;
    --border: #E2E8F0;
    --border-light: #F1F5F9;

    /* Spacing System */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */
    --space-16: 4rem;    /* 64px */
    --space-20: 5rem;    /* 80px */

    /* Border Radius System */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Elevation / Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 4px -1px rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);

    /* Animation Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Containers */
    --container-width: 1240px;
    --container-padding: 1.5rem;
}

/* -----------------------------------------------------------------------------
   Modern Reset & Base Styles
----------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-dark);
    font-weight: var(--font-bold);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, var(--text-5xl)); font-weight: var(--font-extrabold); }
h2 { font-size: clamp(1.5rem, 3vw, var(--text-4xl)); }
h3 { font-size: clamp(1.25rem, 2.5vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

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

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

/* -----------------------------------------------------------------------------
   Layout & Containers
----------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

.section-sm {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
}

.section-lg {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
}

/* Section Header Component */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-12) auto;
}

.section-header.text-left {
    text-align: left;
    margin-left: 0;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background-color: var(--primary-light);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
}

.section-title {
    margin-bottom: var(--space-3);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-muted);
}

/* Highlight text utility */
.text-highlight {
    color: var(--primary);
}

/* Grid & Flex Utilities */
.grid {
    display: grid;
    gap: var(--space-6);
}

.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); }

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Spacing Helpers */
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Display Helpers */
.hidden { display: none !important; }
