/* MyLawyers Home Page - compact professional layout */
/* Keeps same structure: advisory top, listing left, filters/sidebar right */

.ml-lawpage,
.ml-lawpage * {
    box-sizing: border-box;
}

.ml-lawpage {
    --ml-page-text: #334155;
    --ml-page-muted: #64748b;
    --ml-page-dark: #1e293b;
    --ml-page-border: #e2e8f0;
    --ml-page-soft: #f8fafc;
    --ml-page-pink: #f06292;
    --ml-page-pink-dark: #e91e63;
    --ml-page-hero-bg: #575756;

    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow-x: hidden;
    background: #ffffff;
    color: var(--ml-page-text);
    font-family: inherit;
    padding: 0 0 34px;
}

.ml-main,
.ml-listing,
.ml-lawyers,
.ml-firms,
.ml-card,
.ml-firm-card,
.ml-sidebar {
    min-width: 0;
    max-width: 100%;
}

.ml-lawpage,
.ml-lawpage * {
    font-family: inherit;
}

/* Force icon fonts */
.ml-lawpage .feather-menu,
.ml-lawpage .feather-x,
.ml-lawpage [class^="feather-"],
.ml-lawpage [class*=" feather-"] {
    font-family: feather !important;
}

.ml-lawpage [class^="jvic-"],
.ml-lawpage [class*=" jvic-"] {
    font-family: jv-icons !important;
}

.ml-lawpage .ml-inner {
    width: min(1500px, calc(100% - 72px));
    max-width: min(1500px, calc(100% - 72px));
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Top AI advisory area */
.ml-lawpage .ml-advisory {
    width: 100vw;
    min-height: clamp(340px, 32vw, 510px);
    margin: 0 calc(50% - 50vw) 32px;
    padding: clamp(58px, 8vw, 112px) max(24px, calc((100vw - 1180px) / 2));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--ml-page-hero-bg);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
}

.ml-lawpage .ml-advisory h1 {
    margin: 0 0 42px;
    color: #ffffff !important;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
}

.ml-lawpage .ml-ask {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(980px, 100%);
    min-height: 64px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.ml-lawpage .ml-ask button {
    flex: 0 0 auto;
    min-width: 166px;
    height: 64px;
    padding: 0 28px;
    border: 0;
    background: var(--ml-page-pink);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ml-lawpage .ml-ask button:hover,
.ml-lawpage .ml-ask button:focus {
    background: var(--ml-page-pink-dark);
}

.ml-lawpage .ml-ask input {
    flex: 1 1 auto;
    width: 100%;
    height: 64px;
    padding: 0 24px;
    border: 0;
    outline: 0;
    color: var(--ml-page-dark);
    font-size: 15px;
    font-weight: 500;
    background: #ffffff;
}

.ml-lawpage .ml-ask input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Main layout */
.ml-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 16px;
    align-items: start;
}

.ml-listing {
    min-width: 0;
}

.ml-listing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 14px;
}

.ml-title {
    margin: 0;
    color: white !important;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

/* Lawyer cards */
.ml-lawyers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ml-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 132px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--ml-page-border);
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.055);
    transition: all 0.2s ease;
}

.ml-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
}

.ml-photo {
    width: 92px;
    height: 104px;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
    color: var(--ml-page-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
}

.ml-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ml-info {
    min-width: 0;
}

.ml-info h3 {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ml-page-dark);
}

.ml-info h3 a {
    color: inherit;
    text-decoration: none;
}

.ml-info h3 a:hover,
.ml-info h3 a:focus {
    color: var(--ml-page-pink-dark);
}

.ml-info p {
    margin: 0 0 5px;
    color: var(--ml-page-muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

.ml-info p:nth-of-type(2) {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

.ml-meta {
    margin-top: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

/* Firm cards */
.ml-firms-section {
    margin-top: 34px;
}

.ml-firms-header {
    margin-bottom: 16px;
}

.ml-firms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ml-firm-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    min-height: 176px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--ml-page-border);
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.055);
    transition: all 0.2s ease;
}

.ml-firm-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
}

.ml-firm-photo {
    width: 112px;
    min-height: 148px;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
    color: var(--ml-page-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
}

.ml-firm-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ml-firm-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ml-firm-info h3 {
    margin: 0 0 5px;
    color: var(--ml-page-dark);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.ml-firm-info h3 a {
    color: inherit;
    text-decoration: none;
}

.ml-firm-info h3 a:hover,
.ml-firm-info h3 a:focus {
    color: var(--ml-page-pink-dark);
}

.ml-firm-service {
    margin: 0 0 6px;
    color: var(--ml-page-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.ml-firm-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 10px;
    color: var(--ml-page-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}

.ml-firm-meta {
    display: grid;
    gap: 5px;
    margin-top: auto;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.ml-firm-status {
    color: #15803d;
}

.ml-firm-status.is-closed {
    color: #b45309;
}

.ml-firm-link {
    align-self: flex-start;
    margin-top: 10px;
    color: var(--ml-page-pink-dark);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.ml-firm-link:hover,
.ml-firm-link:focus {
    color: var(--ml-page-dark);
}

/* Sidebar */
.ml-sidebar {
    position: sticky;
    top: 90px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--ml-page-border);
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.055);
}

.ml-sidebar h2 {
    margin: 0 0 10px;
    color: var(--ml-page-dark);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.ml-sidebar h2:not(:first-of-type) {
    margin-top: 18px;
}

.ml-sidebar .ml-sidebar-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.ml-sidebar .ml-sidebar-list-item {
    margin: 0 0 7px;
    padding: 0;
    list-style: none !important;
}

.ml-sidebar .ml-sidebar-list-item::before,
.ml-sidebar .ml-sidebar-list-item::after {
    display: none !important;
    content: none !important;
}

.ml-sidebar .ml-sidebar-list-item,
.ml-sidebar .ml-sidebar-list-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    width: 100%;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
}

.ml-sidebar .ml-sidebar-list-item a {
    padding: 0;
    background: transparent;
    border: 0;
}

.ml-sidebar .ml-sidebar-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f06292;
    font-size: 15px;
    line-height: 1;
    border-radius: 8px;
    background: rgba(240, 98, 146, 0.08);
}

.ml-sidebar .ml-sidebar-label {
    flex: 1 1 auto;
    min-width: 0;
}

.ml-sidebar .ml-sidebar-list-item:hover,
.ml-sidebar .ml-sidebar-list-item:focus-within {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.ml-sidebar .ml-sidebar-list-item:hover .ml-sidebar-icon,
.ml-sidebar .ml-sidebar-list-item:focus-within .ml-sidebar-icon {
    color: #e91e63;
    background: rgba(240, 98, 146, 0.12);
}

.ml-sidebar-week {
    margin-top: 22px;
}

.ml-sidebar-week h2 {
    margin: 0 0 12px;
}

.ml-sidebar-week-card {
    display: block;
    overflow: hidden;
    border: 1px solid #f1d972;
    border-radius: 10px;
    background: #fff3bd;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ml-sidebar-week-card:hover,
.ml-sidebar-week-card:focus {
    transform: translateY(-2px);
    border-color: #eacb50;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.ml-sidebar-week-card img {
    display: block;
    width: 100%;
    height: auto;
}

/* Sidebar drawer controls */
.ml-sidebar-toggle,
.ml-sidebar-close,
.ml-sidebar-backdrop {
    display: none;
}

.ml-empty {
    margin: 0;
    padding: 18px;
    color: var(--ml-page-muted);
    background: var(--ml-page-soft);
    border: 1px solid var(--ml-page-border);
    border-radius: 14px;
    font-size: 14px;
    text-align: center;
}

/* Tablet */
@media (max-width: 1200px) {
    .ml-main {
        grid-template-columns: 1fr;
    }

    .ml-sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 38px;
        border: 1px solid var(--ml-page-border);
        border-radius: 10px;
        background: #ffffff;
        cursor: pointer;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    }

    .ml-burger-lines {
        display: grid;
        gap: 4px;
        width: 20px;
    }

    .ml-burger-lines span {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--ml-page-dark);
        border-radius: 999px;
    }

    .ml-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1002;
        width: min(320px, 86vw);
        max-width: 86vw;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        border-radius: 0;
        box-sizing: border-box;
        transform: translateX(100%);
        transition: transform 0.22s ease;
    }

    .ml-lawpage:not(.is-sidebar-open) .ml-sidebar {
        visibility: hidden;
        pointer-events: none;
    }

    .ml-lawpage.is-sidebar-open .ml-sidebar {
        visibility: visible;
        pointer-events: auto;
    }

    .ml-lawpage.is-sidebar-open .ml-sidebar {
        transform: translateX(0);
    }

    .ml-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        margin: 0 0 14px auto;
        border: 1px solid var(--ml-page-border);
        border-radius: 9px;
        background: #ffffff;
        color: var(--ml-page-dark);
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .ml-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1001;
        display: block;
        background: rgba(15, 23, 42, 0.35);
        border: 0;
    }

    .ml-sidebar-backdrop[hidden] {
        display: none;
    }
}

/* Small laptop */
@media (max-width: 980px) {
    .ml-lawyers,
    .ml-firms {
        grid-template-columns: 1fr;
    }

    .ml-lawpage .ml-advisory {
        min-height: 360px;
        padding: 58px 20px;
    }

    .ml-lawpage .ml-advisory h1 {
        font-size: 32px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .ml-lawpage {
        width: 100vw;
        max-width: 100vw;
        margin-left: -50vw;
        margin-right: -50vw;
        overflow-x: hidden;
        padding-bottom: 26px;
    }

    .ml-lawpage .ml-inner {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        margin-left: auto;
        margin-right: auto;
    }

    .ml-lawpage .ml-advisory {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        min-height: 340px;
        padding: 52px 16px;
        margin-bottom: 24px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .ml-lawpage .ml-advisory h1 {
        margin-bottom: 28px;
        font-size: 28px;
    }

    .ml-lawpage .ml-ask {
        display: grid;
        grid-template-columns: 1fr;
        width: min(100%, 520px);
        border-radius: 14px;
    }

    .ml-lawpage .ml-ask button {
        width: 100%;
        height: 50px;
        order: 2;
    }

    .ml-lawpage .ml-ask input {
        height: 54px;
        order: 1;
        font-size: 13px;
    }

    .ml-title {
        font-size: 20px;
    }

    .ml-card {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 12px;
        min-height: 116px;
        padding: 12px;
        border-radius: 14px;
    }

    .ml-firm-card {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 12px;
        min-height: 116px;
        padding: 12px;
        border-radius: 14px;
    }

    .ml-photo {
        width: 78px;
        height: 90px;
        border-radius: 12px;
    }

    .ml-firm-photo {
        width: 78px;
        min-height: 90px;
        border-radius: 12px;
        font-size: 20px;
    }

    .ml-info h3,
    .ml-firm-info h3 {
        font-size: 15px;
    }

    .ml-info p,
    .ml-firm-service,
    .ml-firm-description {
        font-size: 12.5px;
    }

    .ml-meta,
    .ml-firm-meta,
    .ml-firm-link {
        font-size: 11.5px;
    }
}

@media (max-width: 420px) {
    .ml-card,
    .ml-firm-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ml-photo,
    .ml-firm-photo {
        margin: 0 auto;
    }

    .ml-firm-photo {
        height: 118px;
        width: min(100%, 180px);
    }

    .ml-firm-link {
        align-self: center;
    }

}

/* Fix Lawyers Listing heading */

.ml-listing-header {
    margin-bottom: 16px;
    justify-content: flex-start;
}

.ml-listing-header .ml-title,
.ml-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    background: transparent !important;
    color: #1e293b !important;
    box-shadow: none !important;
    border-radius: 0 !important;

    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

/* Optional small professional underline */
.ml-listing-header .ml-title::after,
.ml-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    margin-left: 12px;
    background: #f06292;
    border-radius: 999px;
}

/* Entrance Animations */
@keyframes ml-entrance {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ml-listing-header,
.ml-card,
.ml-firm-card,
.ml-sidebar-week,
.ml-sidebar-list-item {
    opacity: 0;
    animation: ml-entrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@media (min-width: 1201px) {
    .ml-sidebar {
        opacity: 0;
        animation: ml-entrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    }
}

/* Staggered Delays for Premium Feel */
.ml-listing-header { animation-delay: 0.2s; }
.ml-sidebar { animation-delay: 0.3s; }
.ml-sidebar-week { animation-delay: 0.85s; }

.ml-card:nth-child(1) { animation-delay: 0.25s; }
.ml-card:nth-child(2) { animation-delay: 0.35s; }
.ml-card:nth-child(3) { animation-delay: 0.45s; }
.ml-card:nth-child(4) { animation-delay: 0.55s; }
.ml-card:nth-child(5) { animation-delay: 0.65s; }
.ml-card:nth-child(6) { animation-delay: 0.75s; }

.ml-firm-card:nth-child(1) { animation-delay: 0.25s; }
.ml-firm-card:nth-child(2) { animation-delay: 0.35s; }
.ml-firm-card:nth-child(3) { animation-delay: 0.45s; }
.ml-firm-card:nth-child(4) { animation-delay: 0.55s; }
.ml-firm-card:nth-child(5) { animation-delay: 0.65s; }
.ml-firm-card:nth-child(6) { animation-delay: 0.75s; }

.ml-sidebar-list-item:nth-child(1) { animation-delay: 0.4s; }
.ml-sidebar-list-item:nth-child(2) { animation-delay: 0.45s; }
.ml-sidebar-list-item:nth-child(3) { animation-delay: 0.5s; }
.ml-sidebar-list-item:nth-child(4) { animation-delay: 0.55s; }
.ml-sidebar-list-item:nth-child(5) { animation-delay: 0.6s; }
.ml-sidebar-list-item:nth-child(6) { animation-delay: 0.65s; }
.ml-sidebar-list-item:nth-child(7) { animation-delay: 0.7s; }
.ml-sidebar-list-item:nth-child(8) { animation-delay: 0.75s; }

@media (min-width: 1201px) {
    .ml-lawpage .ml-inner {
        width: min(1500px, calc(100% - 72px)) !important;
        max-width: min(1500px, calc(100% - 72px)) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .ml-main {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) !important;
        gap: 16px !important;
    }
}
