/* Project 5050 Frontend Theme (Professional Glass UI)
   v1.0 – uses CSS vars: --primary --secondary --accent
*/

:root{
  /* Defaults (admin can override via injected CSS vars in layout)
     Expected injected vars: --bg1, --bg2, --bgsolid, --cardA, --cardB,
     --border, --text, --muted, --headerSolid, --footerSolid,
     --headingFrom, --headingTo, --headingSolid
  */
  --bg1: var(--bg1, #f7fbff);
  --bg2: var(--bg2, #f3fff7);
  --bgsolid: var(--bgsolid, #f8fbff);
  --card: var(--cardA, rgba(255,255,255,.78));
  --card2: var(--cardB, rgba(255,255,255,.62));
  --border: var(--border, #e9eef6);
  --text: var(--text, #0f172a);
  --muted: var(--muted, #64748b);
  --shadow: 0 12px 34px rgba(15, 23, 42, .08);
  --radius: 18px;
}

html,body{height:100%;}
body{
  color:var(--text);
  background: radial-gradient(1000px 450px at 20% 0%, rgba(99,102,241,.18), transparent 60%),
              radial-gradient(900px 420px at 85% 10%, rgba(34,211,238,.16), transparent 55%),
              linear-gradient(135deg,var(--bg1),var(--bg2));
}

/* Admin-controlled layout switches */
body.theme-bg-solid{
  background: var(--bgsolid);
}
body.theme-header-solid .site-header{
  background: var(--headerSolid);
  backdrop-filter: none;
}
body.theme-footer-solid .site-footer{
  background: var(--footerSolid);
  backdrop-filter: none;
}

/* Heading style: gradient or solid */
body.theme-heading-gradient h1,
body.theme-heading-gradient h2,
body.theme-heading-gradient h3{
  background: linear-gradient(135deg, var(--headingFrom), var(--headingTo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.theme-heading-solid h1,
body.theme-heading-solid h2,
body.theme-heading-solid h3{
  color: var(--headingSolid);
}

/* Education portal vibe */
.brand-dot{width:10px;height:10px;border-radius:999px;background:linear-gradient(135deg,var(--primary),var(--accent)); box-shadow:0 8px 18px rgba(99,102,241,.25);} 
.brand-name{font-weight:800;letter-spacing:.2px;color:var(--text);} 

.navbar-toggler{
  border:1px solid var(--border);
  border-radius: 14px;
  padding: .45rem .55rem;
  background: rgba(255,255,255,.65);
}
.navbar-toggler:focus{box-shadow:none;}
.navbar-toggler-icon{filter: contrast(1.1) saturate(1.1);}

.nav-pill{
  display:inline-flex;
  align-items:center;
  padding:9px 14px;
  border-radius: 999px;
  border:1px solid transparent;
  color: var(--text);
  background: transparent;
}
.nav-pill:hover{
  text-decoration:none;
  background: rgba(255,255,255,.72);
  border-color: var(--border);
}

/* Hero */
.hero{
  border-radius: calc(var(--radius) + 8px);
  border:1px solid var(--border);
  background: radial-gradient(900px 320px at 10% 0%, rgba(99,102,241,.20), transparent 60%),
              radial-gradient(780px 320px at 85% 10%, rgba(34,211,238,.16), transparent 55%),
              rgba(255,255,255,.70);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 26px 26px;
}
.hero .hero-kicker{color: var(--muted); font-weight: 600;}
.hero .hero-title{margin: 10px 0 10px;}
.hero .hero-sub{color: var(--muted); max-width: 62ch;}

.search-card{
  background: rgba(255,255,255,.72);
  border:1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
}
.search-card input{
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  background: rgba(255,255,255,.85);
}
.search-card input:focus{box-shadow:none; border-color: color-mix(in srgb, var(--primary) 35%, var(--border));}

/* Blog cards */
.post-grid{display:grid; grid-template-columns: repeat(3, 1fr); gap: 16px;}
@media (max-width: 992px){ .post-grid{grid-template-columns: 1fr;}}

.post-card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
}
.post-card .thumb{
  width:100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(34,211,238,.10));
  border-bottom: 1px solid var(--border);
  display:block;
  object-fit: cover;
}
.post-card .meta{color: var(--muted); font-size: 13px;}
.post-card .title{font-weight: 800; font-size: 18px; color: var(--text);}
.post-card .title:hover{color: var(--primary); text-decoration:none;}
.post-card .excerpt{color: var(--muted); margin: 8px 0 0;}

/* Post typography */
article{max-width: 80ch;}
article img{max-width:100%; height:auto; border-radius: 16px; border:1px solid var(--border);}
article table{width:100%;}
article table, article th, article td{border:1px solid var(--border);} 
article th, article td{padding:10px; vertical-align: top;}
article blockquote{border-left:4px solid color-mix(in srgb, var(--primary) 45%, var(--border)); padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.55);} 

.breadcrumb-lite{color: var(--muted); font-size: 12px;}
.tag{display:inline-flex; align-items:center; font-size: 12px; padding:6px 10px; border-radius:999px; border:1px solid var(--border); background: rgba(255,255,255,.65); color: var(--text);} 

a{color:var(--primary); text-decoration:none;}
a:hover{color:color-mix(in srgb, var(--primary) 78%, #000); text-decoration:underline;}

.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.72);
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(12px);
}
.site-header .fw-bold{letter-spacing:.2px;}
.site-header nav a{
  padding:8px 12px;
  border-radius:999px;
  color:var(--text);
  border:1px solid transparent;
}
.site-header nav a:hover{
  text-decoration:none;
  background:rgba(255,255,255,.7);
  border-color:var(--border);
}

/* Main container spacing (wider desktop layout, fully responsive) */
main.container{max-width: 1320px;}
@media (min-width: 1400px){ main.container{max-width: 1480px;} }
@media (max-width: 992px){ main.container{max-width: 100%;} }

/* Make editorial content naturally responsive */
.content-card img{max-width:100%;height:auto;}
.content-card iframe{max-width:100%;}
.content-card table{max-width:100%;}

/* Content blocks */
.card, .content-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
}
.content-card{ padding: 22px 22px; }

/* Headings */
h1,h2,h3{letter-spacing:-.3px;}
h1{font-size: clamp(28px, 3.1vw, 44px); margin-bottom:.35rem;}
h2{font-size: clamp(20px, 2.1vw, 30px);}
p{color:var(--text); line-height:1.7;}
.small-muted{color:var(--muted);}
.muted{color:var(--muted);}

/* Buttons */
.btn{
  border-radius: 14px;
  padding: 10px 16px;
}
.btn-primary{
  border:0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 24px rgba(37,99,235,.18);
}
.btn-primary:hover{opacity:.95;}
.btn-outline{
  border:1px solid var(--border);
  background:rgba(255,255,255,.55);
}
.btn-outline:hover{background:rgba(255,255,255,.75);}

/* Footer */
.site-footer{
  background: rgba(255,255,255,.72);
  border-top:1px solid var(--border);
  backdrop-filter: blur(10px);
}
.site-footer .fw-semibold{color:var(--text);}
.site-footer a{color:var(--text);}
.site-footer a:hover{color:var(--primary);}

/* Utility: make plain content look better (home, page, post) */
.page-wrap{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding: 26px 26px;
  box-shadow: var(--shadow);
}
.page-wrap .lead{color:var(--muted);}

/* Lists spacing */
ul,ol{padding-left: 1.2rem;}
li{margin-bottom:.35rem;}

/* Author page */
.avatar-ring{
  width:72px;height:72px;border-radius:999px;overflow:hidden;
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(34,211,238,.12));
  border:1px solid var(--border);
  box-shadow: 0 12px 26px rgba(15,23,42,.08);
  display:flex;align-items:center;justify-content:center;
}
.avatar-ring img{width:72px;height:72px;object-fit:cover;}
.chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:7px 12px;border-radius:999px;
  background: rgba(255,255,255,.70);
  border:1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}
.chip:hover{text-decoration:none;}
.stat-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px;}
.stat{
  background: rgba(255,255,255,.72);
  border:1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  min-width: 120px;
}
.stat .k{font-size:12px;color:var(--muted);}
.stat .v{font-weight:900;font-size:18px;line-height:1.1;}


/* Blog list enhancements */
.date-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(34,211,238,.12));
  color: var(--text);
  font-weight:600;
}
.btn-primary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.35);
  background: linear-gradient(135deg, rgba(99,102,241,.95), rgba(34,211,238,.85));
  color:#fff;
  font-weight:700;
  box-shadow: 0 10px 24px rgba(17,24,39,.10);
  transition: transform .15s ease, filter .15s ease;
}
.btn-primary:hover{
  text-decoration:none;
  filter: saturate(1.05) contrast(1.03);
  transform: translateY(-1px);
}

/* ============================================================
   Project 5051 Frontend Revamp v2 (2026-01-31)
   Goal: more engaging blog/pages UI + animations + justified content
   Safe: only CSS (no breaking markup dependencies)
   ============================================================ */

/* Stronger background + animated blobs (subtle) */
body{
  background: radial-gradient(900px 520px at 15% -10%, rgba(99,102,241,.22), transparent 60%),
              radial-gradient(920px 520px at 95% 0%, rgba(34,211,238,.20), transparent 58%),
              radial-gradient(900px 520px at 55% 110%, rgba(34,197,94,.12), transparent 55%),
              linear-gradient(135deg,var(--bg1),var(--bg2)) !important;
  position: relative;
  overflow-x:hidden;
}
body::before,
body::after{
  content:"";
  position:fixed;
  inset:auto;
  width:480px;
  height:480px;
  filter: blur(60px);
  opacity:.22;
  z-index:-1;
  pointer-events:none;
  border-radius:999px;
  animation: p5051Float 16s ease-in-out infinite;
}
body::before{
  left:-120px; top:120px;
  background: radial-gradient(circle at 30% 30%, rgba(99,102,241,.55), transparent 55%);
}
body::after{
  right:-140px; bottom:80px;
  background: radial-gradient(circle at 40% 40%, rgba(34,211,238,.55), transparent 55%);
  animation-duration: 20s;
}
@keyframes p5051Float{
  0%,100%{ transform: translate3d(0,0,0) scale(1); }
  50%{ transform: translate3d(18px,-14px,0) scale(1.06); }
}

/* Ensure containers don't paint white over gradient */
main, .site-main, .container, .container-fluid{ background: transparent !important; }

/* Typography & readable content */
.hero-title{
  letter-spacing:-.02em;
  line-height:1.08;
}
.hero-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.60);
  border:1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(15,23,42,.08);
}
.breadcrumb-lite{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  padding:2px 0;
  border-radius:0;
  background: transparent;
  border:0;
  backdrop-filter:none;
  box-shadow:none;
  font-size:11px;
  line-height:1.2;
  opacity:.92;
}
.breadcrumb-lite a{ color: var(--primary); text-decoration:none; }
.breadcrumb-lite a:hover{ text-decoration:underline; }

/* Glass cards (make sure visible) */
.content-card{
  border-radius: 20px;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 18px;
}
@media (max-width: 576px){
  .content-card{ padding: 14px; border-radius: 18px; }
}

/* Content spacing and justification (blog + pages) */
#post-content article,
.page-content article,
.content-card article{
  font-size: 16px;
  line-height: 1.78;
  color: var(--text);
}
#post-content article p,
.page-content article p,
.content-card article p{
  text-align: justify;
  text-justify: inter-word;
  margin-bottom: 14px;
}
#post-content article h2,
#post-content article h3,
.content-card article h2,
.content-card article h3{
  margin-top: 26px;
  margin-bottom: 10px;
  scroll-margin-top: 90px;
}
#post-content article ul, #post-content article ol,
.content-card article ul, .content-card article ol{
  padding-left: 1.2rem;
  margin-bottom: 14px;
}
#post-content article li{ margin: 6px 0; }
#post-content article blockquote,
.content-card article blockquote{
  border-left: 4px solid rgba(99,102,241,.55);
  padding: 10px 14px;
  margin: 14px 0;
  border-radius: 14px;
  background: rgba(99,102,241,.08);
}

/* Images inside content */
#post-content img, .content-card img{
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
}
#post-content figure, .content-card figure{ margin: 16px 0; }

/* Sidebar sticky card polish */
.p5051-sticky{
  position: sticky;
  top: 92px;
}

/* TOC */
.p5051-toc{
  margin-top: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.10));
  box-shadow: 0 18px 46px rgba(15,23,42,.10);
  overflow: hidden;
}
.p5051-toc .toc-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 12px 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(90deg, rgba(99,102,241,.16), rgba(34,211,238,.10), rgba(236,72,153,.08));
}
.p5051-toc .toc-title{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width: 0;
}
.p5051-toc .toc-title strong{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 14px;
  line-height: 1.1;
}
.p5051-toc .toc-title span{
  font-size: 12px;
  opacity: .85;
}
.p5051-toc .toc-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.18);
  color: var(--text);
  cursor:pointer;
  font-weight: 700;
  font-size: 12px;
  user-select:none;
}
.p5051-toc .toc-toggle:hover{
  background: rgba(255,255,255,.26);
}
.p5051-toc .toc-toggle svg{
  width: 14px; height: 14px;
  opacity: .9;
  transition: transform .18s ease;
}
.p5051-toc.is-collapsed .toc-toggle svg{
  transform: rotate(-90deg);
}
.p5051-toc .toc-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  max-height: 360px;
  overflow:auto;
  padding: 10px 10px 12px 10px;
}
.p5051-toc .toc-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  text-decoration:none;
  color: var(--text);
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.14);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.p5051-toc .toc-item:hover{
  background: rgba(255,255,255,.22);
  border-color: rgba(99,102,241,.20);
  transform: translateY(-1px);
}
.p5051-toc .toc-bullet{
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(99,102,241,.22);
  border: 1px solid rgba(99,102,241,.18);
}
.p5051-toc .toc-text{
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
  opacity: .94;
}
.p5051-toc .toc-item.lvl-2{
  padding-left: 14px;
  background: rgba(255,255,255,.10);
}
.p5051-toc .toc-item.lvl-2 .toc-bullet{
  width: 18px; height: 18px;
  font-size: 11px;
  opacity: .85;
}
.p5051-toc .toc-item.is-active{
  background: rgba(99,102,241,.14);
  border-color: rgba(99,102,241,.32);
}
.p5051-toc .toc-item.is-active .toc-bullet{
  background: rgba(99,102,241,.32);
  border-color: rgba(99,102,241,.22);
}
.p5051-toc .toc-foot{
  padding: 10px 12px 12px 12px;
  border-top: 1px solid rgba(255,255,255,.14);
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.p5051-toc .toc-mini{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.14);
  color: var(--text);
  text-decoration:none;
  font-weight: 700;
  font-size: 12px;
}
.p5051-toc .toc-mini:hover{ background: rgba(255,255,255,.22); }

/* Better anchor offset for TOC navigation */
#post-content article h2, #post-content article h3,
.content-card article h2, .content-card article h3,
article.page-content h2, article.page-content h3{
  scroll-margin-top: 110px;
}

@media (max-width: 991px){
  .p5051-toc .toc-list{
    max-height: 280px;
  }
}


/* Share row */
.p5051-share-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 12px;
}
.p5051-share-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  color: var(--text);
  text-decoration:none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.p5051-share-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15,23,42,.10);
  background: rgba(255,255,255,.68);
}

/* Reading progress bar */
.p5051-progress{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(99,102,241,.18);
  z-index: 9999;
}
.p5051-progress > span{
  display:block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  transition: width .08s linear;
}

/* Related cards grid (below content) */
.p5051-related-grid{
  margin-top: 18px;
}
.p5051-related-title{
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}
.p5051-card-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
@media (max-width: 991px){ .p5051-card-grid{ grid-template-columns: 1fr; } }
.p5051-post-card{
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid var(--border);
  background: var(--card2);
  box-shadow: var(--shadow);
  text-decoration:none;
  color: var(--text);
  transform: translateY(0);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.p5051-post-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15,23,42,.12);
  background: rgba(255,255,255,.72);
}
.p5051-post-card .thumb{
  width:100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(34,211,238,.14));
}
.p5051-post-card .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.p5051-post-card .body{
  padding: 12px 14px 14px;
}
.p5051-post-card .kicker{
  font-size: 12px;
  color: var(--muted);
}
.p5051-post-card .title{
  font-weight: 800;
  line-height: 1.25;
  margin-top: 6px;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.p5051-post-card .cta{
  margin-top: 10px;
  font-weight: 700;
  color: var(--primary);
}

/* Scroll reveal */
.p5051-reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.p5051-reveal.is-in{
  opacity: 1;
  transform: translateY(0);
}

/* Make header feel glassy */
.site-header{
  background: rgba(255,255,255,.62) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(233,238,246,.9);
}

/* Buttons: stronger but clean */
.btn-primary{
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(99,102,241,.22);
}
.btn-outline{
  border-radius: 14px;
}

/* Quick Actions (icon buttons) */
.p5051-qa-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:10px;
  margin-top: 12px;
}
@media (min-width: 1200px){
  .p5051-qa-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
.p5051-qa-btn{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  color: var(--text);
  text-decoration:none;
  box-shadow: 0 10px 22px rgba(15,23,42,.06);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  position: relative;
  overflow:hidden;
}
.p5051-qa-btn::after{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(600px 120px at 20% 20%, rgba(99,102,241,.18), transparent 60%),
              radial-gradient(600px 120px at 80% 30%, rgba(34,211,238,.16), transparent 60%);
  opacity:.0;
  transition: opacity .2s ease;
  pointer-events:none;
}
.p5051-qa-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15,23,42,.10);
  background: rgba(255,255,255,.72);
  border-color: rgba(99,102,241,.28);
}
.p5051-qa-btn:hover::after{ opacity: 1; }
.p5051-qa-ico{
  width: 22px;
  height: 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  background: rgba(99,102,241,.10);
  color: var(--primary);
  flex: 0 0 auto;
}
.p5051-qa-ico svg{ width: 18px; height: 18px; }
.p5051-qa-label{
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.p5051-qa-btn:hover .p5051-qa-ico{
  animation: p5051-ico-pop .55s ease;
}
@keyframes p5051-ico-pop{
  0%{ transform: translateY(0) scale(1); }
  50%{ transform: translateY(-1px) scale(1.12); }
  100%{ transform: translateY(0) scale(1); }
}


/* Project 5051 – FIX: remove narrow article max-width inside content cards
   (The global article{max-width:80ch;} creates blank space in wide glass cards)
*/
#post-content article,
.page-content article,
.content-card article{
  max-width: none !important;
  width: 100% !important;
}

.p5051-table-scroll{overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.55);}
.p5051-table-scroll table{margin:0;}


@media (max-width: 991.98px){
  .navbar-toggler{display:inline-flex !important; align-items:center; justify-content:center;}
  .site-header{z-index: 999;}
}
@media (max-width: 576px){
  .breadcrumb-lite{font-size: 10.5px; line-height: 1.2;}
  article table{font-size:12px;}
  article th, article td{padding:6px; word-break:normal; overflow-wrap:anywhere;}
  /* keep first column labels readable (prevents letter-by-letter breaking like "Semester") */
  article table th:first-child,
  article table td:first-child{white-space:nowrap;}
  article table{table-layout:auto;}
}

/* === Footer v2: alignment + better typography (Project 5051) === */
.site-footer{
  padding-top: 38px;
  padding-bottom: 26px;
}

.site-footer .footer-grid,
.site-footer .footer-cols{
  display: grid !important;
  gap: 18px !important;
  /* Equal columns and auto-wrap */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  align-items: start !important;
}

.site-footer .footer-col,
.site-footer .footer-col-card{
  padding: 16px 16px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(120,120,255,.20);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  backdrop-filter: blur(10px);
}

.site-footer .footer-col-title,
.site-footer .footer-title{
  text-align: center;
  font-weight: 750;
  letter-spacing: .2px;
  margin: 2px 0 10px;
  font-size: 15px;
  color: rgba(20,24,40,.92);
  position: relative;
}

.site-footer .footer-col-title::after,
.site-footer .footer-title::after{
  content:"";
  display:block;
  width: 44px;
  height: 2px;
  margin: 8px auto 0;
  background: linear-gradient(90deg,#6a7cff,#35d3ff);
  border-radius: 2px;
  opacity: .9;
}

.site-footer .footer-col-content,
.site-footer .footer-html-content{
  text-align: center;
  font-size: 13px;
  color: rgba(20,24,40,.82);
  margin-bottom: 10px;
}

.site-footer .footer-links,
.site-footer ul{
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer .footer-links li,
.site-footer li{
  margin: 7px 0;
}

.site-footer a,
.site-footer .footer-link{
  display: inline-block;
  text-decoration: none;
  color: rgba(20,24,40,.80);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  transition: transform .22s ease, background-color .22s ease, color .22s ease, box-shadow .22s ease;
}

.site-footer a:hover,
.site-footer .footer-link:hover{
  background: rgba(106,124,255,.12);
  color: rgba(20,24,40,.95);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
}

.site-footer .footer-copy{
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: rgba(20,24,40,.65);
}

@media (max-width: 768px){
  .site-footer .footer-grid,
  .site-footer .footer-cols{
    grid-template-columns: 1fr !important;
  }
  .site-footer .footer-col,
  .site-footer .footer-col-card{
    padding: 14px 14px 12px;
  }
}


/* === Project 5051 Footer Boxes === */
.p5051-footer {
  padding-top: 70px;
  padding-bottom: 70px;
}
.p5051-footer .footer-shell {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(17,24,39,0.08);
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(16, 24, 40, 0.10);
  padding: 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (min-width: 768px){
  .p5051-footer .footer-shell{ padding: 32px; }
}

.p5051-footer .footer-col-card {
  position: relative;
  height: 100%;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(17,24,39,0.08);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: 0 10px 24px rgba(16,24,40,.06);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.p5051-footer .footer-col-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(16,24,40,.10);
}

/* Unique top accent per column */
.p5051-footer .row > div:nth-child(1) .footer-col-card::before,
.p5051-footer .row > div:nth-child(2) .footer-col-card::before,
.p5051-footer .row > div:nth-child(3) .footer-col-card::before,
.p5051-footer .row > div:nth-child(4) .footer-col-card::before {
  content:"";
  position:absolute;
  left:0; top:0; right:0;
  height: 5px;
  opacity: .95;
}
.p5051-footer .row > div:nth-child(1) .footer-col-card::before{ background: linear-gradient(90deg,#6a7cff,#35d3ff); }
.p5051-footer .row > div:nth-child(2) .footer-col-card::before{ background: linear-gradient(90deg,#35d3ff,#78ffd6); }
.p5051-footer .row > div:nth-child(3) .footer-col-card::before{ background: linear-gradient(90deg,#78ffd6,#ffb86b); }
.p5051-footer .row > div:nth-child(4) .footer-col-card::before{ background: linear-gradient(90deg,#ffb86b,#6a7cff); }

.p5051-footer .footer-col-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .2px;
  margin-bottom: 12px;
  background: linear-gradient(90deg,#6a7cff,#35d3ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: none;
}
@media (max-width: 640px){
  .p5051-footer .footer-col-title{ font-size: 17px; }
}

/* Make content-editor text bold (as requested) */
.p5051-footer .footer-col-content,
.p5051-footer .footer-col-content * {
  font-weight: 700;
  color: rgba(17,24,39,.88);
}

.p5051-footer .footer-link {
  font-weight: 700;
  text-decoration: none;
  color: rgba(17,24,39,.86);
}
.p5051-footer .footer-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.p5051-footer .footer-bottom {
  border-top: 1px dashed rgba(17,24,39,0.12);
  color: rgba(17,24,39,.70);
  font-weight: 800;
  font-size: 13px;
}


/* === PATCH: Table horizontal scroll wrapper (Project 5051) === */
.p5051-table-scroll{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

/* Ensure the table keeps its intrinsic width so scroll activates */
.p5051-table-scroll table,
table.p5051-table{
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

/* Prevent letter-by-letter breaking; prefer horizontal scroll */
.p5051-table-scroll th,
.p5051-table-scroll td,
table.p5051-table th,
table.p5051-table td{
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: nowrap;  /* key for scroll */
}

/* Mobile: reduce spacing first */
@media (max-width: 768px){
  .p5051-table-scroll th,
  .p5051-table-scroll td,
  table.p5051-table th,
  table.p5051-table td{
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.35;
  }
}

