/* ============================================================
   AttorneyFinder.com — Main Stylesheet
   ============================================================ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --cream:    #fdf8f3;
  --warm:     #f5ede0;
  --border:   #e8ddd0;
  --white:    #ffffff;
  --terra:    #c4622d;
  --terra-l:  #e8845a;
  --terra-d:  #8b3d18;
  --navy:     #1e2d3d;
  --slate:    #4a5568;
  --muted:    #8a9bb0;
  --green:    #2d6a4f;
  --green-bg: #d4edda;
  --green-bd: #c3e6cb;
  --gold:     #c9952a;
  --red:      #dc2626;
  --shadow:   0 2px 12px rgba(30,45,61,.08);
  --shadow-lg:0 8px 32px rgba(30,45,61,.14);
  --radius:   10px;
  --radius-lg:14px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--navy);
  font-size: 15px;
  line-height: 1.65;
}
h1,h2,h3,h4,h5 { font-family: 'Lora', Georgia, serif; line-height: 1.25; }
a { color: var(--terra); text-decoration: none; }
a:hover { color: var(--terra-d); }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: 'DM Sans', sans-serif; }

/* ── Nav ────────────────────────────────────────────────── */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: 62px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.logo {
  font-family: 'Lora', serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--terra);
}
.logo span { color: var(--navy); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--slate); font-size: 14px; font-weight: 400; transition: color .15s; }
.nav-links a:hover { color: var(--terra); }
.nav-cta {
  background: var(--terra);
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: 7px;
  font-weight: 500;
  transition: background .15s !important;
}
.nav-cta:hover { background: var(--terra-d) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 22px; color: var(--navy); }
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 14px; z-index: 99; }
  .nav-toggle { display: block; }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1e2d3d 0%, #2d3f52 55%, #3d2d1e 100%);
  padding: 72px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20.5V18H0v5h5v5H0v5h5v4h5v-4h5v4h5v-4h5v-4h-5v-5h5V18h-5v2.5h-5V18h-5v2.5h-5zm5 2.5v5h-5v-5h5zM0 5h5v5H0V5zm10 0h5v5h-5V5z' fill='%23fff'/%3E%3C/svg%3E");
}
.hero-inner { position: relative; max-width: 680px; margin: 0 auto; }
.hero-eyebrow {
  color: var(--terra-l);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(26px, 5vw, 46px); color: #fff; margin-bottom: 10px; }
.hero h1 em { color: var(--terra-l); font-style: italic; }
.hero-sub { color: #b8c5d1; font-size: 16px; margin-bottom: 28px; }
.hero-stats { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.hero-stat { color: #b8c5d1; font-size: 13px; }
.hero-stat strong { color: #fff; }

/* ── Search Box ─────────────────────────────────────────── */
.search-box {
  background: var(--white);
  border-radius: 10px;
  padding: 5px 5px 5px 18px;
  display: flex;
  gap: 6px;
  align-items: center;
  box-shadow: var(--shadow-lg);
  max-width: 640px;
  margin: 0 auto;
}
.search-box input[type=text] {
  border: none;
  outline: none;
  font-size: 15px;
  flex: 1;
  color: var(--navy);
  background: transparent;
  min-width: 0;
}
.search-box select {
  border: none;
  border-left: 1px solid var(--border);
  outline: none;
  font-size: 14px;
  color: var(--slate);
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.search-box button {
  background: var(--terra);
  color: var(--white);
  border: none;
  padding: 11px 22px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
}
.search-box button:hover { background: var(--terra-d); }
@media (max-width: 560px) {
  .search-box { flex-wrap: wrap; padding: 10px; }
  .search-box input, .search-box select { width: 100%; border: none; }
  .search-box button { width: 100%; }
}

/* ── Trust Strip ────────────────────────────────────────── */
.trust {
  background: var(--warm);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.trust-item { font-size: 13px; color: var(--slate); display: flex; align-items: center; gap: 5px; }
.trust-item b { color: var(--terra); }

/* ── Layout ─────────────────────────────────────────────── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 36px 24px; }
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
@media (max-width: 920px) { .layout { grid-template-columns: 1fr; } .sidebar { order: -1; } }

/* ── Section Head ───────────────────────────────────────── */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}
.sec-head h2 { font-size: 20px; }
.sec-head .cnt { font-size: 13px; color: var(--muted); }

/* ── Attorney Cards ─────────────────────────────────────── */
.atty-grid { display: grid; gap: 14px; }
.atty-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 14px;
  align-items: start;
  position: relative;
  transition: box-shadow .2s, transform .2s;
}
.atty-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.atty-card.featured { border-color: var(--gold); }
.feat-badge {
  position: absolute;
  top: -1px; right: 16px;
  background: var(--gold);
  color: var(--white);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 0 0 6px 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--warm);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lora', serif;
  font-size: 17px;
  color: var(--terra);
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.atty-name { font-size: 16px; color: var(--navy); margin-bottom: 2px; font-family: 'Lora', serif; }
.atty-name a { color: inherit; }
.atty-name a:hover { color: var(--terra); }
.atty-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  background: var(--warm);
  color: var(--terra);
  border: 1px solid var(--border);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}
.tag.green { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.tag.gold  { background: #fff8e1; color: var(--gold); border-color: #ffe082; }
.atty-right { text-align: right; min-width: 85px; flex-shrink: 0; }
.stars { color: var(--gold); font-size: 12px; letter-spacing: 1px; }
.rating-num { font-size: 14px; font-weight: 500; }
.rating-cnt { font-size: 11px; color: var(--muted); }
.consult-btn {
  display: block;
  margin-top: 8px;
  background: var(--terra);
  color: var(--white);
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background .15s;
}
.consult-btn:hover { background: var(--terra-d); }

/* ── Ad Unit ────────────────────────────────────────────── */
.ad-unit {
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin: 16px 0;
}
.ad-unit-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }

/* ── Profile Page ───────────────────────────────────────── */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--terra); }
.profile-hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  align-items: start;
}
@media (max-width: 640px) { .profile-hero { grid-template-columns: 64px 1fr; } .profile-actions { grid-column: 1/-1; } }
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--warm);
  border: 3px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lora', serif;
  font-size: 28px;
  color: var(--terra);
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 26px; margin-bottom: 4px; }
.profile-sub { color: var(--slate); font-size: 15px; margin-bottom: 10px; }
.profile-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.profile-section h3 { font-size: 17px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .info-grid { grid-template-columns: 1fr; } }
.info-item label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 3px; }
.info-item span, .info-item a { font-size: 14px; color: var(--navy); font-weight: 500; }
.call-btn {
  display: block;
  background: var(--green);
  color: var(--white);
  padding: 11px 18px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  text-align: center;
  margin-bottom: 8px;
  transition: background .15s;
}
.call-btn:hover { background: #1e5438; color: var(--white); }
.web-btn {
  display: block;
  background: var(--warm);
  color: var(--navy);
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  border: 1px solid var(--border);
  transition: background .15s;
}
.web-btn:hover { background: var(--border); color: var(--navy); }

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.widget h3 { font-size: 15px; margin-bottom: 14px; color: var(--navy); }
.widget-urgent { background: linear-gradient(135deg, #fff8f5, var(--white)); border-color: #f5c6a0; }
.widget-urgent h3 { color: var(--terra); }
.widget-nl { background: linear-gradient(135deg, #f0f4ff, var(--white)); border-color: #c3d0f0; }
.widget-nl h3 { color: #2d4a8b; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 10px; }
.form-group label { font-size: 12px; color: var(--slate); display: block; margin-bottom: 4px; font-weight: 500; }
.form-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--navy);
  background: var(--cream);
  outline: none;
  transition: border-color .15s;
}
.form-control:focus { border-color: var(--terra); }
textarea.form-control { height: 75px; resize: none; }
.form-btn {
  width: 100%;
  background: var(--terra);
  color: var(--white);
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.form-btn:hover { background: var(--terra-d); }
.form-btn.navy { background: var(--navy); }
.form-btn.navy:hover { background: #0f1c28; }
.form-privacy { font-size: 11px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.5; }
.alert-ok { background: var(--green-bg); border: 1px solid var(--green-bd); border-radius: 6px; padding: 12px; color: var(--green); font-size: 13px; text-align: center; margin-bottom: 10px; }
.alert-err { background: #f8d7da; border: 1px solid #f5c6cb; border-radius: 6px; padding: 12px; color: var(--red); font-size: 13px; text-align: center; margin-bottom: 10px; }
.checkboxes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.cb-item { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.cb-item input { accent-color: var(--terra); }

/* ── Newsletter Banner ──────────────────────────────────── */
.nl-banner {
  background: linear-gradient(135deg, var(--terra-d), var(--terra));
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 32px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
@media (max-width: 640px) { .nl-banner { grid-template-columns: 1fr; } }
.nl-banner h3 { font-size: 19px; color: var(--white); margin-bottom: 4px; }
.nl-banner p { color: rgba(255,255,255,.8); font-size: 14px; }
.nl-form { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-form input {
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  min-width: 200px;
  flex: 1;
}
.nl-form button {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.nl-form button:hover { background: #0f1c28; }

/* ── Browse Grids ───────────────────────────────────────── */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 8px; margin-bottom: 32px; }
.state-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.state-btn:hover { border-color: var(--terra); box-shadow: var(--shadow); }
.state-abbr { font-size: 18px; font-weight: 700; color: var(--navy); font-family: 'Lora', serif; }
.state-name { font-size: 11px; color: var(--muted); margin: 2px 0 4px; }
.state-count { font-size: 12px; color: var(--terra); font-weight: 500; }

.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 6px; margin-bottom: 32px; }
.city-btn {
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--slate);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .15s;
  text-decoration: none;
}
.city-btn:hover { background: var(--warm); color: var(--navy); }
.city-cnt { font-size: 11px; color: var(--muted); }

/* ── Pagination ─────────────────────────────────────────── */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.page-a {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--slate);
  font-size: 14px;
  background: var(--white);
  text-decoration: none;
  transition: background .15s;
}
.page-a.on { background: var(--terra); color: var(--white); border-color: var(--terra); }
.page-a:hover:not(.on) { background: var(--warm); color: var(--navy); }

/* ── Modal ──────────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30,45,61,.65);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 420px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 { font-size: 19px; margin-bottom: 4px; }
.modal .modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.modal-x {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer { background: var(--navy); color: #8a9bb0; padding: 48px 24px 24px; margin-top: 60px; }
.footer-wrap { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { color: var(--white); font-size: 14px; margin-bottom: 12px; font-family: 'DM Sans', sans-serif; font-weight: 500; }
.footer a { color: #8a9bb0; font-size: 13px; display: block; margin-bottom: 6px; }
.footer a:hover { color: var(--terra-l); }
.footer-logo { font-family: 'Lora', serif; font-size: 20px; color: var(--white); margin-bottom: 10px; }
.footer-logo span { color: var(--terra-l); }
.footer-bottom {
  border-top: 1px solid #2d3f52;
  padding-top: 16px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Utilities ──────────────────────────────────────────── */
.disclaimer {
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 16px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fu { animation: fadeUp .4s ease both; }
.fu-1 { animation-delay: .08s; }
.fu-2 { animation-delay: .16s; }
.fu-3 { animation-delay: .24s; }
