:root {
    color-scheme: dark;
    --bg: #07140e;
    --surface: #0c2218;
    --surface-2: #123a27;
    --ink: #f3f1e9;
    --muted: #b7c1b8;
    --green: #54a879;
    --green-btn: #286744;
    --green-btn-hover: #347d54;
    --line: rgba(195, 216, 199, .18);
    --nav-ink: #d3dbd3;
    --caption-bg: rgba(7, 20, 14, .92);
    --lightbox-bg: rgba(7, 20, 14, .94);
    --error: #e9a3a3;
    --radius: 14px;
    --radius-lg: 24px;
    --serif: "Cinzel", Georgia, serif;
    --sans: "DM Sans", "Segoe UI", sans-serif;
    --colored: #fff;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #bfe0c9;
    --surface-2: #a6d1b4;
    --ink: #0e2216;
    --muted: #2c4a38;
    --green: #1f6f43;
    --green-btn: #2e8b57;
    --green-btn-hover: #267549;
    --line: rgba(20, 80, 48, .3);
    --nav-ink: #1f3d2b;
    --caption-bg: rgba(255, 255, 255, .94);
    --lightbox-bg: rgba(255, 255, 255, .96);
    --error: #b42318;
    --colored: #000;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.65 var(--sans);
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }
p { color: var(--muted); }
p + p { margin-top: .7rem; }
ul { margin: .6rem 0 0 1.2rem; color: var(--muted); }
li + li { margin-top: .25rem; }

.wrap { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.section { padding: 80px 0; border-top: 1px solid var(--line); }
.section.first { padding-top: 24px; border-top: 0; }
.section-heading { max-width: 780px; margin-bottom: 32px; }
.section-heading.center { margin-inline: auto; text-align: center; }
.section-heading h2 { margin-top: .4rem; }
.eyebrow { color: var(--green); font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.lead { margin-top: 1rem; font-size: 1.05rem; }
.lead-small { max-width: 760px; margin: .5rem auto 0; }
.center-text { text-align: center; }
.center { text-align: center; }
.muted { color: var(--muted); }
.accent { color: var(--green); font-weight: 600; }
.small-note { margin-top: 1.2rem; font-size: .8rem; }
.label { display: block; margin-bottom: 4px; color: var(--green); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* reveal (only hidden when JS is on) */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.active { opacity: 1; transform: none; }

/* shared surfaces */
.card, .panel, .notice {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.panel { border-radius: var(--radius-lg); padding: 2rem; }
.panel.center { display: flex; flex-direction: column; align-items: center; }
.panel p { max-width: 780px; }
.notice { background: var(--surface-2); color: var(--ink); font-size: .92rem; }
.notice p, .notice strong { color: var(--ink); }
.notice h3 { color: var(--ink); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 1.4rem; }
.center-row { display: flex; justify-content: center; margin-top: 2rem; }

/* buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 1.4rem;
    padding: 11px 24px;
    border: 1px solid var(--green);
    border-radius: var(--radius);
    background: var(--green-btn);
    color: var(--colored);
    font-weight: 700;
    text-align: center;
    transition: background .2s ease, transform .2s ease;
}
.button:hover { background: var(--green-btn-hover); transform: translateY(-2px); }
.center-row .button { margin-top: 0; }

/* ============ TOPBAR ============ */
#topbar-container { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
#topbar-div { width: min(1320px, calc(100% - 24px)); min-height: 72px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#topbar-name-container { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
#topbar-logo { width: 44px; height: 44px; border: 1px solid var(--green); border-radius: 50%; object-fit: cover; background: #fff; }
#topbar-name-label { display: block; line-height: 1.3; }
#topbar-name-label strong { display: block; font-family: var(--serif); font-size: .88rem; letter-spacing: .04em; }
#topbar-name-label small { display: block; color: var(--muted); font-size: .66rem; letter-spacing: .13em; }
#topbar-buttons-div { display: flex; align-items: center; gap: 4px; }
.topbar-buttons { padding: 8px 10px; border-radius: 10px; color: var(--nav-ink); font-size: .86rem; font-weight: 600; white-space: nowrap; transition: color .2s, background .2s; }
.topbar-buttons:hover { color: var(--green); }
.topbar-buttons.active-button { color: var(--green); background: var(--surface); }
#chat-on-whatsapp-button { display: flex; align-items: center; gap: 8px; min-height: 42px; margin-left: 6px; padding: 4px 12px; border-radius: var(--radius); background: #29A71A; color: #fff; font-size: .78rem; font-weight: 600; white-space: nowrap; }
#whatsapp-image { width: 26px; height: 26px; object-fit: cover; }
#booking-button { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--green); border-radius: var(--radius); background: var(--green-btn); color: #fff; font-size: .86rem; font-weight: 700; white-space: nowrap; transition: background .2s; }
#booking-button:hover { background: var(--green-btn-hover); }
#topbar-name-container { order: 0; }
#topbar-buttons-div { order: 1; margin-left: auto; }
#theme-toggle { order: 2; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 10px; background: transparent; font-size: 1.15rem; transition: border-color .2s, color .2s; }
#theme-toggle:hover { border-color: var(--green); color: var(--green); }
#menu-toggle { order: 3; display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; font-size: 1.3rem; }

@media (max-width: 1279px) {
    #menu-toggle { display: block; }
    #theme-toggle { margin-left: auto; }
    #topbar-buttons-div { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
    #topbar-buttons-div.open { display: flex; }
    .topbar-buttons { padding: 12px 10px; font-size: 1rem; }
    #chat-on-whatsapp-button { justify-content: center; margin: 8px 0 0; }
    #booking-button { justify-content: center; min-height: 46px; }
}

/* ============ HOME ============ */
#home-hero { display: grid; grid-template-columns: 1.1fr .75fr; align-items: center; gap: 72px; padding: 40px 0 24px; }
.hero-kicker { display: flex; align-items: center; gap: 12px; }
.hero-kicker::before { content: ""; width: 34px; height: 1px; background: var(--green); }
#home-name-label { max-width: 760px; margin: 18px 0; font-size: clamp(2.4rem, 5.2vw, 4.7rem); }
#home-lead { max-width: 680px; }
#home-lead strong { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0; }
.hero-actions .button { margin-top: 0; }
.button.secondary { border-color: var(--line); background: var(--surface); }
.button.secondary:hover { border-color: var(--green); background: var(--surface-2); }
.hero-notes { display: flex; flex-wrap: wrap; gap: 9px 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.hero-notes span::before { content: "\25C6"; margin-right: 8px; color: var(--green); font-size: .55rem; vertical-align: 2px; }
.portrait-frame { position: relative; width: 100%; max-width: 410px; margin: 0 auto; padding: 10px; border: 1px solid var(--green); border-radius: var(--radius-lg); background: var(--surface); }
.portrait-frame > img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; border-radius: 16px; }
.portrait-caption { position: absolute; right: 20px; bottom: 20px; left: 20px; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--caption-bg); }
.portrait-caption img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #fff; }
.portrait-caption small { display: block; color: var(--green); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; }
.portrait-caption strong { font-size: .83rem; color: var(--ink); }

#home-introduction-div { max-width: 820px; margin: 2.5rem auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
#home-introduction-div h2 { margin-bottom: 1rem; }
#ngsb-span { color: var(--green); }

#service-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.service-card { display: flex; flex-direction: column; align-items: flex-start; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; transition: border-color .2s, transform .2s; }
.service-card:hover { border-color: var(--green); transform: translateY(-3px); }
.service-card h3 { color: var(--green); }
.service-card p { font-size: .9rem; }

/* ============ ABOUT ============ */
#about .panel { margin-bottom: 14px; }
#our-principal-div { margin-bottom: 14px; padding: 2rem; border-radius: var(--radius-lg); }
#principal-image-container { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.2rem; }
#principal-image { width: 150px; height: 150px; flex-shrink: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: url("Shabbir.jpeg") 0 -3rem / cover no-repeat; }
#our-principal { font-size: clamp(1.5rem, 3vw, 2.3rem); }
#principal-name-label { margin-top: .5rem; font-family: var(--sans); font-size: 1.2rem; }
#smaller-advocate { color: var(--green); font-weight: 600; }

.slider-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
#slider { flex: 1; min-width: 0; overflow: hidden; border-radius: var(--radius); }
#slider-track { display: flex; transition: transform .5s ease; }
.slide { min-width: 100%; padding: 2rem 1.5rem; background: var(--surface-2); text-align: center; border-radius: var(--radius); }
.slide h3 { color: var(--green); font-size: 1.4rem; }
.slide p { max-width: 640px; margin-inline: auto; color: var(--ink); }
.arrow-buttons { width: 46px; height: 46px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); font-size: 1.6rem; line-height: 1; transition: border-color .2s, background .2s; }
.arrow-buttons:hover { border-color: var(--green); background: var(--green-btn); color: #fff; }

#our-core-values-div { margin: 3rem 0; }
.card h3 { color: var(--green); }

#our-team-div { margin-bottom: 3rem; }
#our-team-div h2 { margin-bottom: 1.4rem; }
.associate-name { margin-top: 2rem; color: var(--ink); }
#scrollable-team-div { display: flex; gap: 14px; margin: 1.5rem 0; padding-bottom: .75rem; overflow-x: auto; }
#scrollable-team-div:empty { display: none; }
.team-member-div { flex: 0 0 clamp(190px, 18vw, 240px); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding-bottom: .8rem; }
.team-member-image { width: 100%; aspect-ratio: 1; background-size: cover; background-repeat: no-repeat; background-position: center; }
.team-member-heading { margin: .7rem .8rem 0; font-family: var(--sans); font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-member-paragraph { margin: .2rem .8rem 0; font-size: .8rem; }

#practice-areas { margin-top: 4rem; scroll-margin-top: 90px; }
#practice-list { display: grid; gap: 12px; }
.practice { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); scroll-margin-top: 90px; }
.practice summary { position: relative; padding: 1.1rem 3rem 1.1rem 1.4rem; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; cursor: pointer; list-style: none; }
.practice summary::-webkit-details-marker { display: none; }
.practice summary::after { content: "+"; position: absolute; right: 1.4rem; color: var(--green); font-size: 1.4rem; }
.practice[open] summary::after { content: "\2212"; }
.practice[open] { border-color: var(--green); }
.practice-body { padding: 0 1.4rem 1.4rem; }
.practice-sub { margin: 1rem 0; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.practice-sub p { color: var(--ink); font-weight: 600; }
#require-legal-assistance-div { margin-top: 1.5rem; }

/* ============ LEGAL ARTICLES ============ */
#option-box-div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 1.6rem 0; }
.option-buttons { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .88rem; font-weight: 600; transition: all .2s ease; }
.option-buttons:hover { border-color: var(--green); }
.option-buttons.active-option-button { border-color: var(--green); background: var(--green-btn); color: #fff; }
#articles-div { display: grid; gap: 14px; }
.word-viewer { padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.word-viewer h1, .word-viewer h2, .word-viewer h3 { margin: 1rem 0 .5rem; font-size: 1.3rem; }
.word-viewer p { color: var(--ink); }
.word-viewer ul, .word-viewer ol { color: var(--ink); margin-left: 1.4rem; }
.word-viewer img { height: auto; border-radius: 10px; }
.word-viewer table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.word-viewer td, .word-viewer th { padding: 6px 10px; border: 1px solid var(--line); }
.empty-note { padding: 2rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* ============ STORIES + GALLERY ============ */
#success-stories-div { display: flex; gap: 14px; padding: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
#success-stories-div:empty { display: none; }
.story { flex: 0 0 clamp(220px, 28vw, 300px); aspect-ratio: 3 / 4; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); scroll-snap-align: center; transition: transform .3s ease; }
.story:hover { transform: scale(1.02); }
.story img, .gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; }

#image-div { columns: 3 280px; column-gap: 14px; }
.gallery-item { display: block; width: 100%; margin-bottom: 14px; padding: 0; overflow: hidden; break-inside: avoid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s; }
.gallery-item:hover { border-color: var(--green); }
.gallery-item.horizontal { aspect-ratio: 16 / 9; }
.gallery-item.vertical { aspect-ratio: 3 / 4; }
.gallery-item.anything { aspect-ratio: 1; }
.gallery-item.anything img { object-fit: contain; }

#lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--lightbox-bg); }
#lightbox[hidden] { display: none; }
#lightbox-img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: var(--radius); }
#lightbox-close { position: fixed; top: 16px; right: 16px; padding: 10px 18px; border: 1px solid var(--green); border-radius: var(--radius); background: var(--green-btn); color: #fff; font-weight: 700; }
body.modal-open { overflow: hidden; }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 20px; align-items: start; }
#information-div { display: grid; gap: 12px; }
#information-div .card { padding: 1.1rem 1.3rem; }
#information-div .card h3 { font-size: 1.4rem; color: var(--ink); }
#information-div a { color: var(--ink); overflow-wrap: anywhere; }
#information-div a:hover { color: var(--green); }
#request-appointment-div h3 { font-size: 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 1.2rem; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field span { color: var(--ink); font-size: .8rem; font-weight: 600; }
.field input, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); outline: none; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--green); }
#submit-button { width: 100%; }
#submit-button:disabled { opacity: .6; cursor: wait; }
#form-status { margin-top: 1rem; font-size: .9rem; }
#form-status.ok { color: var(--green); }
#form-status.error { color: var(--error); }
#form-status a { text-decoration: underline; color: var(--ink); }
#disclaimer-div { margin-top: 20px; }

/* ============ PRIVACY / FAQ ============ */
#privacy .grid-2 { margin-bottom: 14px; }
.faq-heading { margin-top: 4rem; }
.faq-list { max-width: 880px; margin: 0 auto 3rem; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 1.1rem 2.4rem 1.1rem 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; color: var(--green); font-size: 1.4rem; }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { padding: 0 2.4rem 1.1rem 0; }
#privacy .notice h3 { margin-bottom: .6rem; }

footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--green); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    #home-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
    .section { padding: 60px 0; }
    .grid-2, .contact-grid { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    #principal-image-container { flex-direction: column; text-align: center; }
    .panel, #our-principal-div { padding: 1.4rem 1rem; }
    .grid-3 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .slider-wrap { padding: 8px; gap: 6px; }
    .arrow-buttons { width: 38px; height: 38px; }
    .slide { padding: 1.4rem .8rem; }
    .button { width: 100%; }
    .hero-actions { flex-direction: column; }
    .hero-notes { display: grid; gap: 9px; }
    .center-row .button { width: auto; }
    .footer-row { flex-direction: column; align-items: flex-start; }
    .team-member-div:first-child { margin-left: auto; }
    .team-member-div:last-child { margin-right: auto; }
    #image-div { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}