/* Layout — mobile first (375px+) */
.site-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 12px;
  flex-wrap: wrap;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 1.25rem;
}

.nav-panel {
  display: none;
  width: 100%;
  flex-basis: 100%;
  padding-bottom: 12px;
}

.nav-panel.is-open {
  display: block;
}

.nav-panel .nav-actions {
  flex-direction: column;
  align-items: stretch;
}

.nav-panel .nav-actions .btn {
  width: 100%;
  justify-content: center;
}

@media (min-width: 768px) {
  .site-nav-inner {
    min-height: 60px;
    flex-wrap: nowrap;
  }

  .nav-toggle {
    display: none;
  }

  .nav-panel {
    display: flex !important;
    width: auto;
    flex-basis: auto;
    padding-bottom: 0;
    align-items: center;
    justify-content: flex-end;
  }

  .nav-panel .nav-actions {
    flex-direction: row;
    width: auto;
  }

  .nav-panel .nav-actions .btn {
    width: auto;
  }
}

/* Hero */
.hero {
  background: var(--color-secondary);
  color: white;
  padding: 40px 0 48px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.hero p.lead {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 24px;
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-search {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
}

.hero-search input {
  flex: 1 1 200px;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 8px 12px;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-sans);
  min-width: 0;
}

.hero-popular {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.hero-popular a {
  color: var(--color-accent);
  font-size: 13px;
  text-decoration: none;
}

.hero-popular a:hover {
  text-decoration: underline;
}

/* Sections */
.section {
  padding: 40px 0;
}

.section-muted {
  background: var(--color-primary-light);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.section-head a {
  color: var(--color-primary);
  font-size: 14px;
  text-decoration: none;
}

/* Grids */
.grid-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.grid-providers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 480px) {
  .grid-providers {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

.cat-card {
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: block;
}

.cat-card .icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.cat-card .name {
  font-size: 13px;
  font-weight: 600;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 16px;
  max-width: 480px;
}

.form-grid.wide {
  max-width: 720px;
}

label.field {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-muted);
}

input.field,
textarea.field,
select.field {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 15px;
}

textarea.field {
  min-height: 100px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.msg {
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
}

.msg-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.msg-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* Footer */
.site-footer {
  background: var(--color-secondary);
  color: rgba(255, 255, 255, 0.72);
  padding: 28px 0;
  text-align: center;
  font-size: 13px;
}

.site-footer p + p {
  margin-top: 6px;
}

/* Search filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.filters .field-inline {
  flex: 1 1 140px;
}

.pager {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Provider profile */
.profile-hero {
  height: 160px;
  background: var(--color-primary-light);
  background-size: cover;
  background-position: center;
  position: relative;
}

@media (min-width: 768px) {
  .profile-hero {
    height: 200px;
  }
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid white;
  position: absolute;
  bottom: -44px;
  left: 16px;
  object-fit: cover;
  background: white;
}

.profile-head {
  padding: 52px 16px 16px;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-body {
  padding: 0 16px 32px;
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .profile-body {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

.review-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.review-item:last-child {
  border-bottom: none;
}

.placeholder-note {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 12px;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  margin-top: 16px;
}
