/*
Theme Name: Gen Just Law
Theme URI: https://genjustlaw.com/
Author: Gen Just Law
Description: Custom editorial WordPress theme for Gen Just Law. Dynamic categories, six-post homepage grid, automatic author box, clickable X banner, and live X profile timeline.
Version: 1.1.1
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: gen-just-law
*/

:root{
  --gjl-black:#070707;
  --gjl-black-2:#111111;
  --gjl-white:#ffffff;
  --gjl-paper:#f7f7f5;
  --gjl-text:#111111;
  --gjl-muted:#6d6d6d;
  --gjl-yellow:#f7b500;
  --gjl-orange:#f05a12;
  --gjl-red:#d81e16;
  --gjl-border:#e5e5e2;
  --gjl-max:1500px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--gjl-paper);color:var(--gjl-text);font-family:Arial,Helvetica,sans-serif;line-height:1.55}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}
.gjl-wrap{width:min(calc(100% - 40px),var(--gjl-max));margin-inline:auto}

/* Utility */
.gjl-section-title{display:flex;align-items:center;gap:14px;margin:0 0 18px;font-family:Impact,"Arial Narrow",sans-serif;letter-spacing:.4px;text-transform:uppercase;font-size:1.45rem}
.gjl-section-title:after{content:"";width:48px;height:3px;background:var(--gjl-yellow)}
.gjl-btn{display:inline-flex;align-items:center;justify-content:center;border:2px solid var(--gjl-yellow);padding:11px 18px;font-weight:800;text-transform:uppercase;font-size:.82rem;background:#fff;cursor:pointer}
.gjl-btn:hover{background:var(--gjl-yellow)}
.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;overflow:hidden}

/* Top ticker */
.gjl-ticker{background:#030303;color:#fff;font-size:.9rem;border-bottom:1px solid #222}
.gjl-ticker-inner{min-height:42px;display:flex;align-items:center;gap:12px}
.gjl-live-label{background:var(--gjl-yellow);color:#000;font-weight:900;padding:5px 9px;text-transform:uppercase}
.gjl-ticker-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gjl-ticker-time{color:var(--gjl-yellow);margin-left:auto;white-space:nowrap}

/* Hero banner */
.gjl-hero{background:#000}
.gjl-hero-link{display:block;position:relative}
.gjl-hero img{display:block;width:100%;max-height:410px;object-fit:cover;object-position:center}
.gjl-x-hero{position:absolute;right:3.3%;bottom:6%;background:rgba(0,0,0,.92);border:2px solid var(--gjl-yellow);color:#fff;padding:10px 15px;font-weight:900;text-transform:uppercase;line-height:1.1}
.gjl-x-hero small{display:block;font-size:.8rem;font-weight:600;text-transform:none;margin-top:4px}

/* Navigation */
.gjl-nav{background:#fff;border-bottom:1px solid #ddd;box-shadow:0 2px 8px rgba(0,0,0,.05);position:relative;z-index:20}
.gjl-nav-inner{display:flex;align-items:stretch;min-height:56px}
.gjl-home{width:58px;background:var(--gjl-yellow);display:flex;align-items:center;justify-content:center;font-size:1.2rem;font-weight:900}
.gjl-menu{display:flex;align-items:center;gap:0;list-style:none;margin:0;padding:0;flex:1}
.gjl-menu > li{position:relative}
.gjl-menu > li > a{display:block;padding:18px 20px;font-size:.86rem;font-weight:900;text-transform:uppercase}
.gjl-menu > li:hover > a{color:var(--gjl-orange)}
.gjl-menu .sub-menu{display:none;position:absolute;top:100%;left:0;min-width:240px;background:#fff;list-style:none;padding:8px 0;margin:0;box-shadow:0 10px 24px rgba(0,0,0,.15);border-top:3px solid var(--gjl-yellow)}
.gjl-menu li:hover>.sub-menu{display:block}
.gjl-menu .sub-menu a{display:block;padding:9px 14px;font-size:.86rem;font-weight:700}
.gjl-menu .sub-menu a:hover{background:#faf3dc}
.gjl-search-toggle{width:58px;border:0;background:var(--gjl-yellow);font-size:1.2rem;cursor:pointer}
.gjl-mobile-toggle{display:none;border:0;background:#fff;padding:0 18px;font-size:1.4rem}

/* Main layout */
.gjl-main{padding:32px 0 45px}
.gjl-grid-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:34px;align-items:start}
.gjl-post-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.gjl-card{background:#fff;border:1px solid var(--gjl-border);display:flex;flex-direction:column;min-width:0;transition:transform .18s ease, box-shadow .18s ease}
.gjl-card:hover{transform:translateY(-2px);box-shadow:0 9px 25px rgba(0,0,0,.07)}
.gjl-card-thumb{aspect-ratio:16/9;background:#111;overflow:hidden}
.gjl-card-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .22s ease}
.gjl-card:hover .gjl-card-thumb img{transform:scale(1.025)}
.gjl-card-body{padding:15px 15px 12px;display:flex;flex-direction:column;flex:1}
.gjl-cat{display:inline-block;align-self:flex-start;background:var(--gjl-yellow);color:#000;font-weight:900;text-transform:uppercase;font-size:.68rem;padding:4px 7px;margin-top:-31px;margin-bottom:12px;position:relative;z-index:2}
.gjl-cat.orange{background:var(--gjl-orange)}
.gjl-card h2{font-family:Impact,"Arial Narrow",sans-serif;font-size:1.45rem;line-height:1.12;letter-spacing:.2px;margin:0 0 10px;font-weight:500}
.gjl-card-excerpt{font-size:.92rem;color:#303030;margin:0 0 14px}
.gjl-card-meta{margin-top:auto;padding-top:10px;border-top:1px solid #eee;display:flex;justify-content:space-between;gap:10px;color:#555;font-size:.76rem;text-transform:uppercase;font-weight:700}
.gjl-view-all{text-align:center;margin-top:24px}

/* Sidebar */
.gjl-sidebar{position:sticky;top:18px}
.gjl-widget{background:#fff;border:1px solid var(--gjl-border);padding:17px;margin-bottom:20px}
.gjl-widget h3{font-family:Impact,"Arial Narrow",sans-serif;margin:0 0 14px;text-transform:uppercase;font-size:1.25rem;letter-spacing:.3px}
.gjl-widget h3:after{content:"";display:inline-block;width:35px;height:3px;background:var(--gjl-yellow);vertical-align:middle;margin-left:12px}
.gjl-cat-list,.gjl-cat-list ul{list-style:none;margin:0;padding:0}
.gjl-cat-list li{border-bottom:1px solid #f0f0f0}
.gjl-cat-list li:last-child{border-bottom:0}
.gjl-cat-list a{display:flex;justify-content:space-between;gap:10px;padding:8px 0;font-weight:700;font-size:.88rem}
.gjl-cat-list ul{padding-left:15px;border-left:2px solid #f0f0f0}
.gjl-cat-scroll{max-height:540px;overflow:auto;padding-right:5px}
.gjl-x-widget{padding:0;overflow:hidden}
.gjl-x-widget-head{padding:14px 17px 0}
.gjl-x-fallback{padding:15px;font-size:.9rem}
.gjl-subscribe input{width:100%;padding:11px;border:1px solid #ddd;margin:5px 0 10px}
.gjl-subscribe button{width:100%;background:var(--gjl-yellow);border:0;padding:12px;font-weight:900;text-transform:uppercase}

/* Author */
.gjl-author{display:grid;grid-template-columns:116px minmax(0,1fr);gap:20px;border-top:1px solid #ddd;margin-top:35px;padding:28px 0 0}
.gjl-author-logo{width:110px;height:110px;border-radius:50%;border:3px solid var(--gjl-yellow);object-fit:cover;background:#000}
.gjl-author h3{font-family:Impact,"Arial Narrow",sans-serif;text-transform:uppercase;font-size:1.5rem;margin:0 0 1px;color:#111}
.gjl-author-role{font-size:.77rem;font-weight:900;text-transform:uppercase;margin-bottom:8px}
.gjl-author p{margin:0 0 9px;max-width:760px;font-size:.92rem}
.gjl-author-x{font-weight:800}
.gjl-author-x span{color:var(--gjl-orange)}

/* Single post */
.gjl-single-wrap{width:min(calc(100% - 40px),980px);margin-inline:auto}
.gjl-single{background:#fff;padding:32px clamp(20px,5vw,55px);margin:30px auto 45px;border:1px solid var(--gjl-border)}
.gjl-single .entry-title{font-family:Impact,"Arial Narrow",sans-serif;font-size:clamp(2.3rem,5vw,4.7rem);font-weight:500;line-height:1.02;margin:0 0 16px}
.gjl-single .entry-meta{color:#666;font-size:.88rem;margin-bottom:22px}
.gjl-single .entry-content{font-family:Georgia,"Times New Roman",serif;font-size:1.14rem;line-height:1.75}
.gjl-single .entry-content h2,.gjl-single .entry-content h3{font-family:Arial,Helvetica,sans-serif;line-height:1.2}
.gjl-single .entry-content img{margin:18px 0}
.gjl-single .entry-content a{color:#b8490b;text-decoration:underline}
.gjl-single .wp-block-quote{border-left:4px solid var(--gjl-yellow);padding-left:18px}
.gjl-featured{margin:0 0 25px}
.gjl-featured img{width:100%;height:auto}

/* Archives */
.gjl-archive-head{padding:34px 0 18px}
.gjl-archive-head h1{font-family:Impact,"Arial Narrow",sans-serif;font-size:clamp(2.2rem,4vw,4rem);text-transform:uppercase;margin:0}
.gjl-pagination{margin-top:28px}
.gjl-pagination .page-numbers{display:inline-block;padding:8px 12px;background:#fff;border:1px solid #ddd;margin-right:4px}
.gjl-pagination .current{background:var(--gjl-yellow);border-color:var(--gjl-yellow);font-weight:900}

/* Footer */
.gjl-footer{background:#090909;color:#fff;padding:34px 0 14px}
.gjl-footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1.2fr;gap:30px}
.gjl-footer-brand{font-family:Impact,"Arial Narrow",sans-serif;font-size:2rem}
.gjl-footer-brand .y{color:var(--gjl-yellow)} .gjl-footer-brand .o{color:var(--gjl-orange)}
.gjl-footer h4{margin:0 0 10px;text-transform:uppercase}
.gjl-footer ul{list-style:none;padding:0;margin:0}
.gjl-footer li{margin:5px 0;font-size:.85rem;color:#d9d9d9}
.gjl-footer-tagline{font-size:.8rem;text-transform:uppercase;margin-top:10px}
.gjl-copy{border-top:1px solid #222;margin-top:28px;padding-top:14px;font-size:.72rem;color:#aaa;display:flex;justify-content:space-between;gap:15px;align-items:center}

/* Search overlay */
.gjl-search-panel{display:none;background:#111;padding:14px}
.gjl-search-panel.active{display:block}
.gjl-search-panel form{display:flex;max-width:800px;margin:auto}
.gjl-search-panel input{flex:1;padding:12px;border:0}
.gjl-search-panel button{padding:0 18px;background:var(--gjl-yellow);border:0;font-weight:900}

/* Responsive */
@media(max-width:1100px){
  .gjl-grid-layout{grid-template-columns:1fr}
  .gjl-sidebar{position:static}
  .gjl-sidebar-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
  .gjl-widget{margin-bottom:0}
}
@media(max-width:820px){
  .gjl-wrap{width:min(calc(100% - 24px),var(--gjl-max))}
  .gjl-post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gjl-mobile-toggle{display:block}
  .gjl-menu{display:none;position:absolute;left:0;right:0;top:56px;background:#fff;flex-direction:column;align-items:stretch;border-top:1px solid #eee}
  .gjl-menu.open{display:flex}
  .gjl-menu>li>a{padding:12px 18px}
  .gjl-menu .sub-menu{position:static;box-shadow:none;border-top:0;padding-left:16px}
  .gjl-menu li:hover>.sub-menu{display:block}
  .gjl-home{width:50px}
  .gjl-search-toggle{width:50px}
  .gjl-x-hero{font-size:.75rem;padding:8px 10px}
  .gjl-footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:580px){
  .gjl-ticker-time{display:none}
  .gjl-hero img{min-height:210px;object-fit:cover}
  .gjl-x-hero{right:10px;bottom:8px}
  .gjl-post-grid{grid-template-columns:1fr}
  .gjl-sidebar-grid{grid-template-columns:1fr}
  .gjl-author{grid-template-columns:82px 1fr;gap:14px}
  .gjl-author-logo{width:80px;height:80px}
  .gjl-footer-grid{grid-template-columns:1fr}
  .gjl-single-wrap{width:min(calc(100% - 20px),980px)}
  .gjl-single{padding:22px 17px}
}


/* =========================================================
   LIVE COVERAGE / JETPACK SOCIAL NOTES
   ========================================================= */
.gjl-live-section{margin-top:38px;padding-top:8px}
.gjl-live-heading-row{display:flex;align-items:center;justify-content:space-between;gap:18px}
.gjl-live-title{margin-bottom:10px}
.gjl-live-title:after{background:var(--gjl-yellow)}
.gjl-live-dot{width:13px;height:13px;border-radius:50%;background:#ef2d1a;box-shadow:0 0 0 4px rgba(239,45,26,.12);flex:0 0 auto}
.gjl-live-all-top{font-size:.76rem;font-weight:900;text-transform:uppercase;white-space:nowrap}
.gjl-live-all-top:hover{color:var(--gjl-orange)}
.gjl-live-intro{display:flex;align-items:center;gap:10px;margin:0 0 12px;font-size:.84rem;color:#444}
.gjl-live-pill{display:inline-flex;align-items:center;justify-content:center;background:#ef2d1a;color:#fff;border-radius:999px;padding:4px 13px;font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.25px}
.gjl-live-timeline{position:relative;margin-left:6px;border-left:3px solid #1b1b1b}
.gjl-live-row{position:relative;display:grid;grid-template-columns:62px minmax(0,1fr) auto;gap:12px;align-items:center;background:#fff;border:1px solid var(--gjl-border);border-left:0;min-height:64px;padding:10px 14px 10px 24px}
.gjl-live-row + .gjl-live-row{border-top:0}
.gjl-live-node{position:absolute;left:-8px;width:13px;height:13px;border-radius:50%;background:#ef2d1a;border:2px solid #fff;box-shadow:0 0 0 1px #ef2d1a}
.gjl-live-clock{font-size:.92rem;font-weight:900;color:#111}
.gjl-live-copy{min-width:0;font-size:.91rem;line-height:1.35}
.gjl-live-copy>a{font-weight:700}
.gjl-live-copy>a:hover{text-decoration:underline}
.gjl-live-ago{display:block;color:#ef2d1a;font-size:.69rem;font-weight:800;margin-top:3px}
.gjl-live-view{color:#ef2d1a;font-size:.76rem;font-weight:900;white-space:nowrap}
.gjl-live-view:hover{text-decoration:underline}
.gjl-live-bottom{text-align:center;margin-top:16px}
.gjl-live-empty{background:#fff;border:1px solid var(--gjl-border);border-left:4px solid var(--gjl-yellow);padding:18px;font-size:.9rem}
.gjl-live-empty strong{display:block;margin-bottom:3px}
.gjl-live-archive-head .gjl-live-intro{margin-bottom:15px}
.gjl-live-archive-head p{max-width:720px;color:#555}
.gjl-live-archive{max-width:980px}
.gjl-live-dateblock{display:flex;flex-direction:column;gap:2px}
.gjl-live-dateblock>span{font-size:.68rem;text-transform:uppercase;color:#777;font-weight:800}
.gjl-note-head{margin-bottom:22px}
.gjl-note-title{font-size:clamp(2rem,4vw,3.7rem)!important}
.gjl-note-content{font-size:1.2rem!important}
.gjl-note-actions{margin-top:28px;padding-top:20px;border-top:1px solid #eee}

@media(max-width:700px){
  .gjl-live-heading-row{align-items:flex-start}
  .gjl-live-all-top{display:none}
  .gjl-live-row{grid-template-columns:48px minmax(0,1fr);padding:10px 10px 10px 18px}
  .gjl-live-view{grid-column:2;justify-self:start}
  .gjl-live-clock{font-size:.84rem}
  .gjl-live-copy{font-size:.86rem}
}


/* v1.1.1 — Strong Live Coverage treatment */
.gjl-live-section{
  margin-top:38px;
  padding:22px;
  background:#0a0a0a;
  border-top:5px solid var(--gjl-yellow);
  border-bottom:5px solid var(--gjl-orange);
  color:#fff;
}
.gjl-live-section .gjl-section-title{color:#fff}
.gjl-live-section .gjl-section-title:after{background:var(--gjl-yellow)}
.gjl-live-section .gjl-live-all-top{color:var(--gjl-yellow)}
.gjl-live-section .gjl-live-intro{color:#e8e8e8}
.gjl-live-section .gjl-live-pill{
  background:#ef2d1a;
  color:#fff;
  box-shadow:0 0 0 3px rgba(239,45,26,.16);
}
.gjl-live-section .gjl-live-timeline{
  border-left-color:var(--gjl-yellow);
}
.gjl-live-section .gjl-live-row{
  background:#fff;
  color:#111;
  border-color:#dedede;
}
.gjl-live-section .gjl-live-row:hover{
  background:#fff9e8;
}
.gjl-live-section .gjl-live-node{
  background:#ef2d1a;
  border-color:#0a0a0a;
}
.gjl-live-section .gjl-live-clock{
  color:#111;
}
.gjl-live-section .gjl-live-ago,
.gjl-live-section .gjl-live-view{
  color:#d92b18;
}
.gjl-live-section .gjl-live-bottom .gjl-btn{
  background:var(--gjl-yellow);
  border-color:var(--gjl-yellow);
  color:#000;
}
.gjl-live-section .gjl-live-bottom .gjl-btn:hover{
  background:#fff;
  border-color:#fff;
}
.gjl-live-section .gjl-live-empty{
  background:#fff;
  color:#111;
  border-left-color:var(--gjl-yellow);
}
@media(max-width:580px){
  .gjl-live-section{padding:18px 14px}
}
