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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #111827; /* dark gray */
  background-color: #ffffff;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: #1e3a8a;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: #0f172a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 2.5rem 0;
}

.section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #111827;
}

.subheading {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid #e5e7eb;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, #1e3a8a 0%, #f97316 50%, #1e3a8a 100%);
  opacity: 0.85;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: #1e3a8a;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
}

.nav-toggle {
  display: inline-flex;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.4rem 0.5rem;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background-color: #111827;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background-color: #111827;
  left: 0;
}

.nav-toggle span::before {
  top: -5px;
}

.nav-toggle span::after {
  top: 5px;
}

.nav-menu {
  display: none;
  border-top: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.nav-menu.open {
  display: block;
}

.nav-list {
  display: flex;
  flex-direction: column;
}

.nav-list li a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.nav-list li a:hover,
.nav-list li a.active-link {
  background-color: #eff6ff;
  color: #1e3a8a;
}

/* Desktop nav */
@media (min-width: 768px) {
  .header-inner {
    padding: 0.75rem 0;
  }
  .nav-toggle {
    display: none;
  }
  .nav-menu {
    display: block;
    border-top: none;
  }
  .nav-list {
    flex-direction: row;
    gap: 0.5rem;
  }
  .nav-list li a {
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
  }
}

/* Hero */
.hero {
  padding: 2.5rem 0 2rem;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.28), transparent 55%),
    linear-gradient(135deg, #1e3a8a 0%, #020617 100%);
  color: #f9fafb;
}

.hero-inner {
  max-width: 680px;
}

.hero-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.hero-text {
  font-size: 0.98rem;
  margin-bottom: 1.25rem;
  color: #e5e7eb;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.btn-primary {
  background-color: #f97316;
  color: #111827;
}

.btn-primary:hover {
  background-color: #ea580c;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.btn-outline {
  background-color: #ffffff;
  color: #1e3a8a;
  border-color: #93c5fd;
}

.btn-outline:hover {
  background-color: #1e3a8a;
  color: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

/* Quick Tools Grid */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border-color: #c7d2fe;
  background-color: #f9fafb;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.card-meta {
  font-size: 0.8rem;
  color: #9ca3af;
}

.card-body {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 0.6rem;
}

.card-footer {
  display: flex;
  justify-content: flex-start;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.8rem;
  margin: 0.75rem 0 0;
  color: #6b7280;
}

.breadcrumbs a {
  color: #4b5563;
}

.breadcrumbs span {
  margin: 0 0.25rem;
}

/* Content */
.page-header {
  padding: 1.5rem 0 0.5rem;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.page-intro {
  font-size: 0.95rem;
  color: #4b5563;
}

.content {
  font-size: 0.95rem;
  color: #374151;
}

.content p {
  margin-bottom: 0.8rem;
}

.content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.4rem 0 0.6rem;
}

.content h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 1rem 0 0.4rem;
}

.content ul {
  padding-left: 1.1rem;
  margin-bottom: 0.8rem;
}

.content ul li {
  list-style: disc;
  margin-bottom: 0.3rem;
}

/* Lists & tags */
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  background-color: #eff6ff;
  color: #1e3a8a;
}

/* FAQ */
.faq {
  margin-top: 1.5rem;
}

.faq-item {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 0.75rem;
  background-color: #ffffff;
  overflow: hidden;
}

.faq-question {
  padding: 0.8rem 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-icon {
  font-size: 1.1rem;
  color: #9ca3af;
}

.faq-answer {
  padding: 0.75rem 1rem 0.9rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.9rem;
  color: #4b5563;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Forms */
.form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
}

.input,
.textarea,
.select {
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  background-color: #ffffff;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 1px rgba(30, 58, 138, 0.15);
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

.form-help {
  font-size: 0.8rem;
  color: #6b7280;
}

.form-message {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

/* Tables-like layouts (calculators) */
.calc-grid {
  display: grid;
  gap: 0.75rem;
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.calc-result {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.5rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.muted {
  color: #6b7280;
  font-size: 0.82rem;
}

/* Blog & Cards */
.post-list {
  display: grid;
  gap: 1rem;
}

.post-card {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  background-color: #ffffff;
}

.post-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.post-meta {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

/* Syllabus, Previous Papers */
.grid-branch {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .grid-branch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.branch-card-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.branch-list {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background-color: #0f172a;
  color: #e5e7eb;
  padding: 1.75rem 0 1.5rem;
  margin-top: 2.5rem;
}

.footer-top {
  display: grid;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.footer-col-title {
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.footer-links a {
  display: inline-block;
  font-size: 0.86rem;
  color: #e5e7eb;
  margin-bottom: 0.25rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-legal {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: #9ca3af;
}

.footer-bottom {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #9ca3af;
}

/* Utility */
.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.mt-4 {
  margin-top: 1rem;
}
.text-center {
  text-align: center;
}
.text-sm {
  font-size: 0.85rem;
}
.bg-soft-blue {
  background-color: #eff6ff;
}
.border {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem 0.9rem;
}

/* Larger screens tweaks */
@media (min-width: 1024px) {
  .hero {
    padding: 3rem 0 3rem;
  }
  .hero-title {
    font-size: 2.1rem;
  }
}

/* Alerts / Info boxes */
.alert {
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.88rem;
  margin: 0.8rem 0;
}

.alert-info {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  background-color: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
}

.cookie-banner a {
  color: #bfdbfe;
  text-decoration: underline;
}

.cookie-banner button {
  margin-left: 0.5rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: none;
  background-color: #f97316;
  color: #111827;
  font-size: 0.8rem;
  font-weight: 600;
}

.cookie-banner button:hover {
  background-color: #ea580c;
}

