/* =========================================================
   SchoolPixa Blog - Public Theme
   Fresh, elegant, editorial-style design system (white background)
   ========================================================= */

:root {
  --sp-primary: #2f5fff;
  --sp-primary-dark: #1e3fc4;
  --sp-ink: #14171f;
  --sp-body: #444a5a;
  --sp-muted: #7a8194;
  --sp-border: #e8eaf0;
  --sp-surface: #ffffff;
  --sp-bg: #ffffff;
  --sp-bg-soft: #f7f8fb;
  --sp-radius: 12px;
  --sp-shadow: 0 4px 16px rgba(20, 23, 31, 0.05);
  --sp-shadow-hover: 0 12px 28px rgba(20, 23, 31, 0.1);
  --sp-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--sp-font);
  color: var(--sp-body);
  background: var(--sp-bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem var(--sp-primary);
}

a {
  color: var(--sp-primary);
}

a:hover {
  color: var(--sp-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--sp-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Navbar ---------- */
.blog-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--sp-border);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.blog-navbar .navbar-brand {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--sp-ink);
  letter-spacing: -0.02em;
}

.blog-navbar .navbar-brand .blog-logo {
  height: 45px;
  width: auto;
  display: block;
}

.blog-navbar .navbar-brand span {
  color: var(--sp-primary);
}

.blog-navbar .nav-link {
  font-weight: 600;
  color: var(--sp-body) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.blog-navbar .nav-link:hover,
.blog-navbar .nav-link.active {
  background: rgba(47, 95, 255, 0.08);
  color: var(--sp-primary) !important;
}

.blog-search {
  position: relative;
}

.blog-search input {
  border-radius: 999px;
  border: 1px solid var(--sp-border);
  padding-left: 1rem;
  min-width: 220px;
}

.blog-search button {
  border-radius: 999px;
  font-weight: 600;
}

/* ---------- Hero ---------- */
.blog-hero {
  background-image:
    linear-gradient(135deg, rgba(47, 95, 255, 0.55) 0%, rgba(30, 63, 196, 0.42) 45%, rgba(255, 255, 255, 0.35) 100%),
    url("/blog/images/blog-hero.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: var(--sp-ink);
  padding: 3.25rem 0 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--sp-border);
  text-align: center;
  overflow: hidden;
}

.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(20, 23, 31, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.blog-hero > .container {
  position: relative;
  z-index: 1;
}

.blog-hero h1 {
  color: #ffffff;
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 14px rgba(20, 23, 31, 0.55);
}

.blog-hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.08rem;
  margin-bottom: 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 10px rgba(20, 23, 31, 0.5);
}

.blog-hero .badge-soft {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-block;
  margin-bottom: 1rem;
  backdrop-filter: blur(2px);
}

@media (max-width: 576px) {
  .blog-hero {
    background-attachment: scroll;
    padding: 2.25rem 0 1.75rem;
  }

  .blog-hero h1 {
    font-size: 1.75rem;
  }
}

/* ---------- Article Cards ---------- */
.article-card {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  overflow: hidden;
  box-shadow: var(--sp-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sp-shadow-hover);
  border-color: #d7dae2;
}

.article-card .card-img-wrap {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--sp-bg-soft);
}

.article-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.article-card .card-body {
  padding: 1.35rem;
}

.article-card .card-title a {
  color: var(--sp-ink);
  text-decoration: none;
  font-size: 1.15rem;
  line-height: 1.35;
}

.article-card .card-title a:hover {
  color: var(--sp-primary);
}

.article-card .card-text {
  color: var(--sp-muted);
  font-size: 0.95rem;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--sp-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin-bottom: 0.75rem;
}

.category-pill {
  display: inline-block;
  background: rgba(47, 95, 255, 0.1);
  color: var(--sp-primary);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
}

.category-pill:hover {
  background: rgba(47, 95, 255, 0.18);
  color: var(--sp-primary-dark);
}

.read-more-link {
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.read-more-link::after {
  content: "\2192";
  transition: transform 0.2s ease;
}

.read-more-link:hover::after {
  transform: translateX(3px);
}

/* ---------- Sidebar ---------- */
.sidebar-card {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  margin-bottom: 1.75rem;
  overflow: hidden;
}

.sidebar-card .sidebar-card-header {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--sp-ink);
  background: var(--sp-bg-soft);
  border-bottom: 1px solid var(--sp-border);
}

.sidebar-card .list-group-item {
  border: none;
  border-bottom: 1px solid var(--sp-border);
  padding: 0.75rem 1.25rem;
  background: transparent;
}

.sidebar-card .list-group-item:last-child {
  border-bottom: none;
}

.sidebar-card .list-group-item a {
  text-decoration: none;
  color: var(--sp-body);
  font-weight: 500;
}

.sidebar-card .list-group-item a:hover {
  color: var(--sp-primary);
}

.sidebar-card .list-group-item.active {
  background: rgba(47, 95, 255, 0.08);
}

.sidebar-card .list-group-item.active a {
  color: var(--sp-primary);
  font-weight: 700;
}

.sidebar-card .card-body {
  padding: 1.1rem 1.25rem;
}

.tag-pill {
  display: inline-block;
  background: var(--sp-bg-soft);
  border: 1px solid var(--sp-border);
  color: var(--sp-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  margin: 0 0.35rem 0.35rem 0;
}

.tag-pill:hover {
  background: var(--sp-primary);
  border-color: var(--sp-primary);
  color: #fff;
}

/* ---------- Pagination ---------- */
.blog-pagination .page-link {
  border: none;
  color: var(--sp-body);
  font-weight: 600;
  border-radius: 999px;
  margin: 0 0.2rem;
  min-width: 42px;
  text-align: center;
}

.blog-pagination .page-item.active .page-link {
  background: var(--sp-primary);
  color: #fff;
}

.blog-pagination .page-item.disabled .page-link {
  color: #c3c8d6;
}

.blog-pagination .page-link:hover {
  background: rgba(47, 95, 255, 0.1);
  color: var(--sp-primary);
}

/* ---------- Article Detail ---------- */
.article-header .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.article-header h1 {
  font-size: 2.1rem;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.article-hero-image {
  border-radius: var(--sp-radius);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--sp-shadow);
}

.article-hero-image img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.article-content {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--sp-body);
}

.article-content h2, .article-content h3, .article-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content p {
  margin-bottom: 1.35rem;
}

.article-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1rem 0;
}

.article-content blockquote {
  border-left: 4px solid var(--sp-primary);
  background: var(--sp-bg-soft);
  padding: 1rem 1.5rem;
  border-radius: 0 10px 10px 0;
  color: var(--sp-ink);
  font-style: italic;
}

.article-content pre {
  background: #14171f;
  color: #eef0f6;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
}

.share-links .btn {
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.article-nav {
  border-top: 1px solid var(--sp-border);
  padding-top: 1.5rem;
  margin-bottom: 2rem;
}

.article-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--sp-ink);
}

.article-nav a:hover {
  color: var(--sp-primary);
}

.section-heading {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.6rem;
}

.section-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 3px;
  background: var(--sp-primary);
  border-radius: 999px;
}

/* ---------- Footer ---------- */
.blog-footer {
  background: #ffffff;
  color: var(--sp-body);
  border-top: 1px solid var(--sp-border);
  margin-top: 4rem;
  padding: 2.5rem 0 1.5rem;
}

.blog-footer h6 {
  color: var(--sp-ink);
  font-weight: 700;
  margin-bottom: 1rem;
}

.blog-footer a {
  color: var(--sp-body);
  text-decoration: none;
}

.blog-footer a:hover {
  color: var(--sp-primary);
}

.blog-footer .footer-bottom {
  border-top: 1px solid var(--sp-border);
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--sp-muted);
}

/* ---------- Utilities ---------- */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--sp-bg-soft);
  border: 1px dashed var(--sp-border);
  border-radius: var(--sp-radius);
  color: var(--sp-muted);
}