﻿:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #1e293b;
  --primary-ink: #0f172a;
  --gold: #ea580c;
  --gold-ink: #fff;
  --surface: #fff7ed;
  --accent: #fed7aa;
  --border: #fed7aa;
  --success: #15803d;
  --warning: #c2410c;
  --danger: #b91c1c;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 4px 14px rgba(0, 0, 0, .1);
}

/* CSS reset and variables */
*,
*::before,
*::after {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  line-height: 1.6;
  color: #0f172a;
  background: #ffffff;
  background-image:
    linear-gradient(rgba(255, 255, 255, .88), rgba(255, 255, 255, .88)),
    url('../img/BackgroundGraphic.webp');
  background-image:
    linear-gradient(rgba(255, 255, 255, .88), rgba(255, 255, 255, .88)),
    image-set(url('../img/BackgroundGraphic.avif') type('image/avif'),
      url('../img/BackgroundGraphic.webp') type('image/webp'),
      url('../img/BackgroundGraphic.png') type('image/png'));
  background-size: 100% 100%, cover;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
  background-position: center top, center top;
  background-blend-mode: normal;
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll, scroll;
  }
}

img {
  max-width: 100%;
  display: block
}

a {
  color: #ea580c;
  text-decoration: none
}

a:hover {
  text-decoration: underline
}

ul {
  padding-left: 1.2rem
}

/* Layout */
.container {
  width: min(100%, 1200px);
  margin-inline: auto;
  padding: clamp(16px, 2.5vw, 28px)
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px)
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

@media (max-width:900px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr
  }
}

/* Header */
header.site-header {
  position: sticky;
  top: 0;
  background: linear-gradient(to bottom, rgba(230, 236, 246, .98) 0%, rgba(230, 236, 246, .78) 60%, rgba(230, 236, 246, .48) 100%);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .06) inset;
  z-index: 50
}

.site-header .container {
  padding: 8px clamp(16px, 2.5vw, 28px)
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px
}

.brand-logo {
  width: auto;
  height: 40px
}

.brand-logo-lg {
  height: 120px;
  width: auto
}

@media (max-width:800px) {
  .brand-logo-lg {
    height: 48px
  }
}

.brand-title {
  font-weight: 700;
  color: var(--text)
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.nav {
  display: flex;
  gap: 14px;
  align-items: center
}

.nav>a,
.nav .dropdown-wrapper>a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  white-space: nowrap;
}

.nav a.active,
.nav a:hover {
  background: var(--accent)
}

.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-wrapper>a {
  padding-right: 28px !important;
  /* Reduced space */
  position: relative;
  display: inline-block;
}

.dropdown-wrapper>a::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: solid var(--primary);
  border-width: 0 1.5px 1.5px 0;
  display: inline-block;
  padding: 3px;
  transform: translateY(-60%) rotate(45deg);
  transition: transform 0.2s ease;
}

.dropdown-wrapper:hover>a::after {
  transform: translateY(-30%) rotate(225deg);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  transform: none;
  background: #f8f9fa;
  min-width: 260px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  padding: 8px 0;
  z-index: 1000;
  flex-direction: column;
  margin-top: 0;
}

.dropdown-wrapper:hover .dropdown-content {
  display: flex;
}

.dropdown-content a {
  padding: 10px 16px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  border-radius: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  display: block;
  text-decoration: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background: #e2e8f0;
  color: var(--gold);
}

footer .dropdown-content {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 2px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px
}

@media (max-width:800px) {
  .nav {
    display: none
  }

  .menu-toggle {
    display: inline-flex
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 12px
  }

  .dropdown-content {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 20px;
    display: none;
  }

  .dropdown-wrapper:hover .dropdown-content {
    display: flex;
  }

  /* Or keep simple for mobile */
}

/* Hero */
.hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #ea580c, #c2410c)
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 6vw, 64px)
}

.hero h1 {
  color: #fff;
  line-height: 1.15;
  font-size: clamp(28px, 4.5vw, 46px);
  margin: 0 0 10px;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .45)
}

.hero p {
  color: #f0f5ff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .45)
}

.hero-chooser {
  display: block;
  width: min(100%, 800px);
  text-align: center;
  background: rgba(255, 255, 255, .75);
  color: var(--primary-ink);
  border-radius: 999px;
  padding: 14px 16px;
  margin: 10px auto 6px;
  box-shadow: var(--shadow)
}

.hero-chooser h2 {
  margin: 0 0 8px;
  color: var(--primary-ink);
  text-shadow: none
}

.hero-chooser .hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.hero-chooser .btn {
  background: var(--gold);
  color: var(--gold-ink);
  border-color: transparent;
  width: auto;
  min-width: 200px;
  padding: 8px 24px;
  font-size: clamp(14px, 2.8vw, 16px);
  white-space: normal;
  line-height: 1.2;
}

.hero-chooser .btn:hover {
  filter: brightness(.95)
}

@media (max-width:700px) {
  .hero-chooser {
    display: block;
    border-radius: 20px
  }
}

.section-media img.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.icon {
  width: 24px;
  height: 24px;
  vertical-align: -4px;
  margin-right: 8px
}

/* Alerts */
.notice {
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  background: linear-gradient(to bottom, rgba(255, 247, 237, .9), rgba(255, 237, 213, .9));
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-radius: 10px
}

/* Practice Areas layout tightening */
.practices-grid {
  gap: 12px
}

.practices-grid>section {
  margin-block: 8px
}

/* Inline hero for subpages */
.inline-hero {
  float: right;
  max-height: 175px;
  height: auto;
  width: auto;
  margin: 4px 0 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow)
}

.inline-hero-break {
  clear: both
}

@media (max-width:800px) {
  .inline-hero {
    float: none;
    display: block;
    margin: 0 auto 12px;
    max-width: 60%;
    height: auto
  }
}













/* Map embed */
.map-embed {
  position: relative;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow)
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px
}

/* (Removed unused schedule modal styles) */


@media (max-width:360px) {
  .hero-chooser .hero-cta {
    grid-template-columns: 1fr
  }
}

/* Image-backed hero on home */
.hero.hero-image {
  background: image-set(url('../img/home-hero-justice-center.avif') type('image/avif'), url('../img/home-hero-justice-center.webp') type('image/webp'), url('../img/home-hero-justice-center.png') type('image/png')) center/cover no-repeat
}

/* Cards */
.card {
  background: linear-gradient(to bottom, rgba(255, 255, 255, .84), rgba(255, 255, 255, .60));
  border: 1px solid rgba(15, 23, 42, .30);
  border-radius: 14px;
  box-shadow: var(--shadow), 0 1px 0 rgba(255, 255, 255, .5) inset;
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  padding: clamp(16px, 2vw, 20px)
}

.card p,
.card li {
  color: #0f172a
}

.card h3 {
  margin: 0 0 6px
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary-ink);
  font-weight: 600;
  font-size: 12px
}

main p {
  margin: 0 0 12px;
  color: var(--muted)
}

h1,
h2,
h3,
h4 {
  color: var(--text)
}

/* Tighten heading-to-content spacing in content areas */
main h2 {
  margin: 18px 0 8px
}

main h3 {
  margin: 14px 0 6px
}

main h3+p,
main h3+ul,
main h3+ol {
  margin-top: 6px
}

/* Reduce default list top margin for readability clusters */
main ul,
main ol {
  margin: 6px 0 12px
}

section {
  margin-block: clamp(24px, 5vw, 56px)
}

.lead {
  font-size: clamp(18px, 2.2vw, 20px);
  color: #1f2937
}

footer {
  border-top: 1px solid rgba(15, 23, 42, .08);
  background: linear-gradient(to top, rgba(235, 239, 246, .98), rgba(235, 239, 246, .8) 60%, rgba(235, 239, 246, .45))
}

.footer-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 2fr 1fr 1fr
}

@media (max-width:900px) {
  .footer-grid {
    grid-template-columns: 1fr
  }
}

/* Blog */
.post-list {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

@media (max-width:900px) {
  .post-list {
    grid-template-columns: 1fr
  }
}

.post-card h3 {
  margin: 0
}

.post-meta {
  color: #64748b;
  font-size: 14px
}

.post-card.with-thumb {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center
}

.post-card.with-thumb img.thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border)
}

.post-card img.thumb {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 10px
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none
}

.btn-primary {
  background: var(--gold);
  color: var(--gold-ink)
}

.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold)
}

.btn:hover {
  filter: brightness(.97)
}

.hero .pill {
  font-size: 14px;
  padding: 6px 14px;
  font-weight: 700
}

.hero.hero-image .pill {
  background: rgba(255, 255, 255, .92);
  color: var(--primary-ink);
  box-shadow: var(--shadow)
}

/* Embedded forms */
.form-embed {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, .85)
}

.form-embed iframe {
  display: block;
  width: 100%;
  height: 900px;
  border: 0
}

@media (max-width:700px) {
  .form-embed iframe {
    height: 1100px
  }
}