/* Structural Helical Pier Directory Stylesheet */
:root {
  --primary: #1e3a8a;          /* Deep Industrial Blue */
  --primary-hover: #172554;
  --primary-light: #eff6ff;
  --accent: #d97706;           /* Engineering Amber / Steel */
  --accent-hover: #b45309;
  --accent-light: #fef3c7;
  --success: #15803d;
  --success-light: #dcfce7;
  --dark: #0f172a;
  --gray-dark: #334155;
  --gray-medium: #64748b;
  --gray-light: #f1f5f9;
  --border: #cbd5e1;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--dark);
  background-color: #f8fafc;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo span {
  color: var(--accent);
}

nav a {
  color: var(--gray-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 1.5rem;
  transition: color 0.15s ease;
}

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

/* Hero Section */
.hero {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--gray-dark);
  max-width: 820px;
  margin: 0 auto 1.5rem;
}

.trust-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.75rem;
  font-size: 0.9rem;
  color: var(--gray-medium);
  margin-top: 1.25rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Filter Controls */
.filter-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin: -1.5rem auto 2rem;
  max-width: 1100px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: center;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--white);
  color: var(--dark);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  ring: 2px solid var(--primary-light);
}

/* Table Design */
.table-responsive {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--gray-light);
  color: var(--gray-dark);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.9rem 1rem;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:hover {
  background-color: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  line-height: 1.2;
}

.badge-verified {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-chance {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-magnum {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-general {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.badge-published {
  background-color: #dcfce7;
  color: #15803d;
  font-weight: 700;
}

.badge-estimate {
  background-color: #f1f5f9;
  color: #64748b;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-outline {
  border-color: var(--border);
  color: var(--gray-dark);
  background: var(--white);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Content & Section Layouts */
.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--gray-medium);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

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

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-size: 1.25rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--gray-dark);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* Region Geotechnical Spec Box */
.spec-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

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

.spec-item strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--gray-medium);
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.spec-item span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
}

/* Footer */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 0 2rem;
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
  margin-top: 4rem;
}

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

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-col p {
  line-height: 1.6;
}

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

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

.footer-col a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

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

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-medium);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.provenance-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  color: #78350f;
}


/* Responsive Detail Page Layout */
.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
}

.detail-sidebar {
  position: sticky;
  top: 5.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* Mobile-Specific Responsive Overhauls */
@media (max-width: 768px) {
  .hero {
    padding: 2.25rem 0 1.75rem;
  }

  .hero h1 {
    font-size: 1.85rem;
    line-height: 1.25;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .trust-bar {
    gap: 0.75rem;
    font-size: 0.8rem;
  }

  /* Compact Mobile Header & Navigation */
  .nav-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    height: auto;
    padding: 0.75rem 0;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1.15rem;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    width: 100%;
    padding-top: 0.4rem;
    border-top: 1px solid #f1f5f9;
  }

  nav a {
    margin: 0;
    font-size: 0.82rem;
    color: var(--gray-dark);
  }

  .filter-card {
    grid-template-columns: 1fr;
    margin-top: -1rem;
    padding: 1rem;
    gap: 0.75rem;
  }

  /* Responsive Detail Layout: Single Column */
  .detail-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .detail-sidebar {
    position: static !important;
    margin-top: 1rem;
  }

  /* Mobile Table Usability */
  .table-responsive {
    border-radius: 6px;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  }

  .data-table th, .data-table td {
    padding: 0.75rem 0.65rem;
    font-size: 0.85rem;
  }

  .data-table th {
    font-size: 0.75rem;
  }
}

