/* Historic Contractors Directory - Production Stylesheet */
:root {
  --primary: #1c3d5a;
  --primary-dark: #0f2438;
  --primary-light: #2c5282;
  --accent: #b7791f;
  --accent-light: #f6e05e;
  --bg-main: #f7fafc;
  --bg-card: #ffffff;
  --text-main: #2d3748;
  --text-muted: #718096;
  --border: #e2e8f0;
  --border-focus: #3182ce;
  --tag-bg: #edf2f7;
  --tag-text: #2d3748;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --max-width: 1160px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Nav */
.site-header {
  background: var(--primary-dark);
  color: #ffffff;
  border-bottom: 3px solid var(--accent);
  padding: 1rem 0;
}

.site-header .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.brand-badge {
  background: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.site-nav a {
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-nav a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-main) 100%);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.notice-banner {
  background-color: #fffaf0;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #744210;
}

.notice-banner strong {
  color: #975a16;
}

/* Filter Controls */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: end;
}

.filter-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
  min-height: 48px;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

.filter-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-reset {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
}

.btn-reset:hover {
  text-decoration: underline;
}

/* Listings Grid */
.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.contractor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contractor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e0;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
}

.card-title a {
  color: inherit;
}

.card-title a:hover {
  color: var(--primary-light);
  text-decoration: none;
}

.category-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.card-location {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.specialties-list {
  list-style: none;
  margin-bottom: 1.25rem;
}

.specialties-list li {
  font-size: 0.85rem;
  color: #4a5568;
  margin-bottom: 0.35rem;
  position: relative;
  padding-left: 1rem;
}

.specialties-list li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  color: #ffffff;
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background-color: #f7fafc;
  border-color: #cbd5e0;
  text-decoration: none;
}

/* Category Guide Block */
.category-guide-section {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.guide-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.guide-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-card p {
  font-size: 0.95rem;
  color: #4a5568;
  margin-bottom: 1rem;
}

.guide-card ul {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: #4a5568;
}

.guide-card li {
  margin-bottom: 0.4rem;
}

/* Detail Page */
.detail-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
}

.detail-content {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.detail-content h2 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
}

.detail-content h2:first-of-type {
  margin-top: 0;
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-box h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.info-row {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.info-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: #a0aec0;
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #cbd5e0;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 860px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
  .site-header .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}
