/* Logo in the site header: scales-of-justice mark with "Advocate / Ashutosh Hans" */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--green); text-decoration: none; }
.brand:hover { color: var(--green); }
.brand-mark { width: 50px; height: 44px; flex-shrink: 0; color: var(--green); }
.brand:hover .brand-mark { color: var(--brass); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-role { font-family: var(--sans); font-size: .66rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--brass); margin-bottom: 3px; }
.brand .brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; color: var(--green); letter-spacing: -0.005em; }
.header-inner { min-height: 76px; }
@media (max-width: 420px) {
  .brand-mark { width: 40px; height: 36px; }
  .brand .brand-name { font-size: 1.15rem; }
}

/* ---------- Professional cards: no illustrations; line icons or real photos ---------- */
.problem-card.pro { display: flex; gap: 18px; align-items: flex-start; padding: 22px; background: var(--white); border: 1px solid var(--line); border-top: 2px solid var(--green); border-radius: 4px; box-shadow: none; }
.problem-card.pro:hover, .area-card.pro-area:hover { transform: none; box-shadow: 0 6px 18px rgba(20, 40, 34, .08); border-color: var(--line); border-top-color: var(--brass); }
.pro-icon { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--brass-light); color: var(--green); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: transparent; }
.pro-icon .icon { width: 22px; height: 22px; }
.problem-card.pro h3 { font-size: 1.12rem; margin: 2px 0 6px; }
.problem-card.pro p { margin: 0; font-size: .93rem; color: var(--slate); }
.pro-photo { flex: 0 0 112px; height: 92px; border-radius: 3px; overflow: hidden; background: var(--green-tint); }
.pro-photo img { width: 100%; height: 100%; object-fit: cover; }

.area-card.pro-area { padding: 0; overflow: hidden; text-align: left; align-items: stretch; background: var(--white); border: 1px solid var(--line); border-top: 2px solid var(--green); border-radius: 4px; }
.pro-area-photo { aspect-ratio: 16 / 9; overflow: hidden; background: var(--green-tint); }
.pro-area-photo img { width: 100%; height: 100%; object-fit: cover; }
.pro-area-body { padding: 24px; display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.pro-area-body h3 { font-size: 1.2rem; margin: 16px 0 8px; }
.pro-area-body p { color: var(--slate); font-size: .94rem; margin: 0 0 16px; flex: 1; }
.area-card.pro-area .area-link { margin-top: auto; }
.pro-has-photo .pro-area-body .pro-icon { display: none; }
.pro-has-photo .pro-area-body h3 { margin-top: 0; }
@media (max-width: 600px) { .pro-photo { flex-basis: 92px; height: 80px; } }

/* ---------- Engraved brass seals for icons (realistic metal finish) ---------- */
.pro-icon {
  width: 60px; height: 60px; border: 0; position: relative;
  color: #2a2213;
  background:
    radial-gradient(circle at 32% 26%, rgba(255,250,230,.9) 0, rgba(255,250,230,0) 38%),
    radial-gradient(circle at 50% 50%, #e2c27c 0%, #c9a45c 46%, #9c7a37 78%, #6f5424 100%);
  box-shadow:
    inset 0 0 0 3px rgba(111, 84, 36, .55),
    inset 0 0 0 5px rgba(255, 240, 200, .35),
    inset 0 -6px 10px rgba(80, 58, 20, .35),
    0 2px 3px rgba(20, 16, 6, .25),
    0 8px 18px rgba(20, 40, 34, .14);
}
.pro-icon::after { /* fine milled rim */
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  border: 1px dashed rgba(90, 66, 24, .35);
  pointer-events: none;
}
.pro-icon .icon {
  width: 26px; height: 26px; stroke-width: 1.9;
  filter: drop-shadow(0 1px 0 rgba(255, 244, 210, .7)) drop-shadow(0 -1px 0 rgba(70, 50, 15, .35));
}
.problem-card.pro:hover .pro-icon, .area-card.pro-area:hover .pro-icon { filter: brightness(1.06); }

/* ---------- Option 4: bold green panels (problems and practice areas) ---------- */
.panel-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 8px; overflow: hidden; }
.panel-tile {
  position: relative; isolation: isolate; min-height: 260px; padding: 30px; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(160deg, #2a4d42 0%, #1f3a32 55%, #142822 100%);
  scroll-margin-top: 100px; transition: background .25s ease;
}
.panel-tile:nth-child(2n) { background: linear-gradient(160deg, #355d50 0%, #24443a 60%, #18302a 100%); }
.panel-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 12px); }
.panel-tile .pro-icon { position: absolute; top: 28px; left: 30px; }
.panel-tile h3 { color: #fff; font-size: 1.3rem; margin: 70px 0 8px; }
.panel-tile p { margin: 0; color: rgba(255,255,255,.8); font-size: .94rem; }
.panel-link { margin-top: 16px; color: var(--brass-light); font-weight: 600; font-size: .9rem; text-decoration: none; align-self: flex-start; border-bottom: 1px solid rgba(201,164,92,.5); }
.panel-link:hover { color: #fff; border-bottom-color: #fff; }
.panel-tile:hover, .panel-tile:target { background: linear-gradient(160deg, #8a6a2c 0%, #6e5322 55%, #4e3a16 100%); }
.panel-tile:hover .panel-link, .panel-tile:target .panel-link { color: #fff; border-bottom-color: rgba(255,255,255,.7); }
/* With a real photo: photo fills the tile under a dark green wash */
.panel-tile.has-photo, .panel-tile.has-photo:nth-child(2n) {
  background: linear-gradient(180deg, rgba(20,40,34,.35) 0%, rgba(20,40,34,.82) 55%, rgba(14,28,24,.95) 100%), var(--photo) center / cover no-repeat;
}
.panel-tile.has-photo:hover { background: linear-gradient(180deg, rgba(110,83,34,.35) 0%, rgba(78,58,22,.85) 55%, rgba(60,44,16,.95) 100%), var(--photo) center / cover no-repeat; }
@media (max-width: 900px) { .panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .panel-grid { grid-template-columns: 1fr; } .panel-tile { min-height: 220px; } }
@media (prefers-reduced-motion: reduce) { .panel-tile { transition: none; } }

/* ---------- Whole tile clickable ---------- */
.panel-cover { color: inherit; text-decoration: none; }
.panel-cover::before { content: ""; position: absolute; inset: 0; z-index: 2; }
.panel-cover:focus-visible { outline: none; }
.panel-tile:has(.panel-cover:focus-visible) { outline: 3px solid var(--brass-light); outline-offset: -3px; }
.panel-tile { cursor: pointer; }
.panel-tile .panel-link { position: relative; z-index: 1; }

/* ---------- Topic page ---------- */
.topic-head { position: relative; background: radial-gradient(1000px 420px at 85% -20%, #2c5547 0%, #1f3a32 50%, #142822 100%); color: #fff; padding: clamp(40px, 6vw, 72px) 0 clamp(40px, 6vw, 64px); }
.topic-back { color: var(--brass-light); text-decoration: none; font-size: .9rem; font-weight: 500; display: table; margin-bottom: 24px; }
.topic-back:hover { color: #fff; }
.topic-seal { margin-bottom: 18px; }
.topic-head h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); max-width: 22ch; margin: 0 0 12px; }
.topic-summary { color: rgba(255,255,255,.82); font-size: 1.12rem; max-width: 60ch; margin: 0; }
.topic-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.topic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .topic-layout { grid-template-columns: 1fr; } }
.topic-prose { max-width: 70ch; }
.topic-prose h2 { margin-top: 1.6em; padding-top: .6em; border-top: 1px solid var(--line); }
.topic-prose h2:first-of-type { margin-top: .8em; }
.topic-prose ol { padding-left: 1.4em; }
.topic-note { font-family: var(--sans); font-size: .88rem; color: var(--slate); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 2em; }
.topic-aside { position: sticky; top: 100px; }
@media (max-width: 900px) { .topic-aside { position: static; } }
.contact-card { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--brass-light); border-radius: 6px; padding: 24px; box-shadow: 0 14px 34px rgba(20,40,34,.08); }
.contact-card-brand { display: flex; align-items: center; gap: 12px; color: var(--green); margin-bottom: 14px; }
.contact-card-brand .brand-mark { width: 46px; height: 40px; }
.contact-card-brand div { display: flex; flex-direction: column; line-height: 1.1; }
.contact-card-brand strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.contact-card p { color: var(--slate); font-size: .95rem; }
.btn-block { display: flex; justify-content: center; width: 100%; margin-top: 10px; }
.contact-card-link { display: block; margin-top: 14px; font-size: .9rem; text-align: center; }
.topic-more { background: #f3f1ea; }
.topic-more h2 { margin-bottom: 28px; }

/* ---------- Message button ---------- */
.btn-wa { display: inline-flex; align-items: center; gap: 8px; background: #1f7a4d; color: #fff; }
.btn-wa:hover { background: #17633e; color: #fff; }
.wa-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Floating quick-contact buttons ---------- */
.float-contact { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; flex-direction: column; gap: 10px; }
.float-btn { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.25); transition: transform .15s ease; }
.float-btn:hover { transform: scale(1.06); color: #fff; }
.float-btn svg { width: 26px; height: 26px; }
.float-wa { background: #1f7a4d; }
.float-call { background: var(--green); }
@media print { .float-contact, .contact-pop { display: none !important; } }

/* ---------- "Get in touch" pop-up ---------- */
.contact-pop { position: fixed; right: 18px; bottom: 150px; z-index: 45; width: min(360px, calc(100vw - 36px)); background: var(--white); border-radius: 8px; border-top: 4px solid var(--brass-light); box-shadow: 0 24px 60px rgba(10,20,17,.35); padding: 24px 22px 22px; opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease; }
.contact-pop.open { opacity: 1; transform: none; }
.contact-pop[hidden] { display: none; }
.contact-pop-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--slate); cursor: pointer; padding: 4px 8px; }
.contact-pop-close:hover { color: var(--ink); }
.contact-pop-brand { display: flex; align-items: center; gap: 12px; color: var(--green); }
.contact-pop-mark { width: 54px; height: 54px; border-radius: 50%; background: var(--green); color: var(--brass-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-pop-mark .pop-mark { width: 36px; height: 32px; }
.contact-pop-brand div { display: flex; flex-direction: column; line-height: 1.1; }
.contact-pop-brand strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.contact-pop-title { font-family: var(--serif); font-size: 1.35rem; margin: 16px 0 4px; color: var(--ink); }
.contact-pop-text { color: var(--slate); font-size: .93rem; margin: 0 0 16px; }
.contact-pop-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-pop-actions .btn { padding: .8em 1.1em; font-size: .9rem; }
@media (max-width: 560px) { .contact-pop { right: 12px; left: 12px; width: auto; bottom: 140px; } }
@media (prefers-reduced-motion: reduce) { .contact-pop, .float-btn { transition: none; } }

/* ---------- Layout fixes for laptop screens and zoomed browsers ---------- */
/* Topic page: put the contact card under the text earlier, so nothing is cut off on the right */
.topic-layout { grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 1180px) {
  .topic-layout { grid-template-columns: minmax(0, 1fr); }
  .topic-aside { position: static; max-width: 560px; }
  .topic-prose { max-width: 72ch; }
}
/* Header: switch to the menu button before the links run out of room */
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; box-shadow: 0 12px 24px rgba(20,40,34,.08); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--green); font-weight: 600; }
  .header-call span { display: inline; }
  .header-call { padding: 9px 14px; }
}
@media (max-width: 560px) { .header-call span { display: none; } .header-call { padding: 9px; } }
/* Never allow sideways scrolling */
html, body { overflow-x: hidden; }
.topic-prose, .topic-prose * { overflow-wrap: anywhere; }

/* ---------- Topic page: one centred reading column ---------- */
.topic-column { max-width: 780px; margin: 0 auto; }
.topic-head h1 { max-width: none; }
.topic-head .topic-summary { max-width: none; }
.topic-body-section { padding-top: clamp(36px, 5vw, 56px); }
.topic-prose { max-width: none; font-size: 1.08rem; line-height: 1.75; }
.topic-prose > p:first-child { font-size: 1.18rem; color: var(--ink); }
.topic-prose h2 { font-size: 1.45rem; margin: 2em 0 .7em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.topic-prose h2:first-of-type { margin-top: 1.4em; }
.topic-prose ul, .topic-prose ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.topic-prose li { margin-bottom: .55em; padding-left: .2em; }
.topic-prose ul li::marker { color: var(--brass); }
.topic-prose ol li::marker { color: var(--brass); font-weight: 600; }

.contact-band { margin: 48px 0 8px; padding: 26px 28px; border-radius: 8px; background: linear-gradient(160deg, #2a4d42 0%, #1f3a32 55%, #142822 100%); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; border-top: 3px solid var(--brass-light); }
.contact-band-brand { display: flex; align-items: center; gap: 16px; flex: 1 1 320px; }
.contact-band .contact-pop-mark { background: rgba(255,255,255,.06); border: 1px solid rgba(201,164,92,.6); }
.contact-band-brand div { display: flex; flex-direction: column; line-height: 1.2; }
.contact-band-brand strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; color: #fff; }
.contact-band .brand-role { color: var(--brass-light); }
.contact-band-text { color: rgba(255,255,255,.78); font-size: .93rem; margin-top: 6px; }
.contact-band-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.contact-band-actions .btn { padding: .85em 1.2em; font-size: .92rem; }
.topic-note { margin-top: 28px; }
.topic-aside { display: none; }

/* ---------- "What you can expect": six points, three per row ---------- */
.strength-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; }
.strength-grid h3 { font-size: 1.2rem; }
@media (max-width: 900px) { .strength-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .strength-grid { grid-template-columns: 1fr; } }

/* ---------- Document-style text: straight left and right edges ---------- */
.topic-prose p, .topic-prose li,
.article-body .prose p, .article-body .prose li {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}
.topic-prose, .article-body .prose { word-spacing: .01em; }
/* Bullets and numbers hang in the margin so all text shares one left edge */
.topic-prose ul, .topic-prose ol { padding-left: 1.35em; margin-left: 0; }
.topic-prose li { padding-left: .35em; }
.topic-prose h2 { text-align: left; }
.topic-head .topic-summary { text-wrap: pretty; }
/* On narrow phone screens justified text leaves gaps, so keep it left-aligned there */
@media (max-width: 600px) {
  .topic-prose p, .topic-prose li,
  .article-body .prose p, .article-body .prose li { text-align: left; hyphens: manual; }
}

/* ---------- Language switch (English / हिन्दी) ---------- */
.lang-switch { display: inline-flex; align-items: center; font-family: var(--sans); font-size: .88rem; font-weight: 600; line-height: 1; padding: 9px 13px; border: 1px solid var(--brass-light); border-radius: 999px; color: var(--green); text-decoration: none; white-space: nowrap; }
.lang-switch:hover { background: var(--green); border-color: var(--green); color: #fff; }
.lang-switch[lang="hi"] { font-family: 'Noto Sans Devanagari', var(--sans); }
@media (max-width: 420px) { .lang-switch { padding: 8px 10px; font-size: .82rem; } }

/* ---------- Hindi pages: Devanagari fonts, no letter-spacing (it breaks joined letters) ---------- */
html[lang="hi"] { --serif: 'Literata', 'Noto Serif Devanagari', Georgia, serif; --sans: 'Public Sans', 'Noto Sans Devanagari', system-ui, sans-serif; }
html[lang="hi"] body { font-family: var(--sans); }
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] .brand-name, html[lang="hi"] .footer-name { font-family: var(--serif); line-height: 1.35; }
html[lang="hi"] .brand-role, html[lang="hi"] .nameplate-role, html[lang="hi"] .hi-contact-city, html[lang="hi"] .courts-row p { letter-spacing: 0; text-transform: none; }
html[lang="hi"] .brand-role { font-size: .78rem; }
html[lang="hi"] .topic-prose, html[lang="hi"] .prose { line-height: 1.85; }
html[lang="hi"] .topic-prose p, html[lang="hi"] .topic-prose li { hyphens: manual; -webkit-hyphens: manual; }

/* ---------- Article: link to the same article in the other language ---------- */
.article-twin { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 8px 14px; border: 1px solid rgba(201,164,92,.7); border-radius: 999px; color: var(--brass-light, #c9a45c); font-family: 'Public Sans', 'Noto Sans Devanagari', sans-serif; font-weight: 600; font-size: .9rem; text-decoration: none; }
.article-twin:hover { background: rgba(201,164,92,.15); color: #fff; }
html[lang="hi"] .article-prose, html[lang="hi"] .article-standfirst { line-height: 1.85; }
html[lang="hi"] .article-prose p, html[lang="hi"] .article-prose li { hyphens: manual; -webkit-hyphens: manual; }
html[lang="hi"] .article-prose > p:first-child::first-letter { float: none; font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: inherit; font-weight: inherit; }
html[lang="hi"] .article-cat, html[lang="hi"] .article-toc h2, html[lang="hi"] .article-prose .key-points h2 { letter-spacing: 0; text-transform: none; font-size: .85rem; }
html[lang="hi"] .article-prose h2, html[lang="hi"] .article-top h1 { line-height: 1.35; }
[lang="hi"] .post-row h3, .post-row[lang="hi"] h3 { font-family: 'Literata', 'Noto Serif Devanagari', serif; line-height: 1.4; }

/* ---------- Hindi home: chambers and contact ---------- */
.hi-contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hi-contact-card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 8px; padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.hi-contact-city { font-size: .9rem; font-weight: 700; color: var(--brass); }
.hi-contact-card strong { font-size: 1.08rem; color: var(--ink); }
.hi-contact-card span { color: var(--slate); font-size: .95rem; }
.hi-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
@media (max-width: 900px) { .hi-contact-grid { grid-template-columns: 1fr; } }
