/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --coral:    #E8734A;
  --coral-dk: #C95A33;
  --teal:     #2A7B8C;
  --teal-lt:  #3A9BAF;
  --sand:     #FAF7F2;
  --charcoal: #1F2A30;
  --mid:      #4A5568;
  --light:    #E2E8F0;
  --white:    #FFFFFF;

  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);

  --font: 'Georgia', serif;
  --font-ui: system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.6;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-lt); }

img { max-width: 100%; display: block; }

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

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--coral);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--coral-dk); color: var(--white); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--mid);
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--light);
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--mid); }

.btn-nav {
  background: var(--coral);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.btn-nav:hover { background: var(--coral-dk); }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--light);
  z-index: 100;
  padding: 16px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font);
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--charcoal);
}
nav { display: flex; align-items: center; gap: 24px; }
nav a { color: var(--mid); font-weight: 500; font-size: 0.95rem; }
nav a:hover, nav a.active { color: var(--charcoal); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--charcoal) 100%);
  color: var(--white);
  padding: 100px 0 80px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin: 0 auto 36px;
}

/* ── Specialties ──────────────────────────────────────────── */
.specialties { padding: 72px 0; background: var(--sand); }
.specialties .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.specialty-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
  text-align: center;
}
.specialty-icon { font-size: 2.5rem; display: block; margin-bottom: 16px; }
.specialty-card h3 {
  font-family: var(--font);
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--charcoal);
}
.specialty-card p { color: var(--mid); line-height: 1.7; }

/* ── Lead Form ────────────────────────────────────────────── */
.lead-section { padding: 80px 0; background: var(--white); }
.lead-section .container { text-align: center; }
.lead-section h2 {
  font-family: var(--font);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 12px;
}
.lead-sub { color: var(--mid); margin-bottom: 40px; font-size: 1.05rem; }

.lead-form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}
.form-step { display: none; }
.form-step.active { display: block; }

.lead-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--charcoal);
}
.optional {
  font-weight: 400;
  color: var(--mid);
  font-size: 0.85rem;
}
.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--light);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color 0.2s;
  margin-bottom: 16px;
  font-family: var(--font-ui);
}
.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: var(--teal);
}
.lead-form .btn-primary { width: 100%; text-align: center; }

.form-row { margin-bottom: 4px; }

.success-message {
  text-align: center;
  padding: 40px 20px;
}
.success-icon { font-size: 3rem; display: block; margin-bottom: 16px; }
.success-message h3 { font-size: 1.5rem; margin-bottom: 8px; }
.success-message p { color: var(--mid); }

/* ── Page Hero (blog) ─────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--charcoal) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}
.page-hero h1 { font-family: var(--font); font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.8); font-size: 1.05rem; }

/* ── Blog listing ─────────────────────────────────────────── */
.blog-listing { padding: 64px 0; background: var(--sand); min-height: 300px; }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.post-card h3 {
  font-family: var(--font);
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--charcoal);
}
.post-card p { color: var(--mid); font-size: 0.95rem; line-height: 1.6; }
.post-date { font-size: 0.8rem; color: var(--mid); margin-top: 16px; }

/* ── Blog post ────────────────────────────────────────────── */
.post-article { padding: 64px 0; }
.back-link { color: var(--teal); font-weight: 500; font-size: 0.9rem; display: inline-block; margin-bottom: 32px; }
.back-link:hover { color: var(--teal-lt); }

.post-article h1 {
  font-family: var(--font);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 12px;
  line-height: 1.25;
}
.post-article .post-date { margin-bottom: 32px; }
.post-article .post-body { line-height: 1.8; color: var(--mid); font-size: 1.05rem; }
.post-article .post-body p { margin-bottom: 20px; }
.post-article .post-body h2, .post-article .post-body h3 {
  font-family: var(--font);
  color: var(--charcoal);
  margin: 32px 0 12px;
}

.post-cta {
  background: var(--sand);
  padding: 56px 0;
  text-align: center;
}
.post-cta h3 { font-family: var(--font); font-size: 1.5rem; margin-bottom: 20px; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 28px 0;
  font-size: 0.875rem;
}

/* ── Admin ────────────────────────────────────────────────── */
.admin-body { background: var(--sand); min-height: 100vh; }

.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.login-card h1 { font-family: var(--font); font-size: 1.6rem; margin-bottom: 8px; }
.login-card p { color: var(--mid); margin-bottom: 28px; }
.login-card input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--light);
  border-radius: var(--radius);
  font-size: 1rem;
  margin-bottom: 16px;
  text-align: center;
  letter-spacing: 0.1em;
}
.login-card input:focus { outline: none; border-color: var(--teal); }
.login-card .btn-primary { width: 100%; }

.admin-header {
  background: var(--white);
  border-bottom: 1px solid var(--light);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.tab-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mid);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab-btn:hover { background: var(--sand); color: var(--charcoal); }
.tab-btn.active { background: var(--teal); color: var(--white); }

.admin-tab { padding: 40px 0; }
.admin-tab h2 { font-family: var(--font); font-size: 1.6rem; margin-bottom: 24px; }

.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.tab-header h2 { margin-bottom: 0; }

/* Leads table */
.leads-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 0.9rem;
}
.leads-table th {
  background: var(--charcoal);
  color: var(--white);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
}
.leads-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--light);
  color: var(--mid);
}
.leads-table tr:last-child td { border-bottom: none; }
.leads-table tr:hover td { background: var(--sand); }

/* Post list in admin */
.admin-post-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.admin-post-item h4 { font-size: 1rem; color: var(--charcoal); margin-bottom: 4px; }
.admin-post-item .post-date { margin: 0; font-size: 0.8rem; }
.admin-post-actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn-edit {
  padding: 7px 16px;
  font-size: 0.85rem;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s;
}
.btn-edit:hover { background: var(--teal-lt); }

.btn-delete {
  padding: 7px 16px;
  font-size: 0.85rem;
  background: transparent;
  color: #e53e3e;
  border: 2px solid #fed7d7;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.btn-delete:hover { background: #fff5f5; border-color: #e53e3e; }

/* Post editor */
.post-editor {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 32px;
}
.post-editor h3 { font-size: 1.2rem; margin-bottom: 20px; }
.post-editor textarea {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.7;
  resize: vertical;
}
.editor-actions { display: flex; gap: 12px; margin-top: 8px; }

/* Settings */
.field-hint { font-size: 0.85rem; color: var(--mid); margin-top: -10px; margin-bottom: 20px; }
.field-hint a { color: var(--teal); }

/* Utilities */
.loading { color: var(--mid); font-style: italic; }
.hidden { display: none !important; }
.error-msg { color: #e53e3e; font-size: 0.9rem; margin-top: 8px; }
.success-msg { color: #38a169; font-size: 0.9rem; margin-top: 8px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .specialties .container { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 60px; }
  .admin-post-item { flex-direction: column; align-items: flex-start; }
}
