 /* style.css - PrepCentric (Glassmorphism Edition)
   Colors from logo + glass effect
   Mobile-first, responsive, with sticky sidebar on course pages.
*/

:root {
  --bg: #f4f7fb;
  --text: #1d1d1f;
  --muted: #5c6370;
  --accent: #0078ff; /* pulled from logo */
  --secondary: #ff9f43; /* warm accent from logo gradient */
  --max-width: 1100px;
  --radius: 12px;
  --gap: 1rem;
  --glass-bg: rgba(255, 255, 255, 0.2);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  font-family: 'Inter', system-ui, sans-serif;
}

/* Reset & basics */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: linear-gradient(135deg, #e6f0ff, #f4f7fb);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Glass utility */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Containers */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.5rem 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 8px;
  object-fit: cover;
}
.main-nav a {
  margin: 0 .6rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
}
.cta .btn { margin-left: 1rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: #005fd1;
}
.btn-outline {
  background: transparent;
  border: 1px solid #ddd;
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: none;
}
.mr { margin-right: .6rem; }

/* Hero */
.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: 1fr 1fr;
  padding: 2.5rem 1rem;
}
.hero-left h1 {
  font-size: 2rem;
  margin-bottom: .5rem;
}
.hero-left .sub { color: var(--muted); max-width: 500px; }
.hero-right img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Cards & grids */
.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.card-body {
  padding: 1rem;
}
.card h3 { margin: .3rem 0; }
.muted { color: var(--muted); }

/* Course layout */
.course-layout {
  display: grid;
  grid-template-columns: 240px 1fr 260px;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 1rem;
}

/* Sidebar */
.sidebar-inner {
  position: sticky;
  top: 90px;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  max-height: calc(100vh - 120px);
  overflow: auto;
}
.topic-list { list-style: none; }
.topic-list a {
  display: block;
  padding: .45rem .6rem;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.topic-list a.active,
.topic-list a:hover {
  background: rgba(0, 120, 255, 0.1);
  color: var(--accent);
}

/* Main course content */
.course-content {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  min-height: 60vh;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

/* Right panel */
.right-panel .panel-inner {
  position: sticky;
  top: 90px;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  max-height: calc(100vh - 120px);
  overflow: auto;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.3);
  padding: 1rem 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .course-layout { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .main-nav { order: 3; width: 100%; text-align: center; }
  .sidebar-inner, .right-panel .panel-inner { position: relative; max-height: none; }
}
