/* Boat Survey Directory - Production Stylesheet */
:root {
  --primary: #0a2540;
  --primary-dark: #051424;
  --primary-light: #16426d;
  --accent-cyan: #0284c7;
  --accent-blue: #0369a1;
  --accent-gold: #b45309;
  --accent-gold-bg: #fef3c7;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #0284c7;
  --badge-sams: #0369a1;
  --badge-sams-bg: #e0f2fe;
  --badge-nams: #0d9488;
  --badge-nams-bg: #ccfbf1;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --max-width: 1180px;
}

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

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

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

a:hover {
  color: var(--primary);
  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);
  color: #ffffff;
  border-bottom: 3px solid var(--accent-cyan);
  padding: 1rem 0;
}

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

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

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

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

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

.site-nav a {
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

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

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #e2e8f0;
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #38bdf8;
}

.stat-label {
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* Filter Bar */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  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: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-input, .filter-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background-color: #ffffff;
  color: var(--text-main);
  transition: border-color 0.15s ease;
}

.filter-input:focus, .filter-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

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

/* Surveyor Grid & Cards */
.surveyor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.surveyor-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;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

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

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

.card-company {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

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

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  display: inline-block;
}

.badge-sams {
  background-color: var(--badge-sams-bg);
  color: var(--badge-sams);
  border: 1px solid rgba(3, 105, 161, 0.2);
}

.badge-nams {
  background-color: var(--badge-nams-bg);
  color: var(--badge-nams);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

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

.badge-specialty {
  background-color: #f1f5f9;
  color: #475569;
}

.card-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.detail-label {
  font-weight: 500;
  color: var(--text-muted);
}

.detail-val {
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  text-decoration: none;
}

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

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

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

.btn-outline:hover {
  background-color: #f1f5f9;
  text-decoration: none;
}

/* Regional Grid on Homepage */
.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.region-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.region-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.region-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.region-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.region-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

/* Educational Guides Grid */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

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

.guide-box h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.guide-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.guide-link {
  font-weight: 600;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Callout / Disclaimer Boxes */
.callout {
  background: #f8fafc;
  border-left: 4px solid var(--accent-cyan);
  padding: 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-main);
}

.callout-warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
}

.callout-warning strong {
  color: #92400e;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

/* Article / Guide Page Content */
.article-wrap {
  max-width: 820px;
  margin: 2rem auto 4rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.article-header h1 {
  font-size: 2.2rem;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-content h2 {
  font-size: 1.45rem;
  color: var(--primary);
  margin: 1.75rem 0 0.75rem 0;
}

.article-content h3 {
  font-size: 1.15rem;
  color: var(--primary-light);
  margin: 1.25rem 0 0.5rem 0;
}

.article-content p {
  margin-bottom: 1.15rem;
  line-height: 1.7;
}

.article-content ul, .article-content ol {
  margin: 0 0 1.25rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.45rem;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.article-content th, .article-content td {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: left;
}

.article-content th {
  background-color: #f1f5f9;
  font-weight: 700;
  color: var(--primary);
}

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: #cbd5e1;
  padding: 3rem 0 1.5rem 0;
  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(240px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

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

.footer-col p {
  line-height: 1.5;
  font-size: 0.85rem;
}

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

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

.footer-col a {
  color: #94a3b8;
  font-size: 0.85rem;
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { width: 100%; justify-content: flex-start; gap: 0.75rem; }
  .article-wrap { padding: 1.5rem; margin: 1rem auto; }
}
