/* =====================================================================
   Site-wide theme: header, footer, homepage.
   Same design language and tokens as web/css/lawyer-pages.css
   (advocate/judge/notary profile pages) — see that file for the
   original --lp-* tokens this extends.
   ===================================================================== */

:root {
    --lp-bg:            #f4f6f9;
    --lp-surface:       #ffffff;
    --lp-border:        #e3e8ef;
    --lp-text:          #1f2937;
    --lp-text-muted:    #6b7280;
    --lp-primary:       #1e5eff;
    --lp-primary-dark:  #1746c8;
    --lp-primary-soft:  #eef3ff;
    --lp-accent:        #0f172a;
    --lp-radius:        14px;
    --lp-shadow:        0 10px 30px rgba(15, 23, 42, .06);
    --lp-shadow-sm:     0 4px 14px rgba(15, 23, 42, .05);
    --lp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--lp-font);
    overflow-x: hidden;
    max-width: 100vw;
}

.lph-bar, .lph-bar *, .lph-bar *::before, .lph-bar *::after,
.lph-mobile-bar, .lph-mobile-bar *, .lph-mobile-bar *::before, .lph-mobile-bar *::after,
.lph-mobile-panel, .lph-mobile-panel *, .lph-mobile-panel *::before, .lph-mobile-panel *::after,
.lpf, .lpf *, .lpf *::before, .lpf *::after,
.lp-home-hero, .lp-home-hero *, .lp-home-hero *::before, .lp-home-hero *::after,
.lp-home-content, .lp-home-content *, .lp-home-content *::before, .lp-home-content *::after {
    box-sizing: border-box;
}

/* ---------- Header ---------- */

.lph-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 32px;
    background: var(--lp-surface);
    border-bottom: 1px solid var(--lp-border);
}

.lph-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -.01em;
    color: var(--lp-accent);
    flex-shrink: 0;
    text-decoration: none !important;
}

.lph-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lph-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.lph-nav a {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--lp-text);
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.lph-nav a:hover {
    background: var(--lp-primary-soft);
    color: var(--lp-primary);
}

.lph-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.lph-social {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 16px;
    border-right: 1px solid var(--lp-border);
}

.lph-social a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--lp-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lp-text-muted);
    transition: background .15s ease, color .15s ease;
}

.lph-social a:hover {
    background: var(--lp-primary-soft);
    color: var(--lp-primary);
}

.lph-auth {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.lph-login-btn {
    padding: 8px 18px;
    border-radius: 10px;
    background: var(--lp-primary);
    color: #fff !important;
    text-decoration: none !important;
}

.lph-login-btn:hover {
    background: var(--lp-primary-dark);
}

.lph-account {
    color: var(--lp-text);
    text-decoration: none;
}

.lph-logout {
    color: var(--lp-text-muted);
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

/* Mobile header */

.lph-mobile-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--lp-surface);
    border-bottom: 1px solid var(--lp-border);
}

.lph-mobile-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--lp-border);
    background: var(--lp-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lph-mobile-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--lp-text);
    border-radius: 2px;
    position: relative;
}

.lph-mobile-toggle span::before,
.lph-mobile-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background: var(--lp-text);
    border-radius: 2px;
}

.lph-mobile-toggle span::before { top: -5px; }
.lph-mobile-toggle span::after { top: 5px; }

.lph-mobile-panel {
    display: none;
    background: var(--lp-surface);
    border-bottom: 1px solid var(--lp-border);
    padding: 8px 18px 18px;
}

.lph-mobile-panel.is-open { display: block; }

.lph-mobile-panel a {
    display: block;
    padding: 12px 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--lp-text);
    text-decoration: none;
    border-bottom: 1px solid var(--lp-bg);
}

.lph-mobile-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.lph-mobile-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--lp-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lp-text-muted);
}

@media (max-width: 860px) {
    .lph-bar { display: none; }
    .lph-mobile-bar { display: flex; }
}

/* ---------- Breadcrumbs strip under header ---------- */

.lp-crumbs-strip {
    background: var(--lp-surface);
    border-bottom: 1px solid var(--lp-border);
    padding: 10px 32px;
}

.lp-crumbs-strip .breadcrumb.font-small {
    max-width: 1120px;
    margin: 0 auto;
}

.breadcrumb.font-small {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--lp-text-muted);
    padding: 0;
}

.breadcrumb.font-small a {
    color: var(--lp-text-muted);
    text-decoration: none;
    transition: color .15s ease;
}

.breadcrumb.font-small a:hover {
    color: var(--lp-primary);
    text-decoration: underline;
}

.breadcrumb.font-small span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c6ccd6;
    flex-shrink: 0;
}

/* ---------- Footer ---------- */

.lpf {
    background: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
    color: rgba(255, 255, 255, .72);
    padding: 48px 40px 0;
    margin-top: auto;
}

.lpf a {
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
}

.lpf a:hover {
    color: #fff;
}

.lpf-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    max-width: 1120px;
    margin: 0 auto;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.lpf-brand-col { display: flex; flex-direction: column; gap: 14px; }

.lpf-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 17px;
    color: #fff;
}

.lpf-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e5eff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lpf-desc { font-size: 13.5px; line-height: 1.6; max-width: 260px; margin: 0; }

.lpf-title {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
}

.lpf-links { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }

.lpf-sub-form { display: flex; gap: 8px; margin-top: 4px; }

.lpf-sub-form input {
    flex: 1 1 0%;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-size: 13.5px;
    font-family: var(--lp-font);
}

.lpf-sub-form input::placeholder { color: rgba(255, 255, 255, .4); }

.lpf-sub-btn {
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--lp-primary);
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
}

.lpf-sub-note { font-size: 12px; color: rgba(255, 255, 255, .4); margin: 10px 0 0; }

.lpf-bottom {
    max-width: 1120px;
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .4);
}

@media (max-width: 720px) {
    .lpf-grid { grid-template-columns: 1fr; }
    .lpf { padding: 40px 20px 0; }
}

/* ---------- Homepage ---------- */

.lpw {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px;
}

.lp-home-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #020617 0%, #0f172a 55%, #1e3a8a 100%);
    padding: 64px 0 80px;
    color: #fff;
}

.lp-home-hero::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -60px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.lp-home-hero::before {
    content: "";
    position: absolute;
    bottom: -140px;
    left: -60px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
}

.lp-home-hero .lpw { position: relative; z-index: 1; }

.lp-hh-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    padding: 5px 14px;
    margin-bottom: 20px;
}

.lp-hh-title {
    margin: 0 0 16px;
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.18;
    max-width: 680px;
    color: #fff;
}

.lp-hh-sub {
    margin: 0 0 32px;
    font-size: 16px;
    color: rgba(255, 255, 255, .78);
    max-width: 560px;
    line-height: 1.6;
}

.lp-hh-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.lp-hh-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none !important;
}

.lp-hh-btn.primary { background: #fff; color: var(--lp-primary); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.lp-hh-btn.primary:hover { background: #f1f5ff; color: var(--lp-primary-dark); }
.lp-hh-btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.lp-hh-btn.ghost:hover { background: rgba(255, 255, 255, .2); }

.lp-home-content { padding: 48px 0 64px; }
.lp-home-section { margin-bottom: 40px; }

.lp-hs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.lp-hs-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--lp-accent);
}

.lp-hs-title::before {
    content: "";
    display: block;
    width: 5px;
    height: 20px;
    border-radius: 3px;
    background: var(--lp-primary);
    flex-shrink: 0;
}

.lp-hs-more { font-size: 13.5px; font-weight: 600; color: var(--lp-primary); text-decoration: none; flex-shrink: 0; }
.lp-hs-more:hover { color: var(--lp-primary-dark); }

.lp-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.lp-article-card {
    background: var(--lp-surface);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow-sm);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform .12s ease, box-shadow .12s ease;
}

.lp-article-card:hover { transform: translateY(-2px); box-shadow: var(--lp-shadow); }

.lp-article-title { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.4; color: var(--lp-text); }
.lp-article-title a { color: inherit; text-decoration: none; }
.lp-article-title a:hover { color: var(--lp-primary); }
.lp-article-desc { margin: 0; font-size: 13.5px; color: var(--lp-text-muted); line-height: 1.6; }
.lp-article-meta { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--lp-text-muted); }

.lp-list-card {
    background: var(--lp-surface);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow-sm);
    overflow: hidden;
}

.lp-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--lp-border);
    font-size: 14px;
}

.lp-list-row:last-child { border-bottom: 0; }
.lp-list-row-title { font-weight: 600; color: var(--lp-text); min-width: 0; }
.lp-list-row-title a { color: inherit; text-decoration: none; }
.lp-list-row-title a:hover { color: var(--lp-primary); }
.lp-list-row-date { flex-shrink: 0; font-size: 12.5px; color: var(--lp-text-muted); white-space: nowrap; }

.lp-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.lp-promo {
    background: var(--lp-primary-soft);
    border: 1px solid #dbe6ff;
    border-radius: var(--lp-radius);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.lp-promo-text h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--lp-accent); }
.lp-promo-text p { margin: 0; font-size: 13.5px; color: #334155; max-width: 460px; line-height: 1.6; }

.lp-promo-btn {
    flex-shrink: 0;
    padding: 11px 22px;
    border-radius: 10px;
    background: var(--lp-primary);
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
}

.lp-promo-btn:hover { background: var(--lp-primary-dark); }

@media (max-width: 900px) {
    .lp-card-grid { grid-template-columns: minmax(0, 1fr); }
    .lp-two-col { grid-template-columns: minmax(0, 1fr); }
    .lp-hh-title { font-size: 28px; }
    .lpw { padding: 0 20px; }
    .lp-home-hero { padding: 44px 0 56px; }
}

/* ---------- Content + sidebar layout (journal, news) ---------- */

.lp-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
}

.lp-content-layout .lp-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 640px) {
    .lp-content-layout .lp-card-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .lp-content-layout { grid-template-columns: minmax(0, 1fr); }
}

.lp-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }

.lp-sidebar-card {
    background: var(--lp-surface);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow-sm);
    padding: 22px;
}

.lp-sidebar-title {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--lp-accent);
}

.lp-sidebar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

.lp-sidebar-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--lp-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.lp-sidebar-list a:hover { background: var(--lp-primary-soft); color: var(--lp-primary); }

.lp-sidebar-list .lp-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--lp-text-muted);
    background: var(--lp-bg);
    border-radius: 999px;
    padding: 2px 8px;
}

.lp-sidebar-card.lp-sub-card { background: var(--lp-primary-soft); border-color: #dbe6ff; }
.lp-sub-card .lp-sidebar-title { color: var(--lp-accent); }
.lp-sub-card p { margin: 0 0 14px; font-size: 13px; color: #334155; line-height: 1.6; }

.lp-sub-card .lpf-sub-form input {
    background: #fff;
    border-color: var(--lp-border);
    color: var(--lp-text);
}

.lp-sub-card .lpf-sub-form input::placeholder { color: var(--lp-text-muted); }

/* ---------- Article / rich text typography ---------- */

.lp-rich {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--lp-text);
}

.lp-rich > *:first-child { margin-top: 0; }
.lp-rich > *:last-child { margin-bottom: 0; }

.lp-rich p { margin: 0 0 18px; }

.lp-rich h2, .lp-rich h3, .lp-rich h4 {
    margin: 32px 0 14px;
    font-weight: 700;
    color: var(--lp-accent);
    letter-spacing: -.01em;
}

.lp-rich h2 { font-size: 21px; }
.lp-rich h3 { font-size: 18px; }
.lp-rich h4 { font-size: 16px; }

.lp-rich ul, .lp-rich ol { margin: 0 0 18px; padding-left: 22px; }
.lp-rich li { margin-bottom: 8px; }

.lp-rich a { color: var(--lp-primary); text-decoration: underline; text-underline-offset: 2px; }
.lp-rich a:hover { color: var(--lp-primary-dark); }

.lp-rich blockquote {
    margin: 0 0 18px;
    padding: 14px 20px;
    border-left: 3px solid var(--lp-primary);
    background: var(--lp-primary-soft);
    border-radius: 0 10px 10px 0;
    color: #334155;
}

.lp-rich img { max-width: 100%; height: auto; border-radius: 10px; }

.lp-rich table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; }
.lp-rich table th, .lp-rich table td { text-align: left; padding: 10px 12px; border: 1px solid var(--lp-border); }
.lp-rich table th { background: #fafbfd; }

/* ---------- Article meta row ---------- */

.lp-article-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, .75);
}

.lp-article-meta-row .lp-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
