/*
Theme Name: Legactly
Theme URI: https://example.com/
Author: Ehyperlink
Description: Midnight Counsel premium legal editorial WordPress theme with resilient legal categories, image-led discovery, contextual internal links, related reading and a unique Counsel Chamber footer.
Version: 1.1.1
Text Domain: legactly
Requires at least: 6.0
Requires PHP: 7.4
*/
:root{
 --lg-bg:#071017;--lg-paper:#0b151e;--lg-ink:#f4f1e9;--lg-muted:#93a0ab;
 --lg-gold:#e4b44f;--lg-gold2:#f4cf76;--lg-blue:#153d65;--lg-line:#203140;
 --lg-card:#0e1a24;--lg-card2:#101f2c;--lg-ext:#ff5aa5;--lg-shadow:0 18px 46px rgba(0,0,0,.28);
}
.lg-site,.lg-site *{box-sizing:border-box;min-width:0}
.lg-site{background:var(--lg-bg);color:var(--lg-ink);font-family:Arial,Helvetica,sans-serif;overflow-x:hidden}
.lg-site a{color:inherit;text-decoration:none}.lg-site img{display:block;max-width:100%;height:auto}
.lg-wrap{width:min(1620px,calc(100% - 46px));margin:auto}

/* HEADER */
.lg-header{position:sticky;top:0;z-index:999;background:rgba(7,16,23,.985);backdrop-filter:blur(12px);border-bottom:1px solid #1e2b36;box-shadow:0 7px 22px rgba(0,0,0,.30)}
.admin-bar .lg-header{top:32px}
.lg-head-top{min-height:82px;display:flex;align-items:center;justify-content:space-between;gap:24px;border-bottom:1px solid #1a2731}
.lg-logo{display:flex;align-items:center;gap:14px}
.lg-logo-mark{width:66px;height:66px;border-radius:18px;position:relative;background:linear-gradient(145deg,#17232d,#0d151d);border:1px solid rgba(228,180,79,.48);box-shadow:0 8px 18px rgba(0,0,0,.34)}
.lg-logo-mark:before{content:"⚖";position:absolute;inset:0;display:grid;place-items:center;font-size:34px;color:#e4b44f}
.lg-logo-text strong{display:block;font:700 31px/1 Georgia,"Times New Roman",serif;color:#fff}
.lg-logo-text strong span{color:#e4b44f}.lg-logo-text small{display:block;margin-top:6px;color:#8493a1;font-size:8px;letter-spacing:.14em;text-transform:uppercase}
.lg-head-tools{display:flex;align-items:center;gap:14px}
.lg-search{width:100%;max-width:360px;min-height:44px;display:grid;grid-template-columns:1fr 52px;border:1px solid #293845;border-radius:999px;overflow:hidden;background:#0e1820}
.lg-search input{border:0;outline:0;padding:0 15px;font-size:12px;background:transparent;color:#fff}
.lg-search input::placeholder{color:#748391}
.lg-search button{border:0;background:linear-gradient(135deg,#f1c460,#c58a2e);color:#0b1117;font-size:17px;font-weight:900}
.lg-mini{font-size:9px;font-weight:800;color:#aab7c0;white-space:nowrap}
.lg-head-nav{min-height:52px;display:flex;align-items:center;justify-content:center;background:#0b151e}
.lg-nav ul{list-style:none;margin:0;padding:0;display:flex;justify-content:center;gap:6px;flex-wrap:wrap}
.lg-nav a{display:flex;align-items:center;gap:6px;padding:9px 12px;border-radius:999px;font-size:10.5px;font-weight:800;color:#e9eef3}
.lg-nav a:hover{background:#142331;color:#e4b44f}
.lg-nav li:nth-child(1) a:before{content:"⚖"}.lg-nav li:nth-child(2) a:before{content:"🏛"}.lg-nav li:nth-child(3) a:before{content:"▦"}.lg-nav li:nth-child(4) a:before{content:"🔨"}.lg-nav li:nth-child(5) a:before{content:"▣"}.lg-nav li:nth-child(6) a:before{content:"♟"}.lg-nav li:nth-child(7) a:before{content:"♡"}.lg-nav li:nth-child(8) a:before{content:"⌂"}.lg-nav li:nth-child(9) a:before{content:"§"}
.lg-nav a:before{color:#c99b43}

/* HERO */
.lg-hero{position:relative;overflow:hidden;background:#070d12}
.lg-hero-bg{position:absolute;inset:0}.lg-hero-bg img{width:100%;height:100%;object-fit:cover}
.lg-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(5,12,17,.98) 0 44%,rgba(5,12,17,.60) 66%,rgba(5,12,17,.16) 100%)}
.lg-hero-grid{position:relative;z-index:2;display:grid;grid-template-columns:1.05fr .95fr;gap:40px;align-items:center;min-height:720px;padding:72px 0}
.lg-kicker{font-size:10px;font-weight:900;letter-spacing:.18em;text-transform:uppercase;color:#e4b44f}
.lg-hero h1{max-width:830px;font:700 clamp(4.2rem,6vw,6.9rem)/.9 Georgia,"Times New Roman",serif;letter-spacing:-.05em;margin:17px 0;color:#fff}
.lg-hero h1 span{color:#e4b44f}.lg-hero p{max-width:700px;font-size:17px;line-height:1.62;color:#c7d0d7}
.lg-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:25px}.lg-btn{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:0 24px;border-radius:999px;font-size:13px;font-weight:900}.lg-btn.primary{background:#e4b44f;color:#0a0f14}.lg-btn.secondary{background:#111d26;border:1px solid #50616f;color:#fff}
.lg-hero-list{justify-self:end;width:min(420px,100%);display:grid;gap:12px}
.lg-hero-list a{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 18px;border-radius:16px;background:rgba(9,18,25,.86);border:1px solid rgba(228,180,79,.16);box-shadow:0 12px 28px rgba(0,0,0,.20)}
.lg-hero-list a strong{font:700 1rem Georgia,serif}.lg-hero-list a span{color:#e4b44f;font-size:9px}

/* CONTENT */
.lg-light{background:#08121a;color:#fff}
.lg-section{padding:50px 0}
.lg-section-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;margin-bottom:18px}
.lg-section-head h2{font:700 2rem/1 Georgia,serif;margin:0}
.lg-section-head p{max-width:470px;margin:0;text-align:right;color:#8795a1;font-size:11px;line-height:1.5}

.lg-cat-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.lg-cat{position:relative;height:195px;border-radius:14px;overflow:hidden;border:1px solid #263846;background:#0e1a24;box-shadow:0 9px 22px rgba(0,0,0,.18);transition:.2s}
.lg-cat:hover{transform:translateY(-4px);box-shadow:0 18px 35px rgba(0,0,0,.28)}
.lg-cat img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.lg-cat:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(5,13,18,.04) 18%,rgba(5,13,18,.88) 100%)}
.lg-cat-copy{position:absolute;left:14px;right:14px;bottom:13px;z-index:2;color:#fff}
.lg-cat-copy small{font-size:8px;color:#e4b44f;font-weight:900}.lg-cat-copy strong{display:block;margin-top:4px;font:700 14px/1.12 Georgia,serif}.lg-cat-copy b{display:block;margin-top:5px;font-size:9px;color:#cfd7de}

.lg-main-grid{display:grid;grid-template-columns:1.35fr .65fr;gap:24px;align-items:start}
.lg-feature{display:grid;grid-template-columns:1.04fr .96fr;background:#0d1922;color:#fff;border-radius:16px;overflow:hidden;box-shadow:var(--lg-shadow);border:1px solid #243642}
.lg-feature-img{min-height:425px}.lg-feature-img img{width:100%;height:100%;object-fit:cover}.lg-feature-copy{padding:28px}
.lg-tag{display:inline-block;padding:7px 11px;border-radius:999px;background:#3d2b0f;color:#f2ca72;font-size:9px;font-weight:900}
.lg-feature h3{font:700 2rem/1.05 Georgia,serif;margin:12px 0}.lg-meta{font-size:10px;color:#98a7b3}.lg-feature p{font-size:13px;line-height:1.58;color:#c7d0d7}
.lg-trending{background:#0e1a24;border:1px solid #263846;border-radius:15px;padding:18px;box-shadow:0 10px 26px rgba(0,0,0,.18)}
.lg-trending h3{font:700 1.2rem Georgia,serif;margin:0 0 12px}
.lg-trend-item{display:grid;grid-template-columns:30px 72px 1fr;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #22323d}.lg-trend-item:last-child{border-bottom:0}
.lg-trend-num{font:700 1.1rem Georgia,serif;color:#e4b44f}.lg-trend-item img{width:72px;height:52px;object-fit:cover;border-radius:6px}.lg-trend-item h4{margin:0;font-size:12px;line-height:1.25}
.lg-latest-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
.lg-card{background:#0e1a24;border:1px solid #263846;border-radius:12px;overflow:hidden;box-shadow:0 8px 20px rgba(0,0,0,.18)}
.lg-card img{width:100%;height:170px;object-fit:cover}.lg-card-copy{padding:13px}.lg-card h3{font:700 1rem/1.15 Georgia,serif;margin:7px 0}.lg-card p{font-size:10px;line-height:1.45;color:#8f9ca7}

/* CATEGORY */
.lg-cat-hero{background:#0a141d;color:#fff;padding:54px 0;border-bottom:1px solid #21303b}
.lg-cat-hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:36px;align-items:center}
.lg-cat-hero h1{font:700 clamp(3.5rem,5.2vw,5.8rem)/.94 Georgia,serif;margin:12px 0}
.lg-cat-hero p{color:#bdc8d0;line-height:1.6}
.lg-cat-hero-img{justify-self:end;width:min(620px,100%);height:340px;border-radius:14px;overflow:hidden;border:1px solid rgba(255,255,255,.12)}
.lg-cat-hero-img img{width:100%;height:100%;object-fit:cover}
.lg-category-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.lg-category-card{background:#0e1a24;border:1px solid #263846;border-radius:13px;overflow:hidden}
.lg-category-card-img{height:230px;display:block}.lg-category-card-img img{width:100%;height:100%;object-fit:cover}
.lg-category-card-copy{padding:17px}.lg-category-card h3{font:700 1.17rem/1.15 Georgia,serif;margin:9px 0}.lg-category-card p{font-size:12px;color:#8f9ca7}.lg-read{color:#e4b44f!important;font-size:11px;font-weight:900}

/* SINGLE */
.lg-post-hero{padding:46px 0 28px;background:#0a141d;color:#fff;border-bottom:1px solid #22323d}
.lg-post-hero h1{max-width:1120px;font:700 clamp(2.9rem,4.8vw,5rem)/.97 Georgia,serif;margin:12px 0;letter-spacing:-.03em}
.lg-post-meta{font-size:11px;color:#8999a5}
.lg-post-wrap{width:min(1120px,calc(100% - 34px));margin:auto;padding:40px 0 62px}
.lg-article{background:#f7f7f5;color:#222;border:1px solid #dfe3e6;border-radius:18px;padding:40px;box-shadow:0 14px 34px rgba(0,0,0,.18);overflow:hidden}
.lg-featured img{width:100%;max-height:560px;object-fit:cover;border-radius:12px;margin-bottom:26px}
.lg-entry{font:16px/1.8 Arial,Helvetica,sans-serif;color:#2b2b2b}.lg-entry h2,.lg-entry h3{font-family:Georgia,"Times New Roman",serif;color:#121212}
.lg-entry img{border-radius:10px;margin:20px auto}.lg-entry a{color:#176b91;text-decoration:underline;text-underline-offset:3px}
.lg-entry a.lg-external,.lg-entry a[target="_blank"]{color:var(--lg-ext)!important}
.lg-entry p,.lg-entry li,.lg-entry a,.lg-entry span,.lg-entry strong{overflow-wrap:anywhere;white-space:normal}
.lg-context{margin:28px 0;padding:17px 18px;border-radius:12px;background:#fff8e7;border-left:4px solid #d39b32;box-shadow:0 6px 16px rgba(60,47,24,.05)}
.lg-context small{display:block;color:#9e6c12;font-size:9px;font-weight:900;text-transform:uppercase;margin-bottom:7px}
.lg-context a{display:flex;justify-content:space-between;gap:14px;color:#181818!important;text-decoration:none!important;font-weight:800}
.lg-disclaimer{margin-top:26px;padding:16px;border:1px solid #e3dac8;border-radius:12px;background:#fbf7ef;color:#716b61;font-size:11px}
.lg-related{margin-top:34px}.lg-related h2{color:#fff}.lg-related-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.lg-related-card{background:#0e1a24;border:1px solid #263846;border-radius:12px;overflow:hidden}.lg-related-card img{width:100%;height:150px;object-fit:cover}.lg-related-card div{padding:11px}.lg-related-card h3{margin:0;font:700 .95rem/1.15 Georgia,serif;color:#fff}

/* UNIQUE COUNSEL CHAMBER FOOTER */
.lg-footer-chamber{position:relative;overflow:hidden;background:#050b10;color:#eef2f5;border-top:1px solid rgba(228,180,79,.16)}
.lg-chamber-wrap{width:min(1620px,calc(100% - 46px));margin:auto;padding:46px 0 30px}
.lg-chamber-head{display:grid;grid-template-columns:1fr 1.2fr;gap:40px;align-items:end;padding-bottom:26px;border-bottom:1px solid rgba(255,255,255,.08)}
.lg-chamber-brand{display:flex;align-items:center;gap:15px}
.lg-chamber-seal{width:74px;height:74px;border-radius:50%;display:grid;place-items:center;background:#0d171f;border:1px solid rgba(228,180,79,.34);color:#e4b44f;font:700 28px Georgia,serif;box-shadow:0 14px 28px rgba(0,0,0,.25)}
.lg-chamber-brand strong{display:block;color:#fff;font:700 1.85rem Georgia,serif}.lg-chamber-brand small{display:block;margin-top:5px;color:#9c8b65;font-size:8px;letter-spacing:.13em}
.lg-chamber-quote{text-align:right}.lg-chamber-quote span{display:block;color:#b89d61;font-size:8px;letter-spacing:.13em;font-weight:900}.lg-chamber-quote h2{margin:8px 0 0;color:#fff;font:700 clamp(2.2rem,3.8vw,4.2rem)/.95 Georgia,serif;letter-spacing:-.035em}
.lg-chamber-grid{display:grid;grid-template-columns:1.1fr 1.1fr .8fr;gap:20px;padding-top:28px}
.lg-chamber-room{min-height:270px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:linear-gradient(145deg,#0b151c,#081016);padding:22px}
.lg-chamber-room h3{margin:0 0 14px;color:#fff;font-size:.95rem}
.lg-chamber-map{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}
.lg-chamber-map a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border-radius:12px;background:#0f1c26;border:1px solid rgba(255,255,255,.07);font-size:9px;color:#d6dde2}.lg-chamber-map a:after{content:"→";color:#e4b44f}
.lg-chamber-feature{position:relative;overflow:hidden}.lg-chamber-feature img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.45}.lg-chamber-feature:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(5,11,16,.20),rgba(5,11,16,.92))}
.lg-chamber-feature-copy{position:absolute;left:20px;right:20px;bottom:18px;z-index:2}.lg-chamber-feature-copy small{color:#e4b44f;font-size:8px;font-weight:900;letter-spacing:.12em}.lg-chamber-feature-copy strong{display:block;margin-top:6px;color:#fff;font:700 1.35rem/1.08 Georgia,serif}.lg-chamber-feature-copy a{display:inline-flex;margin-top:10px;color:#f4cf76;font-size:9px;font-weight:800}
.lg-chamber-utility{display:flex;flex-direction:column;justify-content:space-between}.lg-chamber-links{display:grid;gap:9px}.lg-chamber-links a{padding-bottom:9px;border-bottom:1px solid rgba(255,255,255,.07);font-size:9.5px;color:#c8d0d6}.lg-chamber-links a:hover{color:#e4b44f}.lg-chamber-note{margin-top:22px;padding:13px;border-radius:12px;background:#0d171f;border:1px solid rgba(228,180,79,.14);color:#7f8b94;font-size:8.5px;line-height:1.45}
.lg-chamber-bottom{width:min(1620px,calc(100% - 46px));margin:auto;min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-top:1px solid rgba(255,255,255,.07);color:#667580;font-size:8.5px}

@media(max-width:1280px){.lg-cat-grid{grid-template-columns:repeat(3,1fr)}.lg-latest-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1000px){.lg-chamber-head{grid-template-columns:1fr}.lg-chamber-quote{text-align:left}.lg-chamber-grid{grid-template-columns:1fr 1fr}.lg-chamber-utility{grid-column:1/-1}}
@media(max-width:920px){.admin-bar .lg-header{top:46px}.lg-head-top{padding:12px 0;min-height:auto}.lg-head-tools{width:100%}.lg-search{max-width:none}.lg-mini{display:none}.lg-nav ul{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap}.lg-hero-grid,.lg-main-grid,.lg-cat-hero-grid{grid-template-columns:1fr}.lg-hero-grid{min-height:auto;padding:52px 0}.lg-hero-list{justify-self:start}.lg-cat-grid,.lg-category-grid{grid-template-columns:repeat(2,1fr)}.lg-feature{grid-template-columns:1fr}.lg-latest-grid{grid-template-columns:repeat(2,1fr)}.lg-related-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.lg-chamber-grid{grid-template-columns:1fr}.lg-chamber-utility{grid-column:auto}.lg-chamber-bottom{display:block;padding:16px 0 20px}}
@media(max-width:620px){.lg-wrap,.lg-chamber-wrap,.lg-chamber-bottom{width:min(100% - 24px,1620px)}.lg-head-top{flex-direction:column;align-items:stretch}.lg-logo-text strong{font-size:22px}.lg-hero h1{font-size:3.25rem}.lg-cat-grid,.lg-category-grid,.lg-latest-grid,.lg-related-grid{grid-template-columns:1fr}.lg-article{padding:20px 15px}}


/* =========================================================
   v1.1 COUNSEL CHAMBER FOOTER OVERLAP FIX
   Flow-safe, responsive, no panel collision.
   ========================================================= */

.lg-footer-chamber,
.lg-chamber-wrap,
.lg-chamber-head,
.lg-chamber-grid,
.lg-chamber-room,
.lg-chamber-feature,
.lg-chamber-utility,
.lg-chamber-bottom{
  min-width:0!important;
}

.lg-footer-chamber{
  isolation:isolate!important;
}

.lg-chamber-wrap{
  position:relative!important;
  z-index:2!important;
}

.lg-chamber-head{
  align-items:start!important;
}

.lg-chamber-grid{
  align-items:stretch!important;
  grid-auto-rows:1fr!important;
}

.lg-chamber-room{
  position:relative!important;
  min-height:300px!important;
  height:auto!important;
  overflow:hidden!important;
}

.lg-chamber-map{
  align-content:start!important;
}

.lg-chamber-map a{
  min-height:44px!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}

/* featured image panel */
.lg-chamber-feature{
  min-height:300px!important;
  display:flex!important;
  align-items:flex-end!important;
}

.lg-chamber-feature img{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  z-index:0!important;
}

.lg-chamber-feature:after{
  z-index:1!important;
  pointer-events:none!important;
}

.lg-chamber-feature-copy{
  position:relative!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  z-index:2!important;
  width:100%!important;
  padding:24px 22px!important;
  margin:0!important;
}

.lg-chamber-feature-copy strong,
.lg-chamber-feature-copy small,
.lg-chamber-feature-copy a{
  max-width:100%!important;
  overflow-wrap:anywhere!important;
}

/* utility panel */
.lg-chamber-utility{
  min-height:300px!important;
  height:auto!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  gap:20px!important;
}

.lg-chamber-links{
  min-width:0!important;
}

.lg-chamber-links a{
  display:block!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}

.lg-chamber-note{
  position:relative!important;
  margin-top:auto!important;
  width:100%!important;
  overflow-wrap:anywhere!important;
}

/* make bottom rail independent */
.lg-chamber-bottom{
  position:relative!important;
  z-index:3!important;
  clear:both!important;
  min-height:64px!important;
  padding:14px 0!important;
}

/* Prevent old floated/absolute content from leaking */
.lg-footer-chamber *{
  float:none!important;
}

/* large tablet */
@media(max-width:1100px){
  .lg-chamber-grid{
    grid-template-columns:1fr 1fr!important;
    grid-auto-rows:auto!important;
  }

  .lg-chamber-utility{
    grid-column:1 / -1!important;
    min-height:auto!important;
  }
}

/* tablet */
@media(max-width:820px){
  .lg-chamber-head{
    grid-template-columns:1fr!important;
    gap:20px!important;
  }

  .lg-chamber-quote{
    text-align:left!important;
  }

  .lg-chamber-grid{
    grid-template-columns:1fr!important;
  }

  .lg-chamber-utility{
    grid-column:auto!important;
  }

  .lg-chamber-room,
  .lg-chamber-feature,
  .lg-chamber-utility{
    min-height:auto!important;
  }

  .lg-chamber-feature{
    aspect-ratio:16/9!important;
  }
}

/* mobile */
@media(max-width:620px){
  .lg-chamber-wrap,
  .lg-chamber-bottom{
    width:min(100% - 24px,1620px)!important;
  }

  .lg-chamber-grid{
    gap:14px!important;
  }

  .lg-chamber-room{
    padding:18px!important;
    border-radius:14px!important;
  }

  .lg-chamber-feature{
    min-height:240px!important;
    aspect-ratio:auto!important;
  }

  .lg-chamber-feature-copy{
    padding:18px!important;
  }

  .lg-chamber-map{
    grid-template-columns:1fr!important;
  }

  .lg-chamber-bottom{
    display:block!important;
  }

  .lg-chamber-bottom span{
    display:block!important;
    margin-top:5px!important;
  }
}
