/* ============================================================
   SRPSKIGRAMATIKA — Global Stylesheet (V2 Design System)
   Based on the bold light-mode design of Homepage V2
   Link in every file: <link rel="stylesheet" href="styles.css">
   ============================================================ */

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Core palette */
  --bg:           #f5f4f0;
  --surface:      #ffffff;
  --surface2:     #eeecf8;
  --border:       #e0ddf5;

  /* Brand */
  --accent:       #5b3df5;
  --accent-soft:  #7c5cfc;
  --accent-glow:  rgba(91,61,245,0.28);
  --accent-glow2: rgba(91,61,245,0.13);

  /* Semantic */
  --gold:         #e8920a;
  --gold-bg:      linear-gradient(145deg, #fffbea, #fff8f0);
  --gold-border:  #f5dfa0;
  --green:        #1a9e5c;
  --green-bg:     #d1fadf;
  --red:          #d63b3b;

  /* Text */
  --text:         #1a1830;
  --muted:        #7a7693;

  /* Shape */
  --radius:       14px;
  --radius-sm:    8px;
  --radius-pill:  9999px;

  /* Shadow */
  --shadow:       0 2px 16px rgba(91,61,245,0.07);
  --shadow-hover: 0 4px 20px rgba(91,61,245,0.13);
  --shadow-btn:   0 4px 14px rgba(91,61,245,0.28);
  --shadow-btn-h: 0 6px 20px rgba(91,61,245,0.35);

  /* Type */
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Transitions */
  --t: 0.18s ease;
}

/* ── BASE ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a    { color: inherit; text-decoration: none; }
img  { display: block; max-width: 100%; }
button { font-family: var(--font); cursor: pointer; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── NAV ────────────────────────────────────────────────── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(91,61,245,0.06);
  position: sticky; top: 0; z-index: 100;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.nav__logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 7px;
  object-fit: contain;
  display: block;
}
.nav__logo span { color: var(--text); font-weight: 800; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: none; background: none;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  text-decoration: none;
}
.nav__link:hover      { background: var(--surface2); color: var(--accent); }
.nav__link--active    { background: var(--surface2); color: var(--accent); }
.nav__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #c084fc);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 800; color: #fff;
  cursor: pointer;
  margin-left: 8px;
  border: 2px solid var(--border);
  transition: transform var(--t);
}
.nav__avatar:hover { transform: scale(1.08); }
@media (max-width: 600px) {
  .nav { padding: 12px 16px; }
  .nav__link { padding: 6px 10px; font-size: 0.8rem; }
  .nav__logo-icon { width: 24px; height: 24px; border-radius: 6px; }
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #edeaff 0%, var(--bg) 60%);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px 64px;
  text-align: center;
}
.hero__inner  { max-width: 640px; margin: 0 auto; }
.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.hero__title em { font-style: normal; color: var(--accent); }
.hero__sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 36px;
}
.hero__btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius);
  padding: 13px 28px;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t),
              background var(--t), opacity var(--t);
  border: none;
  text-decoration: none;
}
.btn:active { transform: scale(0.97) !important; }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-h);
}
.btn--outline {
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn--outline:hover { background: var(--surface2); }
.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover  { background: var(--surface2); color: var(--text); }
.btn--gold {
  background: var(--gold);
  color: #fff;
  border: none;
}
.btn--gold:hover   { opacity: 0.88; }
.btn--sm { padding: 9px 18px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn--full { width: 100%; }

/* ── SECTION HEADINGS ───────────────────────────────────── */
.sec-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 18px;
  margin-top: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 52px;
  margin-bottom: 18px;
}
.sec-title-row h2  { font-size: 1.15rem; font-weight: 800; }
.sec-title-row a   { font-size: 0.82rem; color: var(--accent); text-decoration: none; }
.sec-title-row a:hover { text-decoration: underline; }

/* ── CARDS (generic) ────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card--hover {
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.card--hover:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card__body    { padding: 24px; }
.card__body-sm { padding: 16px 20px; }

/* ── COURSE TILE CARDS (square grid) ────────────────────── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.course-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}
.course-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.course-card.dimmed { opacity: 0.45; pointer-events: none; }
.course-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.course-card__icon  { font-size: 1.8rem; line-height: 1; }
.course-card__title { font-size: 0.98rem; font-weight: 800; margin-bottom: 5px; }
.course-card__desc  { font-size: 0.8rem; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.badge--live   { background: var(--green-bg);  color: var(--green); }
.badge--wip    { background: #fff3cd;           color: var(--gold); }
.badge--soon   { background: var(--surface2);   color: var(--accent); }
.badge--purple { background: #ede9fe;           color: var(--accent); }

/* ── PROGRESS BAR ───────────────────────────────────────── */
.progress-bar  { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 3px;
  transition: width 0.5s ease;
}
.progress-label { font-size: 0.73rem; color: var(--muted); margin-top: 6px; }

/* ── STATUS DOTS ────────────────────────────────────────── */
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; display: inline-block; }
.dot--g { background: var(--green); }
.dot--y { background: var(--gold); }
.dot--r { background: var(--red); }

/* ── LOG ITEMS (issues / changelog) ────────────────────── */
.log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}
.log-item:last-child { border-bottom: none; }

/* ── INFO CARD ──────────────────────────────────────────── */
.info-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.info-card h3 { font-size: 0.95rem; font-weight: 800; margin-bottom: 14px; }

/* ── COFFEE CARD ────────────────────────────────────────── */
.coffee-card {
  background: linear-gradient(145deg, #fffbea, #fff8f0);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  box-shadow: var(--shadow);
}
.coffee-card__emoji { font-size: 2.2rem; margin-bottom: 10px; }
.coffee-card h3     { font-size: 0.92rem; font-weight: 800; margin-bottom: 8px; }
.coffee-card p      { font-size: 0.8rem; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }

/* ── PROFILE CARD ───────────────────────────────────────── */
.profile-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}
.profile-card h3   { font-size: 0.92rem; font-weight: 800; margin-bottom: 14px; }
.profile-card__row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar--lg {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #c084fc);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900; color: #fff; flex-shrink: 0;
}
.profile-card__name { font-size: 0.9rem; font-weight: 700; }
.profile-card__sub  { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill  {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.75rem;
  color: var(--muted);
}
.pill strong { color: var(--text); }

/* ── CONTACT / FORMS ────────────────────────────────────── */
.contact-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}
.contact-card h3 { font-size: 0.92rem; font-weight: 800; margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
  margin-top: 12px;
}
.form-label:first-of-type { margin-top: 0; }
.form-group { margin-bottom: 12px; }
.form-group:last-of-type { margin-bottom: 22px; }
.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.88rem;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  resize: none;
  transition: border-color var(--t);
}
.form-input:focus,
.form-textarea:focus   { border-color: var(--accent); }
.form-textarea         { min-height: 140px; }

/* ── ABOUT CARD ─────────────────────────────────────────── */
.about-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.about-card h3 { font-size: 0.95rem; font-weight: 800; margin-bottom: 10px; }
.about-card p  { font-size: 0.875rem; color: var(--muted); line-height: 1.75; }

/* ── PAGE WRAPPER (inner pages) ─────────────────────────── */
.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.page--narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
@media (max-width: 640px) {
  .page {
    padding: 32px 16px 64px;
  }
  .page--narrow {
    padding: 32px 16px 64px;
  }
}
.page__title    { font-size: 1.8rem; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 8px; }
.page__subtitle { font-size: 0.95rem; color: var(--muted); line-height: 1.7; margin-bottom: 36px; }

/* ── GRID HELPERS ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── SPACING UTILITIES ──────────────────────────────────── */
.mt-sm { margin-top: 8px; }  .mb-sm { margin-bottom: 8px; }
.mt-md { margin-top: 16px; } .mb-md { margin-bottom: 16px; }
.mt-lg { margin-top: 32px; } .mb-lg { margin-bottom: 32px; }
.mt-xl { margin-top: 52px; }

/* ── TEXT UTILITIES ─────────────────────────────────────── */
.text-muted { color: var(--muted); }
.text-sm    { font-size: 0.85rem; }
.text-xs    { font-size: 0.75rem; }
.dimmed     { opacity: 0.45; pointer-events: none; }

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 28px;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── TOAST ──────────────────────────────────────────────── */
.sg-toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 600;
  box-shadow: var(--shadow-hover);
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
