/* ============================================
   LegalHack.io — Custom Styles
   ============================================ */

/* Hero banner */
.lh-hero {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  margin: -2rem 0 2rem;
  border-bottom: 2px solid #e2e8f0;
}
.lh-hero h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 0.5rem;
  letter-spacing: 0.01em;
}
.lh-hero p {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  font-weight: 400;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}
.lh-hero a {
  color: #5755d9;
  text-decoration: none;
  font-weight: 500;
}
.lh-hero a:hover {
  text-decoration: underline;
}

/* Section headings */
.lh-section-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: #3a414e;
  margin: 2rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e2e8f0;
}
.lh-section-heading a {
  color: #3a414e;
  text-decoration: none;
}
.lh-section-heading a:hover {
  color: #5755d9;
}

/* Cards */
.lh-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.lh-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lh-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.lh-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.lh-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #3a414e;
}
.lh-card-title a {
  color: #3a414e;
  text-decoration: none;
}
.lh-card-title a:hover {
  color: #5755d9;
}
.lh-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.lh-badge.live {
  background: #d1fae5;
  color: #065f46;
}
.lh-badge.soon {
  background: #f1f5f9;
  color: #64748b;
}
.lh-card-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 0.6rem;
}
.lh-card-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.lh-card-links a {
  font-size: 0.7rem;
  color: #5755d9;
  text-decoration: none;
  padding: 2px 10px;
  border: 1px solid #e0e7ff;
  border-radius: 12px;
  transition: all 0.15s;
}
.lh-card-links a:hover {
  background: #eff6ff;
  border-color: #5755d9;
}

/* Better default table styling */
.table table,
#body-wrapper table {
  border-spacing: 0;
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  font-size: 0.85rem;
}
#body-wrapper table th {
  background: #f8fafc;
  font-weight: 600;
  color: #3a414e;
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 2px solid #e2e8f0;
}
#body-wrapper table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  vertical-align: top;
}
#body-wrapper table tr:hover td {
  background: #f8fafc;
}
#body-wrapper table a {
  color: #5755d9;
}

/* Sticky footer spacing */
#body-wrapper .container {
  min-height: calc(100vh - 10rem);
}

/* Prevent fixed header from overlapping page content */
.header-fixed #body-wrapper {
  padding-top: 4rem !important;
}

/* Tighten top spacing on subpages (Code, Data) that have no hero */
.lh-section-heading:first-child {
  margin-top: 0.5rem;
}

/* Smooth scroll and anchor offset for fixed header */
html {
  scroll-behavior: smooth;
}
.lh-section-heading[id] {
  scroll-margin-top: 5rem;
}
