/* ── GuidanceGate Directory — Base Styles ── */

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

:root {
  --primary: #1a3a5c;
  --primary-light: #2563a8;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --featured: #7c3aed;
  --featured-bg: #f5f3ff;
  --claimed: #059669;
  --claimed-bg: #ecfdf5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}

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

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
.nav {
  background: var(--primary);
  color: white;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a { color: rgba(255,255,255,0.85); font-size: 0.9rem; padding: 6px 12px; border-radius: 6px; transition: all .15s; }
.nav-links a:hover { background: rgba(255,255,255,0.1); color: white; text-decoration: none; }
.nav-links .btn-nav { background: var(--accent); color: var(--primary); font-weight: 600; }
.nav-links .btn-nav:hover { background: var(--accent-hover); }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0f2744 100%);
  color: white;
  padding: 72px 24px 64px;
  text-align: center;
}
.hero h1 { font-size: 2.6rem; font-weight: 800; margin-bottom: 16px; line-height: 1.15; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto 32px; }
.hero-search {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-search input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  font-size: 1rem;
  outline: none;
}
.hero-search button {
  padding: 14px 24px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.hero-search button:hover { background: var(--accent-hover); }

/* ── Directory Layout ── */
.directory-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 40px 0 60px;
  align-items: start;
}
@media (max-width: 768px) {
  .directory-layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .hero h1 { font-size: 1.9rem; }
}

/* ── Sidebar ── */
.sidebar {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 76px;
}
.sidebar h3 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 12px; }
.filter-group { margin-bottom: 24px; }
.filter-group input, .filter-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
}
.filter-group input:focus, .filter-group select:focus { border-color: var(--primary-light); }
.filter-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tag {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  color: var(--text-muted);
  background: white;
}
.filter-tag:hover, .filter-tag.active { background: var(--primary); color: white; border-color: var(--primary); text-decoration: none; }
.clear-filters { display: block; margin-top: 16px; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.clear-filters:hover { color: var(--primary-light); }

/* ── Grid ── */
.grid-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.grid-header h2 { font-size: 1.1rem; color: var(--text-muted); font-weight: 500; }
.grid-header h2 strong { color: var(--text); }
.coaches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Coach Card ── */
.coach-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
  position: relative;
}
.coach-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.coach-card.featured { border-color: var(--featured); border-width: 2px; }
.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-featured { background: var(--featured); color: white; }
.badge-claimed { background: var(--claimed-bg); color: var(--claimed); border: 1px solid var(--claimed); }
.card-photo {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
}
.card-photo-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #93c5fd;
}
.card-body { padding: 18px; }
.card-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.card-tagline { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.card-location { font-size: 0.82rem; color: var(--text-light); margin-bottom: 12px; display: flex; align-items: center; gap: 4px; }
.card-specialisms { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.spec-tag {
  padding: 3px 9px;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}
.card-actions { padding-top: 12px; border-top: 1px solid var(--border-light); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover { background: #eff6ff; }
.btn-accent { background: var(--accent); color: var(--primary); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-block { display: flex; width: 100%; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--claimed); color: white; }
.btn-success:hover { background: #047857; }

/* ── Pagination ── */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 36px; }
.page-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all .15s;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-link.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-link.disabled { opacity: .4; pointer-events: none; }

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1e4b8f 100%);
  color: white;
  text-align: center;
  padding: 56px 24px;
}
.cta-banner h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.8); margin-bottom: 28px; font-size: 1rem; }

/* ── Profile Page ── */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 40px 0 60px;
  align-items: start;
}
@media (max-width: 768px) { .profile-layout { grid-template-columns: 1fr; } }

.profile-header {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.profile-header.featured { border-color: var(--featured); border-width: 2px; }
.profile-cover {
  height: 180px;
  background: linear-gradient(135deg, var(--primary) 0%, #1e4b8f 100%);
  position: relative;
}
.profile-cover-inner {
  position: absolute;
  bottom: -52px;
  left: 32px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
}
.profile-photo {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 4px solid white;
  object-fit: cover;
  background: #dbeafe;
}
.profile-photo-placeholder {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 4px solid white;
  background: #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.profile-body { padding: 72px 32px 32px; }
.profile-name { font-size: 1.8rem; font-weight: 800; }
.profile-tagline { font-size: 1rem; color: var(--text-muted); margin-top: 6px; margin-bottom: 16px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.profile-meta-item { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--text-muted); }
.profile-bio { font-size: 0.95rem; line-height: 1.75; color: var(--text); white-space: pre-line; }
.profile-section { margin-top: 28px; }
.profile-section h3 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; }
.social-link {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  font-size: 0.85rem; font-weight: 500;
  background: var(--border-light);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all .15s;
}
.social-link:hover { background: var(--primary); color: white; border-color: var(--primary); text-decoration: none; }

/* ── Sidebar Cards ── */
.sidebar-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.sidebar-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.sidebar-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 16px; }
.sidebar-card .highlight { background: linear-gradient(135deg, #fef3c7, #fde68a); border: 1px solid #fbbf24; border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-size: 0.88rem; }

/* ── Forms ── */
.form-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px;
  box-shadow: var(--shadow-md);
  max-width: 560px;
  margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary-light);
  background: white;
}
.form-group textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ── Admin ── */
.admin-layout { padding: 32px 0 60px; }
.admin-header { margin-bottom: 28px; }
.admin-header h1 { font-size: 1.6rem; font-weight: 800; }
.admin-header p { color: var(--text-muted); font-size: 0.9rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-card .stat-num { font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-card .stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.admin-section { margin-bottom: 36px; }
.admin-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.table-wrap { overflow-x: auto; background: white; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { background: var(--border-light); padding: 11px 16px; text-align: left; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--border-light); }
.score-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.78rem; font-weight: 700; }
.score-high { background: #d1fae5; color: #065f46; }
.score-mid { background: #fef3c7; color: #92400e; }
.score-low { background: #fee2e2; color: #991b1b; }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.78rem; font-weight: 600; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.tier-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.78rem; font-weight: 600; }
.tier-featured { background: var(--featured-bg); color: var(--featured); }
.tier-claimed { background: var(--claimed-bg); color: var(--claimed); }
.tier-free { background: var(--border-light); color: var(--text-muted); }
.action-row { display: flex; gap: 6px; }
.generate-form { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.generate-form input { flex: 1; min-width: 260px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; outline: none; }
.generate-form input:focus { border-color: var(--primary-light); }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.9rem; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Page header ── */
.page-header { padding: 40px 24px 0; }
.page-header h1 { font-size: 2rem; font-weight: 800; }
.page-header p { color: var(--text-muted); margin-top: 8px; }

/* ── Footer ── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
}
footer a { color: rgba(255,255,255,.85); }
footer strong { color: white; }

/* ── Utilities ── */
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.text-center { text-align: center; }
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--primary-light); }
.breadcrumb a:hover { text-decoration: underline; }
