/* =============================================
   NKYPro — Licensed Contractor Directory
   styles.css
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #1a2744;
  --blue:    #2255cc;
  --blue-lt: #3b6fe8;
  --gold:    #e8a020;
  --gold-lt: #f5c04a;
  --gray-50: #f8f9fb;
  --gray-100:#f0f2f7;
  --gray-200:#dde1ec;
  --gray-400:#9099b2;
  --gray-700:#3d4461;
  --gray-900:#151c30;
  --red:     #c0392b;
  --green:   #1e8c45;
  --white:   #ffffff;
  --radius:  8px;
  --shadow:  0 2px 12px rgba(26,39,68,.10);
  --shadow-md: 0 4px 24px rgba(26,39,68,.15);
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --transition: 180ms ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-lt); }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img { border-radius: 6px; }
.logo-text {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: -.01em;
}
.logo-text strong { font-weight: 700; color: var(--gold); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav a {
  color: rgba(255,255,255,.80);
  font-size: .875rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.main-nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,.10);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .35;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(26,39,68,.92) 45%, rgba(26,39,68,.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 72px 20px;
  max-width: 680px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(232,160,32,.12);
  border: 1px solid rgba(232,160,32,.3);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 20px;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.82);
  margin-bottom: 32px;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-lt);
  border-color: var(--gold-lt);
  color: var(--navy);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.7);
  color: var(--white);
}

/* ---- TRUST BAND ---- */
.trust-band {
  background: var(--blue);
  padding: 14px 0;
}
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  justify-content: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--white);
  opacity: .92;
}
.trust-item svg { flex-shrink: 0; opacity: .8; }

/* ---- SECTIONS ---- */
.section { padding: 72px 0; }
.section-alt { background: var(--gray-50); }

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.section-sub {
  font-size: 1rem;
  color: var(--gray-700);
  margin-bottom: 36px;
  max-width: 680px;
}
.section-sub a { color: var(--blue); }

/* ---- TRADE GRID ---- */
.trade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.trade-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 28px 24px;
  text-decoration: none;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.trade-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue);
  transform: translateY(-2px);
}
.trade-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.trade-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.trade-card p {
  font-size: .875rem;
  color: var(--gray-700);
  line-height: 1.55;
  flex: 1;
}
.trade-count {
  display: inline-block;
  margin-top: 16px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--gray-100);
  border-radius: 20px;
  padding: 3px 10px;
}

/* ---- TABLES ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  margin-bottom: 24px;
}
.listing-table,
.req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.listing-table th,
.req-table th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}
.listing-table td,
.req-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-900);
  vertical-align: top;
}
.listing-table tr:last-child td,
.req-table tr:last-child td { border-bottom: none; }
.listing-table tr:nth-child(even) td,
.req-table tr:nth-child(even) td { background: var(--gray-50); }
.listing-table tr:hover td,
.req-table tr:hover td { background: #eef2ff; }

/* ---- LOCAL NOTE ---- */
.local-note {
  background: #fffbe6;
  border: 1px solid #f5c04a;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.local-note h4 {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.local-note p {
  font-size: .875rem;
  color: var(--gray-700);
  line-height: 1.6;
}

/* ---- COUNTY GRID ---- */
.county-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.county-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
}
.county-header {
  background: var(--navy);
  padding: 18px 22px;
}
.county-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}
.county-seat {
  font-size: .8rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.county-rules {
  list-style: none;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.county-rules li {
  font-size: .8625rem;
  color: var(--gray-700);
  line-height: 1.55;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}
.county-rules li:last-child { border-bottom: none; padding-bottom: 0; }
.county-rules strong { color: var(--navy); }

/* ---- STEPS ---- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 48px;
  bottom: 48px;
  width: 2px;
  background: var(--gray-200);
}
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 0 0 32px;
  position: relative;
}
.step:last-child { padding-bottom: 0; }
.step-num {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--white);
}
.step-body { padding-top: 10px; }
.step-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.step-body p {
  font-size: .9rem;
  color: var(--gray-700);
  line-height: 1.6;
}
.step-body a { color: var(--blue); }

/* ---- CALCULATOR ---- */
.calculator-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 36px 40px;
  max-width: 560px;
  box-shadow: var(--shadow);
}
.calc-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.calc-row label {
  font-size: .875rem;
  font-weight: 700;
  color: var(--navy);
}
.calc-row input,
.calc-row select {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
  color: var(--gray-900);
  transition: border-color var(--transition);
}
.calc-row input:focus,
.calc-row select:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
}
.calc-result {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--gray-100);
  border-radius: var(--radius);
  font-size: .9375rem;
  color: var(--navy);
  min-height: 48px;
  line-height: 1.6;
}
.calc-error { color: var(--red); }
.calc-note {
  margin-top: 14px;
  font-size: .8rem;
  color: var(--gray-400);
  line-height: 1.55;
}

/* ---- FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  max-width: 780px;
}
.faq-item {
  border-bottom: 1px solid var(--gray-200);
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--navy);
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--gray-400);
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item[open] summary {
  background: var(--gray-50);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { background: var(--gray-50); }
.faq-body {
  padding: 4px 22px 20px;
  background: var(--gray-50);
}
.faq-body p {
  font-size: .9rem;
  color: var(--gray-700);
  line-height: 1.7;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.7);
  padding-top: 56px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo-footer { margin-bottom: 14px; }
.footer-brand p {
  font-size: .875rem;
  line-height: 1.65;
  color: rgba(255,255,255,.55);
  max-width: 280px;
}
.footer-col h4 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  padding: 3px 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  padding: 20px 0;
}
.footer-bottom p {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
  line-height: 1.6;
  margin-bottom: 4px;
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--white); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    z-index: 99;
  }
  .main-nav.nav-open { display: flex; }
  .main-nav a { padding: 12px 14px; font-size: 1rem; }
  .nav-toggle { display: flex; }

  .hero-content { padding: 56px 20px; }

  .trade-grid { grid-template-columns: 1fr 1fr; }

  .steps::before { display: none; }

  .calculator-card { padding: 24px 20px; }
}

@media (max-width: 520px) {
  .trade-grid { grid-template-columns: 1fr; }
  .county-grid { grid-template-columns: 1fr; }
  .trust-inner { flex-direction: column; align-items: center; text-align: center; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; }
}
