/* ============================================================
   Tiguleni Academy — Modern School Design System (2026)
   ============================================================ */
:root {
  --tg-primary: #4f46e5;
  --tg-primary-2: #7c3aed;
  --tg-primary-dark: #312e81;
  --tg-accent: #06b6d4;
  --tg-success: #059669;
  --tg-warn: #d97706;
  --tg-danger: #dc2626;
  --tg-bg: #f1f5f9;
  --tg-bg-soft: #eef2ff;
  --tg-card: #ffffff;
  --tg-text: #0f172a;
  --tg-muted: #64748b;
  --tg-border: #e2e8f0;
  --tg-radius: 18px;
  --tg-radius-sm: 12px;
  --tg-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --tg-shadow-lg: 0 20px 50px -18px rgba(79, 70, 229, 0.28);
  --tg-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tg-header-h: 64px;

  /* Legacy aliases so older templates pick up the new look */
  --primary: var(--tg-primary);
  --primary-color: var(--tg-primary);
  --secondary: var(--tg-primary-2);
  --secondary-color: var(--tg-primary-2);
  --primary-light: var(--tg-primary-2);
  --accent: var(--tg-accent);
  --accent-color: var(--tg-accent);
  --success: var(--tg-success);
  --bg: var(--tg-bg);
  --bg-color: var(--tg-bg);
  --card: var(--tg-card);
  --card-bg: var(--tg-card);
  --text: var(--tg-text);
  --text-color: var(--tg-text);
  --text-light: var(--tg-muted);
  --muted: var(--tg-muted);
  --border: var(--tg-border);
  --radius: var(--tg-radius);
  --shadow: var(--tg-shadow);
  --footer-bg: #0f172a;
  --footer-text: #94a3b8;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--tg-font);
  background: var(--tg-bg);
  color: var(--tg-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--tg-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- Layout ---------- */
.tg-container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}
.tg-section { padding: 4rem 0; }
.tg-section-sm { padding: 2.5rem 0; }

/* ---------- App header ---------- */
.tg-header,
header.main-header,
header:not(.auth-header) {
  background: linear-gradient(135deg, var(--tg-primary-dark) 0%, var(--tg-primary) 55%, var(--tg-primary-2) 100%) !important;
  color: #fff !important;
  box-shadow: 0 8px 28px rgba(49, 46, 129, 0.28);
}

.tg-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  min-height: var(--tg-header-h);
}
.tg-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #fff !important;
  text-decoration: none !important;
}
.tg-brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,0.18);
  display: grid; place-items: center;
  font-size: 1rem;
}
.tg-nav-links {
  display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0;
}
.tg-nav-links a {
  color: rgba(255,255,255,0.92) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  text-decoration: none !important;
  transition: background .15s;
}
.tg-nav-links a:hover { background: rgba(255,255,255,0.14); }

/* ---------- Cards ---------- */
.tg-card,
.card,
.course-card,
.school-card,
.form-card,
.auth-container {
  background: var(--tg-card) !important;
  border: 1px solid var(--tg-border) !important;
  border-radius: var(--tg-radius) !important;
  box-shadow: var(--tg-shadow) !important;
}

.tg-card:hover,
.course-card:hover,
.school-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--tg-shadow-lg) !important;
  transition: transform .2s ease, box-shadow .2s ease;
}

/* ---------- Buttons ---------- */
.tg-btn,
.btn,
button.btn,
.course-card button,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.25rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, filter .15s;
  text-decoration: none !important;
}
.tg-btn:hover, .btn:hover, button.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.tg-btn-primary,
.btn-primary {
  background: linear-gradient(135deg, var(--tg-primary), var(--tg-primary-2)) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
}
.tg-btn-success, .btn-success {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  color: #fff !important;
}
.tg-btn-ghost, .btn-ghost {
  background: #f1f5f9 !important;
  color: #334155 !important;
}
.tg-btn-outline {
  background: transparent !important;
  color: #fff !important;
  border: 1.5px solid rgba(255,255,255,0.55) !important;
}

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], input[type="url"],
input[type="tel"], input[type="date"], textarea, select {
  font-family: inherit;
  border-radius: 12px !important;
  border: 1.5px solid var(--tg-border) !important;
  padding: 0.75rem 0.9rem !important;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: var(--tg-primary) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}
label { font-weight: 600; font-size: 0.85rem; color: #334155; }

/* ---------- Hero ---------- */
.tg-hero {
  position: relative;
  padding: 4.5rem 1.25rem 4rem;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(124, 58, 237, 0.45), transparent),
    linear-gradient(135deg, #1e1b4b 0%, #312e81 35%, #4f46e5 70%, #7c3aed 100%);
}
.tg-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}
.tg-hero p {
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  opacity: 0.9;
  font-size: 1.05rem;
}
.tg-hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Section titles ---------- */
.tg-section-title {
  text-align: center;
  margin-bottom: 2rem;
}
.tg-section-title h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  background: linear-gradient(90deg, var(--tg-primary), var(--tg-primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tg-section-title p { color: var(--tg-muted); margin: 0; }

/* ---------- Grid ---------- */
.tg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* ---------- Pills / badges ---------- */
.tg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tg-badge-soft { background: #e0e7ff; color: #3730a3; }
.tg-badge-success { background: #d1fae5; color: #065f46; }

/* ---------- Footer ---------- */
.tg-footer,
footer {
  background: #0f172a !important;
  color: #94a3b8 !important;
  padding: 2.5rem 1.25rem !important;
  text-align: center;
  margin-top: 3rem;
}
.tg-footer a, footer a { color: #c7d2fe; }

/* ---------- Flash / alerts ---------- */
.flash, .alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
  font-weight: 500;
}
.alert-success, .flash.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger, .flash.danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info, .flash.info { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--tg-card);
  border-radius: var(--tg-radius);
  overflow: hidden;
  box-shadow: var(--tg-shadow);
}
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--tg-border); }
th { background: #f8fafc; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--tg-muted); }

/* ---------- Utility ---------- */
.tg-muted { color: var(--tg-muted); }
.tg-center { text-align: center; }
.tg-mt-1 { margin-top: 0.5rem; }
.tg-mt-2 { margin-top: 1rem; }
.tg-mt-3 { margin-top: 1.5rem; }
.tg-mb-2 { margin-bottom: 1rem; }

@media (max-width: 720px) {
  .tg-nav-links { display: none; }
  .tg-hero { padding: 3rem 1rem; }
}
