/* PHPCUK Marketplace - Public Styles */
/* Based on Phase 1 mock design */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(64,18,104,0.06), transparent 26%),
    linear-gradient(180deg, #fcfbfd 0%, var(--bg) 100%);
  line-height: 1.45;
}

a {
  color: inherit;
}

/* Header */
.site-top {
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.site-top-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-copy strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
  color: var(--primary-deep);
  font-family: var(--font-heading);
}

.brand-copy span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

/* Content wrapper */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

/* Hero */
.hero {
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 60%, #5c2586 100%);
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: ;
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  right: -70px;
  top: -110px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1.05;
  position: relative;
  z-index: 1;
  max-width: 780px;
  color: white;
  font-family: var(--font-heading);
}

.hero p {
  margin: 0;
  font-size: 17px;
  max-width: 860px;
  opacity: 0.98;
  position: relative;
  z-index: 1;
}

/* Grid layout */
.grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

/* Panel (used for filters and results) */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Filters sidebar */
.filters {
  padding: 22px;
  position: sticky;
  top: 86px;
}

.filters h2,
.results-head h2 {
  margin: 0 0 8px;
  font-size: var(--text-xl);
  color: var(--primary-deep);
  font-family: var(--font-heading);
}

.filters p,
.results-head p,
.helper {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.field {
  margin-top: 16px;
}

.filters label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--primary-deep);
}

.filters input,
.filters select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.filters input:focus,
.filters select:focus {
  border-color: var(--primary-muted);
  box-shadow: 0 0 0 4px rgba(64,18,104,0.09);
}

.helper {
  margin-top: 6px;
  font-size: 12px;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-row button,
.btn-row a {
  border: 0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease;
  text-decoration: none;
  text-align: center;
  display: block;
}

.btn-row button:hover,
.btn-row a:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-row .primary {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
  color: #fff;
  flex: 1;
}

.btn-row .secondary {
  background: var(--primary-soft);
  color: var(--primary-deep);
  border: 1px solid var(--border);
  flex: 1;
}

/* Results area */
.results {
  padding: 22px;
}

.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

/* Provider listings */
.listing {
  display: grid;
  grid-template-columns: 84px 1fr 240px;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  align-items: start;
}

.listing:first-of-type {
  border-top: 0;
  padding-top: 14px;
}

.logo {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f7f1fb 0%, #efe6f8 100%);
  border: 1px solid #e2d5ef;
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.03em;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.listing h3 {
  margin: 0;
  font-size: var(--text-xl);
  color: var(--primary-deep);
  font-family: var(--font-heading);
}

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--primary-deep);
  border: 1px solid var(--border);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.pill {
  font-size: 12px;
  color: #56496a;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: #fcf9fe;
  border: 1px solid #e9e0f2;
}

.listing p {
  margin: 0;
  color: #352b41;
  max-width: 760px;
  font-size: var(--text-base);
}

/* Contact sidebar */
.contact {
  border-left: 1px solid var(--border-subtle);
  padding-left: 18px;
  min-width: 0;
}

.contact h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--primary-deep);
  font-weight: 600;
}

.contact-item {
  font-size: 14px;
  color: #4e4260;
  margin-bottom: 8px;
  word-break: break-word;
}

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

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--highlight);
  color: var(--primary-deep);
  transition: background 0.15s ease;
}

.button-link:hover {
  background: var(--surface);
  text-decoration: none;
}

/* Empty state */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state-title {
  font-size: var(--text-lg);
  font-family: var(--font-heading);
  margin-bottom: 12px;
  color: var(--text);
}

/* Responsive */
@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
    top: auto;
  }

  .listing {
    grid-template-columns: 84px 1fr;
  }

  .contact {
    grid-column: 1 / -1;
    border-left: 0;
    padding-left: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
  }

  .hero h1 {
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .site-top-inner,
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding: 24px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: 29px;
  }

  .results-head {
    align-items: start;
    flex-direction: column;
  }

  .listing {
    grid-template-columns: 1fr;
  }

  .logo {
    width: 72px;
    height: 72px;
    font-size: 20px;
  }

  .brand-copy strong {
    font-size: 15px;
  }
}
