/* ============================================================
   E-LEARNING PLATFORM — Base Styles
   Reset, typography, and global element styles.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Modern Reset ── */
*, *::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-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--gray-800);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-weight: var(--font-weight-bold); line-height: var(--line-height-tight); color: var(--gray-900); margin-bottom: var(--space-3); }
h1 { font-size: var(--font-size-xl); letter-spacing: -0.025em; }
h2 { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }
h3 { font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); }
h4 { font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); }
p { margin-bottom: var(--space-4); color: var(--gray-600); }

a { color: var(--info); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--info-dark); }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
table { border-collapse: collapse; width: 100%; }
input, textarea, select, button { font-family: inherit; font-size: inherit; line-height: inherit; outline: none; border: none; }
button { cursor: pointer; background: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
::selection { background-color: var(--gold-300); color: var(--navy-900); }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ── Utility Classes ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--navy-700); }
.text-gold { color: var(--gold-500); }
.text-muted { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-white { color: var(--white); }
.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-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

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

.d-flex { display: flex; } .d-grid { display: grid; } .d-block { display: block; }
.d-none { display: none; } .d-inline-flex { display: inline-flex; }
.align-center { align-items: center; } .align-start { align-items: flex-start; }
.justify-center { justify-content: center; } .justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; } .flex-col { flex-direction: column; } .flex-1 { flex: 1; }
.gap-1 { gap: var(--space-1); } .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); }
.w-full { width: 100%; } .h-full { height: 100%; }
.overflow-hidden { overflow: hidden; } .overflow-auto { overflow: auto; }
.relative { position: relative; } .absolute { position: absolute; }
.rounded-sm { border-radius: var(--radius-sm); } .rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); } .rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }
.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); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.animate-fade-in { animation: fadeIn 0.3s ease forwards; }
.animate-fade-in-up { animation: fadeInUp 0.4s ease forwards; }
.animate-fade-in-down { animation: fadeInDown 0.3s ease forwards; }
.animate-slide-in-right { animation: slideInRight 0.4s ease forwards; }
.animate-scale-in { animation: scaleIn 0.25s ease-out forwards; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }
