/*
 * Law Offices of Elaine Cheung
 * Conservative Modernization - Homepage
 *
 * Load this stylesheet AFTER the site's legacy stylesheets.
 */

:root {
    --law-green-950: #33410c;
    --law-green-900: #3d4b12;
    --law-green-800: #4f601c;
    --law-green-700: #697529;
    --law-green-100: #eef0e3;

    --law-gold: #9a7a3d;
    --law-cream: #f2eee2;
    --law-cream-deep: #e8e1d1;

    --law-ink: #252822;
    --law-muted: #65685e;
    --law-border: #ddd9ce;
    --law-white: #ffffff;

    --law-shadow: 0 18px 50px rgba(38, 50, 15, 0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.modern-law-site {
    margin: 0;
    background: #eceae4;
    color: var(--law-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

body.modern-law-site a {
    color: var(--law-green-700);
    text-decoration: none;
}

body.modern-law-site a:hover,
body.modern-law-site a:focus {
    color: var(--law-green-950);
    text-decoration: underline;
}

/* ---------------------------------------------------------
   Main Shell
   --------------------------------------------------------- */

body.modern-law-site #wrapper {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 24px;
    background: transparent;
}

body.modern-law-site #container {
    width: min(1120px, 100%);
    max-width: 1120px;
    margin: 0 auto;
    overflow: hidden;
    background: var(--law-white);
    border-top: 4px solid var(--law-green-800);
    box-shadow: var(--law-shadow);
}

/* ---------------------------------------------------------
   Existing Top/Header Area
   --------------------------------------------------------- */

body.modern-law-site #top,
body.modern-law-site .top,
body.modern-law-site .topbar,
body.modern-law-site .header-top {
    width: 100%;
    min-height: 92px;
    padding-left: 30px;
    padding-right: 30px;
    background: var(--law-green-950);
}

/* Keep legacy header images responsive. */
body.modern-law-site #top img,
body.modern-law-site .top img {
    max-width: 100%;
    height: auto;
}

/* ---------------------------------------------------------
   Existing Navigation
   --------------------------------------------------------- */

body.modern-law-site #myslidemenu {
    position: relative;
    z-index: 50;
    width: 100%;
    min-height: 48px;
    background: var(--law-green-700);
    border-top: 1px solid rgba(255,255,255,.18);
    border-bottom: 1px solid rgba(255,255,255,.18);
}

body.modern-law-site #myslidemenu > ul {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
    margin: 0;
    padding: 0 22px;
    list-style: none;
}

body.modern-law-site #myslidemenu > ul > li {
    position: relative;
    float: none;
    display: block;
    margin: 0;
    padding: 0;
}

body.modern-law-site #myslidemenu > ul > li > a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .02em;
    text-decoration: none;
    text-transform: uppercase;
    border: 0;
    background: transparent;
}

body.modern-law-site #myslidemenu > ul > li > a:hover,
body.modern-law-site #myslidemenu > ul > li.active > a {
    color: #fff;
    background: rgba(255,255,255,.10);
    text-decoration: none;
}

/* Keep legacy dropdowns readable. */
body.modern-law-site #myslidemenu ul li ul {
    background: var(--law-green-950);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

body.modern-law-site #myslidemenu ul li ul a {
    color: #fff;
}

/* ---------------------------------------------------------
   Hero / Existing Slideshow
   --------------------------------------------------------- */

body.modern-law-site #header.home-hero {
    position: relative;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    background: var(--law-green-950);
    border: 0;
}

body.modern-law-site #header.home-hero img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
}

/* Override fixed legacy slideshow widths where possible. */
body.modern-law-site #header.home-hero > div,
body.modern-law-site #header.home-hero .slideshow,
body.modern-law-site #header.home-hero .slider,
body.modern-law-site #header.home-hero .slides {
    max-width: 100%;
}

/* ---------------------------------------------------------
   Homepage Welcome / CTA
   --------------------------------------------------------- */

.home-welcome {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 42px;
    align-items: center;
    padding: 38px 46px;
    background: var(--law-cream);
    border-bottom: 1px solid var(--law-border);
}

.home-welcome-copy {
    max-width: 720px;
}

.eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--law-green-700);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.home-welcome h1,
body.modern-law-site #content h2,
body.modern-law-site #content h3,
.consultation-panel h3 {
    margin-top: 0;
    color: var(--law-green-950);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: -.015em;
}

.home-welcome h1 {
    margin-bottom: 12px;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.16;
}

.home-welcome p {
    max-width: 760px;
    margin: 0;
    color: #4c5047;
    font-size: 17px;
    line-height: 1.65;
}

.home-welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 210px;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

body.modern-law-site .button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .035em;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

body.modern-law-site .button:hover,
body.modern-law-site .button:focus {
    text-decoration: none;
}

body.modern-law-site .button-primary {
    color: #fff;
    background: var(--law-green-800);
    border-color: var(--law-green-800);
}

body.modern-law-site .button-primary:hover,
body.modern-law-site .button-primary:focus {
    color: #fff;
    background: var(--law-green-950);
    border-color: var(--law-green-950);
}

body.modern-law-site .button-secondary {
    color: var(--law-green-950);
    background: transparent;
    border-color: #a8ad9a;
}

body.modern-law-site .button-secondary:hover,
body.modern-law-site .button-secondary:focus {
    color: var(--law-green-950);
    background: #fff;
    border-color: var(--law-green-700);
}

/* ---------------------------------------------------------
   Main Content Grid
   --------------------------------------------------------- */

body.modern-law-site #main-content.home-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 48px;
    width: 100%;
    padding: 48px 46px 58px;
    background: #fff;
}

body.modern-law-site #sidebar,
body.modern-law-site #content {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}

body.modern-law-site #content {
    min-width: 0;
}

.content-heading {
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--law-border);
}

body.modern-law-site #content h2 {
    margin-bottom: 12px;
    font-size: clamp(31px, 3.3vw, 44px);
    line-height: 1.14;
}

body.modern-law-site #content h3 {
    margin: 32px 0 10px;
    font-size: 25px;
    line-height: 1.25;
}

body.modern-law-site #content p,
body.modern-law-site #content .style1 {
    margin: 0 0 21px;
    color: #42463e;
    font-size: 16px;
    line-height: 1.78;
}

body.modern-law-site #content .lead {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--law-muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    line-height: 1.55;
}

body.modern-law-site #content a {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* ---------------------------------------------------------
   Sidebar
   --------------------------------------------------------- */

body.modern-law-site #sidebar {
    align-self: start;
    padding: 24px 22px 26px;
    background: var(--law-cream);
    border-top: 3px solid var(--law-green-700);
}

body.modern-law-site #sidebar > ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.modern-law-site #sidebar h2,
body.modern-law-site #sidebar h3 {
    margin: 0 0 14px;
    color: var(--law-green-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.25;
}

body.modern-law-site #sidebar ul ul {
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

body.modern-law-site #sidebar ul ul li {
    margin: 0;
    padding: 9px 0;
    border-bottom: 1px solid #d8d2c4;
    line-height: 1.35;
}

body.modern-law-site #sidebar ul ul li:last-child {
    border-bottom: 0;
}

body.modern-law-site #sidebar li,
body.modern-law-site #sidebar p,
body.modern-law-site #sidebar address {
    color: #55594f;
    font-size: 13px;
    line-height: 1.65;
}

body.modern-law-site #sidebar a {
    color: #414a23;
    text-decoration: none;
}

body.modern-law-site #sidebar a:hover {
    color: var(--law-green-950);
    text-decoration: underline;
}

body.modern-law-site #sidebar img {
    max-width: 100%;
    height: auto;
}

/* ---------------------------------------------------------
   Content Components
   --------------------------------------------------------- */

.trust-statement {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
    margin: 32px 0 38px;
    padding: 23px 25px;
    background: var(--law-green-100);
    border-left: 4px solid var(--law-green-700);
}

.trust-statement strong {
    color: var(--law-green-950);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 400;
}

.trust-statement span {
    color: #51554c;
    font-size: 14px;
    line-height: 1.65;
}

.content-section + .content-section {
    margin-top: 8px;
}

.consultation-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 34px;
    align-items: center;
    margin: 42px 0 28px;
    padding: 28px 30px;
    color: #fff;
    background: var(--law-green-950);
    border-bottom: 3px solid var(--law-gold);
}

.consultation-panel .eyebrow {
    color: #d5c69e;
}

.consultation-panel h3 {
    margin: 0 0 8px !important;
    color: #fff !important;
    font-size: 26px !important;
}

.consultation-panel p {
    margin: 0 !important;
    color: rgba(255,255,255,.78) !important;
    font-size: 14px !important;
}

.consultation-panel-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 190px;
}

.consultation-panel .button-primary {
    color: var(--law-green-950);
    background: #fff;
    border-color: #fff;
}

.consultation-panel .button-primary:hover {
    color: var(--law-green-950);
    background: var(--law-cream);
}

.consultation-panel .text-link {
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
}

.consultation-panel .text-link:hover {
    text-decoration: underline !important;
}

body.modern-law-site #content .legal-advisal {
    margin-top: 26px;
    padding-top: 20px;
    color: #707268;
    font-size: 12px;
    line-height: 1.65;
    border-top: 1px solid var(--law-border);
}

/* ---------------------------------------------------------
   Footer - works as an override on most legacy footer markup
   --------------------------------------------------------- */

body.modern-law-site #footer,
body.modern-law-site .footer {
    width: 100%;
    padding: 30px 34px;
    color: rgba(255,255,255,.72);
    background: var(--law-green-950);
    border-top: 1px solid rgba(255,255,255,.12);
}

body.modern-law-site #footer a,
body.modern-law-site .footer a {
    color: #e3e6d6;
}

body.modern-law-site #footer p,
body.modern-law-site .footer p,
body.modern-law-site #footer li,
body.modern-law-site .footer li {
    color: rgba(255,255,255,.68);
    font-size: 12px;
    line-height: 1.65;
}

/* ---------------------------------------------------------
   Payment Widget
   --------------------------------------------------------- */

body.modern-law-site .cp-comments.right {
    right: 20px;
    bottom: 20px;
    z-index: 200;
}

body.modern-law-site .cp-comments .cp-comment {
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
}

body.modern-law-site .cp-comments .cp-text {
    font-family: Arial, Helvetica, sans-serif;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 900px) {
    body.modern-law-site #wrapper {
        padding: 12px;
    }

    .home-welcome {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 34px 30px;
    }

    .home-welcome-actions {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 0;
    }

    body.modern-law-site #main-content.home-layout {
        grid-template-columns: 1fr;
        gap: 34px;
        padding: 38px 30px 46px;
    }

    body.modern-law-site #content {
        order: 1;
    }

    body.modern-law-site #sidebar {
        order: 2;
    }

    .consultation-panel {
        grid-template-columns: 1fr;
    }

    .consultation-panel-actions {
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    body.modern-law-site #wrapper {
        padding: 0;
    }

    body.modern-law-site #container {
        width: 100%;
        border-top-width: 3px;
        box-shadow: none;
    }

    body.modern-law-site #myslidemenu > ul {
        display: block;
        padding: 0;
    }

    body.modern-law-site #myslidemenu > ul > li {
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,.10);
    }

    body.modern-law-site #myslidemenu > ul > li > a {
        min-height: 44px;
        padding: 0 20px;
    }

    .home-welcome {
        padding: 30px 22px;
    }

    .home-welcome h1 {
        font-size: 31px;
    }

    .home-welcome-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    body.modern-law-site #main-content.home-layout {
        padding: 32px 22px 40px;
    }

    body.modern-law-site #content h2 {
        font-size: 32px;
    }

    body.modern-law-site #content h3 {
        font-size: 23px;
    }

    .trust-statement {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .consultation-panel {
        padding: 25px 22px;
    }

    body.modern-law-site .cp-comments.right {
        right: 10px;
        bottom: 10px;
    }
}


/* =========================================================
   V2 — RETAIN LEGACY PALETTE + LOCK SHARED AREAS TO SITE WIDTH
   ========================================================= */

/*
 * The legacy styles assign fixed pixel widths to several nested
 * navigation/footer elements. These overrides make the shared areas
 * fill the modern #container — and ONLY the #container.
 */

body.modern-law-site #topnav,
body.modern-law-site #frame-footer {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Navigation: preserve the established medium olive */
body.modern-law-site #topnav {
    background: var(--law-green-700) !important;
    border: 0 !important;
}

body.modern-law-site #topnav #myslidemenu,
body.modern-law-site #topnav .jqueryslidemenu {
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: var(--law-green-700) !important;
}

/* Defeat fixed widths inherited from jqueryslidemenu.css */
body.modern-law-site #topnav #myslidemenu > ul,
body.modern-law-site #topnav #myslidemenu #top-level-nav {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: var(--law-green-700) !important;
}

/* Keep the navigation visually close to the original site. */
body.modern-law-site #topnav #myslidemenu > ul > li > a {
    min-height: 44px;
    color: #ffffff !important;
    background: transparent !important;
}

body.modern-law-site #topnav #myslidemenu > ul > li > a:hover,
body.modern-law-site #topnav #myslidemenu > ul > li.active > a {
    color: #ffffff !important;
    background: rgba(255,255,255,.09) !important;
}

/* Legacy dropdown green retained */
body.modern-law-site #topnav #myslidemenu ul li ul {
    background: var(--law-green-700) !important;
}

body.modern-law-site #topnav #myslidemenu ul li ul li,
body.modern-law-site #topnav #myslidemenu ul li ul a {
    background: var(--law-green-700) !important;
}

/* Header remains the established dark olive and exactly container width */
body.modern-law-site #top,
body.modern-law-site .top,
body.modern-law-site .topbar,
body.modern-law-site .header-top,
body.modern-law-site #header {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

/* Footer: force both wrapper and inner footer to the full site width */
body.modern-law-site #frame-footer {
    background: var(--law-green-950) !important;
}

body.modern-law-site #frame-footer #footer {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 30px 46px !important;
    box-sizing: border-box !important;
    overflow: hidden;
    background: var(--law-green-950) !important;
}

/*
 * Keep the existing footer's two-column content structure, but make its
 * old floated children size within the new full-width footer.
 */
body.modern-law-site #frame-footer #copyright {
    float: left !important;
    width: 45% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 28px 0 0 !important;
    box-sizing: border-box !important;
}

body.modern-law-site #frame-footer ul.social {
    float: right !important;
    width: 55% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    list-style: none !important;
}

body.modern-law-site #frame-footer ul.social li {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
}

body.modern-law-site #frame-footer #copyright p,
body.modern-law-site #frame-footer ul.social li {
    color: rgba(255,255,255,.70) !important;
    font-size: 11px !important;
    line-height: 1.65 !important;
}

body.modern-law-site #frame-footer a {
    color: #d7dfaf !important;
}

body.modern-law-site #frame-footer a:hover,
body.modern-law-site #frame-footer a:focus {
    color: #ffffff !important;
}

/* Prevent legacy <br> directly after the social <li> from adding odd height */
body.modern-law-site #frame-footer ul.social + br,
body.modern-law-site #frame-footer ul.social > br {
    display: none;
}

/* Tablet/mobile: site can shrink, but shared areas still match container */
@media (max-width: 900px) {
    body.modern-law-site #frame-footer #footer {
        padding: 28px 30px !important;
    }

    body.modern-law-site #frame-footer #copyright,
    body.modern-law-site #frame-footer ul.social {
        float: none !important;
        width: 100% !important;
        padding: 0 !important;
    }

    body.modern-law-site #frame-footer ul.social {
        margin-top: 20px !important;
    }
}

@media (max-width: 720px) {
    body.modern-law-site #frame-footer #footer {
        padding: 25px 22px !important;
    }

    body.modern-law-site #topnav #myslidemenu > ul {
        width: 100% !important;
    }
}


/* =========================================================
   V3 — PRESERVE ORIGINAL SITE SHELL
   Original palette + original 980px fixed desktop width
   ========================================================= */

:root {
    /* Sampled from the original Elaine Cheung site */
    --law-page-bg: #d3cfc6;
    --law-content-bg: #eae4d6;
    --law-dark-original: #373e15;
    --law-nav-original: #697529;
    --law-rule-original: #d8d1c2;
}

/* ---------------------------------------------------------
   Restore the original warm site background
   --------------------------------------------------------- */

html,
body.modern-law-site {
    background: var(--law-page-bg) !important;
}

body.modern-law-site {
    color: #2d3027;
}

/*
 * Preserve the legacy site's fixed desktop width.
 * It becomes fluid only when the viewport is narrower than 980px.
 */
body.modern-law-site #wrapper {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 20px 0 !important;
    background: var(--law-page-bg) !important;
}

body.modern-law-site #container {
    width: 980px !important;
    max-width: calc(100vw - 32px) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    background: var(--law-content-bg) !important;
    border-top: 2px solid var(--law-nav-original) !important;
    box-shadow: none !important;
}

/* ---------------------------------------------------------
   Header / top area — preserve original dark olive
   --------------------------------------------------------- */

body.modern-law-site #top,
body.modern-law-site .top,
body.modern-law-site .topbar,
body.modern-law-site .header-top {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: var(--law-dark-original) !important;
}

/* ---------------------------------------------------------
   Navigation — fixed to the full 980px site width
   --------------------------------------------------------- */

body.modern-law-site #topnav {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    line-height: normal !important;
    background: var(--law-nav-original) !important;
    border: 0 !important;
}

body.modern-law-site #topnav #myslidemenu,
body.modern-law-site #topnav .jqueryslidemenu {
    display: block !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--law-nav-original) !important;
    border: 0 !important;
}

body.modern-law-site #topnav #myslidemenu > ul,
body.modern-law-site #topnav #myslidemenu > ul#top-level-nav {
    display: flex !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    list-style: none !important;
    background: var(--law-nav-original) !important;
}

body.modern-law-site #topnav #myslidemenu > ul > li {
    float: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body.modern-law-site #topnav #myslidemenu > ul > li > a {
    display: flex !important;
    align-items: center !important;
    min-height: 42px !important;
    padding: 0 10px !important;
    color: #fff !important;
    background: transparent !important;
    border: 0 !important;
    white-space: nowrap !important;
}

body.modern-law-site #topnav #myslidemenu > ul > li > a:hover,
body.modern-law-site #topnav #myslidemenu > ul > li.active > a {
    color: #fff !important;
    background: rgba(255,255,255,.09) !important;
}

/*
 * Remove the legacy white strip between the navigation and slideshow.
 * Some old styles apply spacing/padding to #header and/or #topnav.
 */
body.modern-law-site #topnav + #header,
body.modern-law-site #header.home-hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: 0 !important;
}

/* ---------------------------------------------------------
   Hero — let the OLD slideshow control its own dimensions
   --------------------------------------------------------- */

body.modern-law-site #header.home-hero {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    background: var(--law-dark-original) !important;
    border: 0 !important;
}

/*
 * IMPORTANT:
 * Do not force width:100% on the legacy slideshow images.
 * The old slider script expects the image/wrapper dimensions it was built with.
 */
body.modern-law-site #header.home-hero img {
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Undo V1/V2 max-width interference on likely slider wrappers. */
body.modern-law-site #header.home-hero > div,
body.modern-law-site #header.home-hero .slideshow,
body.modern-law-site #header.home-hero .slider,
body.modern-law-site #header.home-hero .slides {
    max-width: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ---------------------------------------------------------
   Restore original cream content field
   --------------------------------------------------------- */

body.modern-law-site .home-welcome {
    background: var(--law-content-bg) !important;
    border-top: 1px solid #fff !important;
    border-bottom: 1px solid var(--law-rule-original) !important;
}

body.modern-law-site #main-content.home-layout {
    background: var(--law-content-bg) !important;
}

/* The modern content area should no longer read as a white card. */
body.modern-law-site #content {
    background: transparent !important;
}

/* Keep the sidebar subtly differentiated, but within the original palette. */
body.modern-law-site #sidebar {
    background: #eee9dc !important;
    border-top-color: var(--law-nav-original) !important;
}

/* Soften modern separators to match the legacy cream palette. */
body.modern-law-site .content-heading {
    border-bottom-color: #d8d1c2 !important;
}

body.modern-law-site .trust-statement {
    background: #e5e7d7 !important;
    border-left-color: var(--law-nav-original) !important;
}

body.modern-law-site #content .legal-advisal {
    border-top-color: #d8d1c2 !important;
}

/* Preserve original olive for the consultation callout. */
body.modern-law-site .consultation-panel {
    background: var(--law-dark-original) !important;
}

/* ---------------------------------------------------------
   Footer — full fixed site width, original dark olive
   --------------------------------------------------------- */

body.modern-law-site #frame-footer {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--law-dark-original) !important;
}

body.modern-law-site #frame-footer #footer {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 26px 24px !important;
    box-sizing: border-box !important;
    background: var(--law-dark-original) !important;
    border: 0 !important;
}

/* ---------------------------------------------------------
   Responsive behavior
   --------------------------------------------------------- */

@media (max-width: 1012px) {
    body.modern-law-site #wrapper {
        padding: 12px 0 !important;
    }

    body.modern-law-site #container {
        width: calc(100vw - 24px) !important;
        max-width: none !important;
    }

    /*
     * On narrower screens, the old slideshow may be wider than the container.
     * Scale ONLY at this breakpoint so desktop slider behavior is untouched.
     */
    body.modern-law-site #header.home-hero img {
        max-width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 760px) {
    body.modern-law-site #wrapper {
        padding: 0 !important;
    }

    body.modern-law-site #container {
        width: 100% !important;
        max-width: 100% !important;
        border-top-width: 0 !important;
    }

    body.modern-law-site #topnav #myslidemenu > ul,
    body.modern-law-site #topnav #myslidemenu > ul#top-level-nav {
        display: block !important;
        padding: 0 !important;
    }

    body.modern-law-site #topnav #myslidemenu > ul > li {
        width: 100% !important;
    }

    body.modern-law-site #topnav #myslidemenu > ul > li > a {
        padding: 0 20px !important;
    }
}


/* =========================================================
   V4 — INDEPENDENT HEADER / NAV / HERO
   Keeps the original Elaine Cheung palette and 980px shell
   while removing dependency on the legacy menu/slider scripts.
   ========================================================= */

/* ---------------------------------------------------------
   Modern header
   --------------------------------------------------------- */

body.modern-law-site .modern-site-header {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #373e15;
    border: 0;
}

body.modern-law-site .modern-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 92px;
    padding: 15px 24px;
}

body.modern-law-site .modern-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

body.modern-law-site .modern-brand:hover,
body.modern-law-site .modern-brand:focus {
    color: #fff;
    text-decoration: none;
}

body.modern-law-site .modern-brand-mark {
    display: block;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.24);
}

body.modern-law-site .modern-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

body.modern-law-site .modern-brand-copy strong {
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: .025em;
}

body.modern-law-site .modern-brand-copy span {
    color: #c6cba7;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

body.modern-law-site .modern-header-contact {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-items: end;
    column-gap: 12px;
    row-gap: 2px;
    text-align: right;
}

body.modern-law-site .modern-header-label {
    grid-column: 1 / -1;
    color: #d5d9c0;
    font-size: 10px;
    letter-spacing: .045em;
}

body.modern-law-site .modern-header-phone {
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 400;
    text-decoration: none;
}

body.modern-law-site .modern-header-phone:hover,
body.modern-law-site .modern-header-phone:focus {
    color: #fff;
    text-decoration: underline;
}

body.modern-law-site .modern-header-cta {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 11px;
    color: #fff;
    background: #697529;
    border: 1px solid rgba(255,255,255,.18);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .035em;
    text-decoration: none;
    text-transform: uppercase;
}

body.modern-law-site .modern-header-cta:hover,
body.modern-law-site .modern-header-cta:focus {
    color: #fff;
    background: #7a8734;
    text-decoration: none;
}

/* ---------------------------------------------------------
   Modern navigation
   --------------------------------------------------------- */

body.modern-law-site .modern-navigation {
    position: relative;
    z-index: 1000;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #697529;
    border-top: 1px solid rgba(255,255,255,.12);
    border-bottom: 1px solid rgba(255,255,255,.16);
}

body.modern-law-site .modern-nav-bar {
    width: 100%;
    margin: 0;
    padding: 0;
}

body.modern-law-site .modern-menu-toggle {
    display: none;
}

body.modern-law-site .modern-primary-menu,
body.modern-law-site .modern-primary-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.modern-law-site .modern-primary-menu {
    display: flex;
    align-items: stretch;
    width: 100%;
    padding: 0 12px;
    background: #697529;
}

body.modern-law-site .modern-primary-menu > li {
    position: relative;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

body.modern-law-site .modern-primary-menu > li > a,
body.modern-law-site .modern-nav-parent > a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 9px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: .01em;
    text-decoration: none;
    white-space: nowrap;
}

body.modern-law-site .modern-primary-menu > li > a:hover,
body.modern-law-site .modern-primary-menu > li > a:focus,
body.modern-law-site .modern-nav-parent > a:hover,
body.modern-law-site .modern-nav-parent > a:focus,
body.modern-law-site .modern-has-submenu:hover > .modern-nav-parent,
body.modern-law-site .modern-has-submenu:focus-within > .modern-nav-parent {
    background: rgba(255,255,255,.10);
    text-decoration: none;
}

body.modern-law-site .modern-nav-parent {
    display: flex;
    align-items: stretch;
}

body.modern-law-site .modern-nav-parent > a {
    padding-right: 3px;
}

body.modern-law-site .modern-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    padding: 0 6px 1px 3px;
    color: #fff;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 12px;
}

body.modern-law-site .modern-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1100;
    display: block;
    min-width: 220px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(7px);
    background: #505c20;
    border-top: 2px solid #b9b987;
    box-shadow: 0 12px 26px rgba(0,0,0,.18);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

body.modern-law-site .modern-submenu li {
    display: block;
    width: 100%;
}

body.modern-law-site .modern-submenu a {
    display: block;
    padding: 10px 15px;
    color: #fff;
    font-size: 11px;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
}

body.modern-law-site .modern-submenu a:hover,
body.modern-law-site .modern-submenu a:focus {
    color: #fff;
    background: rgba(255,255,255,.10);
    text-decoration: none;
}

body.modern-law-site .modern-has-submenu:hover > .modern-submenu,
body.modern-law-site .modern-has-submenu:focus-within > .modern-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---------------------------------------------------------
   Independent desktop hero slider
   --------------------------------------------------------- */

body.modern-law-site .modern-desktop-hero {
    display: block;
    width: 100%;
    height: 280px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #373e15;
}

body.modern-law-site .modern-slider {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #373e15;
}

body.modern-law-site .modern-slide {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity .65s ease;
}

body.modern-law-site .modern-slide.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
}

body.modern-law-site .modern-slide img {
    display: block;
    width: 980px !important;
    max-width: none !important;
    height: 280px !important;
    object-fit: cover;
    margin: 0 !important;
    padding: 0 !important;
}

body.modern-law-site .modern-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 50px;
    padding: 0 0 3px;
    transform: translateY(-50%);
    color: rgba(255,255,255,.88);
    background: rgba(55,62,21,.58);
    border: 1px solid rgba(255,255,255,.14);
    cursor: pointer;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    line-height: 1;
    opacity: 0;
    transition: opacity .18s ease, background .18s ease;
}

body.modern-law-site .modern-slider:hover .modern-slider-arrow,
body.modern-law-site .modern-slider:focus-within .modern-slider-arrow {
    opacity: 1;
}

body.modern-law-site .modern-slider-arrow:hover,
body.modern-law-site .modern-slider-arrow:focus {
    color: #fff;
    background: rgba(55,62,21,.85);
}

body.modern-law-site .modern-slider-prev {
    left: 14px;
}

body.modern-law-site .modern-slider-next {
    right: 14px;
}

body.modern-law-site .modern-slider-dots {
    position: absolute;
    right: 18px;
    bottom: 14px;
    z-index: 5;
    display: flex;
    gap: 7px;
}

body.modern-law-site .modern-slider-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 50%;
    background: rgba(55,62,21,.45);
    cursor: pointer;
}

body.modern-law-site .modern-slider-dots button.is-active {
    background: #fff;
}

/* ---------------------------------------------------------
   Desktop content refinements for the 980px shell
   --------------------------------------------------------- */

body.modern-law-site .home-welcome {
    padding: 34px 40px;
}

body.modern-law-site #main-content.home-layout {
    grid-template-columns: 235px minmax(0, 1fr);
    gap: 38px;
    padding: 42px 40px 52px;
}

body.modern-law-site #sidebar {
    padding: 22px 18px 24px;
}

body.modern-law-site #content h2 {
    font-size: 38px;
}

/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 1012px) and (min-width: 761px) {
    body.modern-law-site .modern-header-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    body.modern-law-site .modern-brand-copy strong {
        font-size: 14px;
    }

    body.modern-law-site .modern-primary-menu {
        padding: 0 7px;
    }

    body.modern-law-site .modern-primary-menu > li > a,
    body.modern-law-site .modern-nav-parent > a {
        padding-left: 6px;
        padding-right: 6px;
        font-size: 9px;
    }

    body.modern-law-site .modern-nav-parent > a {
        padding-right: 2px;
    }

    body.modern-law-site .modern-submenu-toggle {
        width: 19px;
        padding-left: 1px;
        padding-right: 4px;
    }

    body.modern-law-site .modern-desktop-hero,
    body.modern-law-site .modern-slider {
        height: auto;
        aspect-ratio: 980 / 280;
    }

    body.modern-law-site .modern-slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }
}

/* ---------------------------------------------------------
   Phone layout
   --------------------------------------------------------- */

@media (max-width: 760px) {

    html,
    body.modern-law-site {
        background: #eae4d6 !important;
    }

    body.modern-law-site .modern-site-header {
        border-bottom: 0;
    }

    body.modern-law-site .modern-header-inner {
        min-height: 0;
        padding: 14px 17px 13px;
    }

    body.modern-law-site .modern-brand {
        gap: 10px;
        max-width: calc(100% - 125px);
    }

    body.modern-law-site .modern-brand-mark {
        width: 46px;
        height: 46px;
    }

    body.modern-law-site .modern-brand-copy strong {
        font-size: 13px;
        line-height: 1.22;
    }

    body.modern-law-site .modern-brand-copy span {
        font-size: 8px;
    }

    body.modern-law-site .modern-header-contact {
        display: block;
        min-width: 110px;
    }

    body.modern-law-site .modern-header-label,
    body.modern-law-site .modern-header-cta {
        display: none;
    }

    body.modern-law-site .modern-header-phone {
        display: block;
        font-size: 14px;
        white-space: nowrap;
    }

    /* Hamburger bar */
    body.modern-law-site .modern-navigation {
        border-top: 1px solid rgba(255,255,255,.12);
    }

    body.modern-law-site .modern-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        padding: 0 17px;
        color: #fff;
        background: #697529;
        border: 0;
        cursor: pointer;
    }

    body.modern-law-site .modern-menu-label {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .08em;
    }

    body.modern-law-site .modern-menu-icon {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 21px;
    }

    body.modern-law-site .modern-menu-icon span {
        display: block;
        width: 21px;
        height: 2px;
        background: #fff;
    }

    body.modern-law-site .modern-primary-menu {
        display: none;
        width: 100%;
        padding: 0;
        background: #505c20;
        border-top: 1px solid rgba(255,255,255,.10);
    }

    body.modern-law-site .modern-primary-menu.is-open {
        display: block;
    }

    body.modern-law-site .modern-primary-menu > li {
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,.09);
    }

    body.modern-law-site .modern-primary-menu > li > a,
    body.modern-law-site .modern-nav-parent > a {
        min-height: 46px;
        padding: 0 17px;
        font-size: 11px;
        white-space: normal;
    }

    body.modern-law-site .modern-nav-parent {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 50px;
        width: 100%;
    }

    body.modern-law-site .modern-nav-parent > a {
        padding-right: 8px;
    }

    body.modern-law-site .modern-submenu-toggle {
        width: 50px;
        min-height: 46px;
        border-left: 1px solid rgba(255,255,255,.10);
        font-size: 17px;
    }

    body.modern-law-site .modern-submenu {
        position: static;
        display: none;
        min-width: 0;
        width: 100%;
        padding: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: #424d19;
        border-top: 1px solid rgba(255,255,255,.08);
        box-shadow: none;
        transition: none;
    }

    body.modern-law-site .modern-has-submenu:hover > .modern-submenu,
    body.modern-law-site .modern-has-submenu:focus-within > .modern-submenu {
        display: none;
    }

    body.modern-law-site .modern-has-submenu.submenu-open > .modern-submenu,
    body.modern-law-site .modern-has-submenu.submenu-open:hover > .modern-submenu,
    body.modern-law-site .modern-has-submenu.submenu-open:focus-within > .modern-submenu {
        display: block;
    }

    body.modern-law-site .modern-submenu a {
        padding: 12px 25px;
        font-size: 11px;
        white-space: normal;
    }

    /* Phone: NO slider at all */
    body.modern-law-site .modern-desktop-hero {
        display: none !important;
    }

    /*
     * Turn the existing modern intro into the phone hero instead.
     * This keeps text large/readable and avoids shrinking the old
     * 980x280 art down to phone size.
     */
    body.modern-law-site .home-welcome.mobile-content-hero {
        display: block;
        padding: 31px 20px 28px;
        background: #373e15 !important;
        border: 0 !important;
    }

    body.modern-law-site .home-welcome.mobile-content-hero .eyebrow {
        margin-bottom: 10px;
        color: #cdd2aa;
        font-size: 10px;
    }

    body.modern-law-site .home-welcome.mobile-content-hero h1 {
        max-width: 520px;
        margin: 0 0 12px;
        color: #fff;
        font-size: 31px;
        line-height: 1.12;
    }

    body.modern-law-site .home-welcome.mobile-content-hero p {
        color: rgba(255,255,255,.78);
        font-size: 15px;
        line-height: 1.6;
    }

    body.modern-law-site .home-welcome.mobile-content-hero .home-welcome-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 9px;
        margin-top: 22px;
    }

    body.modern-law-site .home-welcome.mobile-content-hero .button-primary {
        color: #373e15;
        background: #f2eee2;
        border-color: #f2eee2;
    }

    body.modern-law-site .home-welcome.mobile-content-hero .button-secondary {
        color: #fff;
        border-color: rgba(255,255,255,.42);
    }

    body.modern-law-site #main-content.home-layout {
        display: flex;
        flex-direction: column;
        gap: 30px;
        padding: 30px 20px 38px;
    }

    body.modern-law-site #content {
        order: 1;
    }

    body.modern-law-site #sidebar {
        order: 2;
        width: 100% !important;
        padding: 21px 18px;
    }

    body.modern-law-site .content-heading {
        padding-bottom: 20px;
        margin-bottom: 23px;
    }

    body.modern-law-site #content h2 {
        font-size: 30px;
        line-height: 1.14;
    }

    body.modern-law-site #content .lead {
        font-size: 18px;
    }

    body.modern-law-site #content p,
    body.modern-law-site #content .style1 {
        font-size: 15px;
        line-height: 1.72;
    }

    body.modern-law-site .trust-statement {
        padding: 20px;
    }

    body.modern-law-site .consultation-panel {
        padding: 23px 19px;
    }

    /* The floating payment widget is too intrusive on a phone. */
    body.modern-law-site .cp-comments.right {
        display: none !important;
    }
}


/* =========================================================
   V5 — PAYMENT CTA + CONSULTATION BUTTON REFINEMENTS
   ========================================================= */

/* Sidebar payment button */
body.modern-law-site .sidebar-payment {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #d8d1c2;
}

body.modern-law-site .sidebar-payment-button {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 54px;
    padding: 11px 10px;
    color: #fff !important;
    background: #697529;
    border: 1px solid #697529;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: .035em;
    text-align: center;
    text-decoration: none !important;
}

body.modern-law-site .sidebar-payment-button span {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: none;
}

body.modern-law-site .sidebar-payment-button:hover,
body.modern-law-site .sidebar-payment-button:focus {
    color: #fff !important;
    background: #505c20;
    border-color: #505c20;
    text-decoration: none !important;
}

/* Lower consultation panel: one clear CTA */
body.modern-law-site .consultation-panel-actions {
    min-width: 190px;
}

body.modern-law-site .consultation-contact-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 46px;
    padding: 11px 18px;
    color: #fff !important;
    background: #697529;
    border: 1px solid #7f8b39;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .035em;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: background .18s ease, border-color .18s ease;
}

body.modern-law-site .consultation-contact-button:hover,
body.modern-law-site .consultation-contact-button:focus {
    color: #fff !important;
    background: #7a8734;
    border-color: #909c48;
    text-decoration: none !important;
}

@media (max-width: 760px) {
    body.modern-law-site .sidebar-payment {
        margin-top: 20px;
    }

    body.modern-law-site .consultation-panel-actions {
        width: 100%;
        min-width: 0;
    }

    body.modern-law-site .consultation-contact-button {
        width: 100%;
    }
}
