:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Liberation Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --navy: #1B2244;
  --navy-deep: #0F1530;
  --green: #5DCE7B;
  --green-dark: #4BB868;
  --purple: #6E40AA;
  --text: #2E3450;
  --muted: #6B7280;
  --bg: #ffffff;
  --card: #ffffff;
  --soft: #F4F7FB;
  --border: #E5EAF2;
}
body { overflow-x: hidden !important; }
* { box-sizing: border-box; }
a { text-decoration: none; }
a:hover { text-decoration: none !important; }

/* Hero */
section.fc-hero {
  background: linear-gradient(180deg, #1B2244 0%, #0F1530 100%) !important;
  color: white !important;
  padding: 80px 24px 220px !important;
  text-align: center !important;
  position: relative !important;
  overflow: hidden !important;
  border: none !important;
  margin: 0 !important;
}
section.fc-hero::before {
  content: "" !important; position: absolute !important; inset: 0 !important;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.18) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(94,206,123,.25) 1px, transparent 1.5px) !important;
  background-size: 60px 60px, 90px 90px !important;
  background-position: 0 0, 30px 45px !important;
  opacity: .4 !important; pointer-events: none !important;
}
section.fc-hero h1 {
  font-size: 72px !important; font-weight: 800 !important;
  background: linear-gradient(90deg, #7DD3FC, #5DCE7B) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  color: transparent !important;
  letter-spacing: -1px !important;
  line-height: 1.1 !important;
  text-shadow: none !important;
}
section.fc-hero p {
  margin-top: 14px !important; color: #C9D2E3 !important;
  font-size: 18px !important; font-weight: 400 !important;
}

/* Featured card overlapping hero */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.featured-wrap { margin-top: -160px; position: relative; z-index: 2; }
.featured {
  background: white; border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(15, 21, 48, .35);
  display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; min-height: 380px;
}
.featured-body { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
.featured-body h2 { color: var(--navy); font-size: 34px; line-height: 1.2; font-weight: 800; }
.featured-body h2 a { color: inherit; }
.featured-body h2 a:hover { color: inherit; text-decoration: none !important; }
.tag {
  display: inline-block; align-self: flex-start; width: fit-content;
  background: var(--purple); color: white;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 4px;
  margin-top: 16px; letter-spacing: .5px; text-transform: uppercase;
}
.featured-body p { margin-top: 22px; color: var(--muted); line-height: 1.6; font-size: 15px; }
.featured-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.read-now { color: var(--purple); font-weight: 700; font-size: 15px; }
.read-now:hover { color: var(--navy); }
.date { color: var(--muted); font-size: 14px; }
.featured-art {
  background: linear-gradient(135deg, #EEF2FB 0%, #DDE6F5 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 88px; font-weight: 800; color: var(--navy); letter-spacing: -2px;
  background-size: cover; background-position: center;
}
.featured-art .accent { color: var(--green); }

/* Card grid */
.card-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
/* card is now an <a> — needs block display and inherited colour */
.card {
  display: flex; flex-direction: column; color: inherit;
  background: white; border-radius: 14px; overflow: hidden;
  box-shadow: 0 14px 30px -18px rgba(15,21,48,.25);
  transition: transform .25s, box-shadow .25s; cursor: pointer;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -18px rgba(15,21,48,.35); color: inherit; text-decoration: none !important; }
.card-art {
  height: 200px; display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 800; color: white;
  background-size: cover; background-position: center;
}
.card-art.a { background-color: #6E40AA; background-image: linear-gradient(135deg, #6E40AA, #B57BEE); }
.card-art.b { background-color: #1B2244; background-image: linear-gradient(135deg, #1B2244, #4D5BB0); }
.card-art.c { background-color: #5DCE7B; background-image: linear-gradient(135deg, #5DCE7B, #2BA76A); }
.card-body { padding: 24px 24px 22px; display: flex; flex-direction: column; flex: 1; }
.card-title { color: var(--navy); font-size: 19px; font-weight: 800; line-height: 1.3; }
.card-title .tag { margin-left: 6px; vertical-align: middle; margin-top: 0; }
.card-excerpt { color: var(--muted); margin-top: 12px; font-size: 14.5px; line-height: 1.55; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 18px; }

/* Two-column main section */
.main-section { background: linear-gradient(180deg, #fff 0%, #EEF4FB 100%); padding: 90px 0 120px; margin-top: 90px; border-top: 1px solid var(--border); }
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 56px; }
.section-title { font-size: 36px; color: var(--navy); font-weight: 800; margin-bottom: 32px; }

.post-list { transition: opacity .18s ease; overflow-anchor: none; }
.post-list.fading { opacity: 0; pointer-events: none; }
.post-list .post {
  display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--border);
  animation: postIn .3s ease both;
}
@keyframes postIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-thumb {
  width: 160px; height: 160px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800; color: white; flex-shrink: 0; overflow: hidden;
  border: 2px solid var(--border);
}
.post-title { color: var(--navy); font-size: 22px; font-weight: 800; line-height: 1.3; }
.post-title a { color: inherit; }
.post-title a:hover { color: inherit; text-decoration: none !important; }
.post-title .tag { margin-left: 10px; vertical-align: middle; margin-top: 0; }
.post-excerpt { color: var(--muted); margin-top: 12px; font-size: 15px; line-height: 1.6; }
.post-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }

/* Filter sidebar */
.filter {
  background: #DCEAF8; border-radius: 14px; padding: 28px 26px;
  position: sticky; top: 96px;
  height: calc(100vh - 116px); overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(27,34,68,.15) transparent;
}
.filter:hover { scrollbar-color: rgba(27,34,68,.35) transparent; }
.filter::-webkit-scrollbar { width: 4px; }
.filter::-webkit-scrollbar-track { background: transparent; }
.filter::-webkit-scrollbar-thumb { background: rgba(27,34,68,.15); border-radius: 2px; }
.filter:hover::-webkit-scrollbar-thumb { background: rgba(27,34,68,.35); }
.filter h3 { font-size: 28px; color: var(--navy); margin: 0 0 22px 0; padding: 0; font-weight: 800; }
.filter h4 { color: var(--purple); font-size: 18px; font-weight: 800; margin: 0 0 12px 0; padding: 0; }
.sort-selects { display: block; margin-bottom: 22px; }
.sort-sel {
  display: block;
  width: 100%;
  padding: 10px 4px;
  border: none;
  border-bottom: 1px solid rgba(27,34,68,.08);
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  outline: none;
  appearance: auto;
  -webkit-appearance: auto;
  box-sizing: border-box;
}
.sort-sel:last-child { border-bottom: none; }
.sort-sel:hover { color: var(--purple); }
.sort-sel:focus { outline: none; color: var(--purple); }
.filter-search {
  width: 100%; padding: 10px 14px; border-radius: 6px;
  border: 1px solid rgba(27,34,68,.12); background: #C9DDF0;
  font-size: 14px; color: var(--navy); margin-bottom: 22px; outline: none;
}
.filter-search::placeholder { color: #6B7280; }
.filter-search:focus { border-color: var(--purple); background: #fff; }
.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li { padding: 10px 4px; color: var(--navy); font-weight: 500; cursor: pointer; border-bottom: 1px solid rgba(27, 34, 68, 0.08); }
.cat-list li:last-child { border-bottom: none; }
.cat-list li a { color: inherit; display: block; }
.cat-list li:hover, .cat-list li:hover a { color: var(--purple); }
.cat-list li.all-cats a { color: #2563EB; font-weight: 700; }
.cat-list li.active-cat, .cat-list li.active-cat a { color: var(--purple) !important; font-weight: 700; }
.cat-list li.active-cat { border-left: 3px solid var(--purple); padding-left: 8px; }

/* Loader */
.loader { text-align: center; padding: 30px; color: var(--muted); font-size: 14px; }
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--purple);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.fc-footer {
  background: linear-gradient(180deg, #1B2244 0%, #0F1530 100%);
  color: #C9D2E3; padding: 60px 0 32px;
}
.fc-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.fc-footer-logo { height: 32px; width: auto; display: block; filter: brightness(0) invert(1); margin-bottom: 16px; }
.fc-footer-tagline { font-size: 14px; color: #8B97B8; line-height: 1.6; max-width: 240px; }
.fc-footer h4 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; margin-bottom: 16px; }
.fc-footer ul { list-style: none; }
.fc-footer ul li { margin-bottom: 10px; }
.fc-footer ul li a { color: #8B97B8; font-size: 14px; transition: color .2s; }
.fc-footer ul li a:hover { color: var(--green); }
.fc-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 48px; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.fc-footer-bottom p { font-size: 13px; color: #8B97B8; }
.fc-footer-bottom a { color: #8B97B8; font-size: 13px; }
.fc-footer-bottom a:hover { color: var(--green); }

@media (max-width: 900px) {
  section.fc-hero h1 { font-size: 44px !important; }
  .featured { grid-template-columns: 1fr; }
  .featured-art { min-height: 220px; font-size: 64px; }
  .featured-body { padding: 32px 26px; }
  .card-grid { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .layout > aside.filter { order: -1; position: static; height: auto; max-height: 60vh; }
  .layout > div { order: 0; }
  .post { grid-template-columns: 90px 1fr !important; gap: 16px !important; }
  .post-thumb { width: 90px !important; height: 90px !important; font-size: 22px !important; }
  .post-title { font-size: 18px !important; }
  .fc-footer .container { grid-template-columns: 1fr 1fr; gap: 32px; }
  .fc-footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
