/* Local Connections Hub — one stylesheet, mobile first. */

:root {
  --ink: #1e2a32;
  --ink-soft: #3d4f5a;
  --page: #fbf8f3;
  --card: #ffffff;
  --line: #d6cec2;
  --teal: #11555c;
  --teal-dark: #0b3d42;
  --sand: #f3ece1;
  --teal-pale: #c3dbd8;
  --support: #fdf3e3;
  --support-line: #c9862a;
}

* { box-sizing: border-box; }

/* Our own display rules would otherwise override this. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Verdana, sans-serif;
  font-size: 1.125rem;   /* 18px */
  line-height: 1.65;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Links and focus */

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

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--support-line);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--card);
  padding: 0.75rem 1rem;
  border: 2px solid var(--teal);
}

/* Header — a full-width bar across the top */

.site-header {
  background: var(--teal-dark);
  border-bottom: 4px solid var(--support-line);
}

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

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

.brand-text { min-width: 0; }

.site-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: #fff;
}

.site-name {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
}

.site-name a {
  color: #fff;
  text-decoration: none;
}

.site-name a:hover { text-decoration: underline; }

.site-tagline {
  margin: 0.15rem 0 0;
  color: #dceaea;
  font-size: 1rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.site-nav a[aria-current="page"] {
  background: #fff;
  color: var(--teal-dark);
}

.site-nav a:focus-visible {
  outline: 3px solid var(--support-line);
  outline-offset: 2px;
}

/*
 * Banner image — a short band under the header, not a hero. Kept shallow on
 * purpose: "Need to talk now?" has to stay near the top of the page.
 */

.banner {
  background: var(--sand);
  border-bottom: 1px solid var(--line);
}

.banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: center 65%;
}

@media (min-width: 48em) {
  .banner img {
    aspect-ratio: 5 / 1;
    /* A fixed ratio keeps growing on a wide monitor, so cap the height and
       let the crop widen instead. It stays a band, never a hero. */
    max-height: 220px;
  }
}

/* Main content */

main { padding: 1.5rem 0 2.5rem; }

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.lead { font-size: 1.2rem; }

.intro { margin-bottom: 2rem; }

.button {
  display: inline-block;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  background: var(--teal);
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.button:hover { background: var(--teal-dark); }

/* Support banner */

.support {
  background: var(--support);
  border: 2px solid var(--support-line);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 2rem 0;
}

.support h2 { margin-top: 0; }

.support-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.support-list li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--support-line);
}

.support-name {
  display: block;
  font-weight: 700;
}

.support-number {
  display: inline-block;
  min-height: 44px;
  padding: 0.35rem 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.support-note {
  display: block;
  color: var(--ink-soft);
}

/*
 * Category pills — the way into the listings, used both for the jump links
 * at the top of the listings page and the "Have a look around" links on the
 * home page. One definition, so the two can't drift apart. The shape matches
 * the current-page pill in the nav bar.
 */

.jump {
  margin: 1.5rem 0 2rem;
  padding: 1.1rem 1.25rem;
  background: var(--sand);
  border-radius: 8px;
}

.jump-label {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.jump ul,
.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.jump a,
.category-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.5rem 1.2rem;
  background: var(--card);
  border: 2px solid var(--teal);
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.jump a:hover,
.category-links a:hover {
  background: var(--teal);
  color: #fff;
}

/*
 * The count beside the name: lighter, smaller and in the muted slate, so it
 * reads as a quiet aside rather than part of the category's name.
 */

.count {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.category-links a:hover .count {
  color: var(--teal-pale);
}

/* Search box on the listings page */

.search {
  margin: 0 0 1rem;
}

.search-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.search input {
  flex: 1 1 16rem;
  min-width: 0;
  min-height: 52px;
  padding: 0.6rem 0.9rem;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: inherit;
  font-size: 1.1rem;
}

.search input:focus {
  border-color: var(--teal);
  outline: 3px solid var(--support-line);
  outline-offset: 1px;
}

.search button {
  min-height: 52px;
  padding: 0.6rem 1.6rem;
  background: var(--teal);
  border: 2px solid var(--teal);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.search button:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.search button:focus-visible {
  outline: 3px solid var(--support-line);
  outline-offset: 2px;
}

/* Empty when nothing is being filtered, so it takes no room. */

.search-count:empty {
  margin: 0;
}

.search-count {
  margin: 0 0 1rem;
}

.search-empty {
  margin: 1rem 0 2rem;
  padding: 1.25rem;
  background: var(--sand);
  border-radius: 8px;
}

.search-empty p { margin: 0 0 1rem; }

.search-empty p:last-child { margin-bottom: 0; }

/*
 * Category headings — set larger and in the deep teal, on a pale teal band
 * with a solid left edge, so each one reads as the start of a section rather
 * than as another line of the list.
 */

.category > h2 {
  margin: 2.75rem 0 0.5rem;
  padding: 0.55rem 1rem;
  font-size: 1.6rem;
  color: var(--teal-dark);
  background: var(--teal-pale);
  border-left: 5px solid var(--teal);
  border-radius: 0 6px 6px 0;
}

/* The first heading already has the jump links above it. */

.category:first-of-type > h2 {
  margin-top: 1.75rem;
}

/* Listings — one row per entry, separated by a hairline rather than boxed */

.listings {
  list-style: none;
  margin: 0;
  padding: 0;
}

.listing {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.listing h3 {
  margin: 0;
  font-size: 1.2rem;
}

.listing-description {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
}

.listing-facts {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.listing-facts li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  align-items: baseline;
}

.fact-label {
  flex: 0 0 5rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.fact-value {
  min-width: 0;
  overflow-wrap: break-word;
}

.listing-facts a {
  display: inline-block;
  min-height: 44px;
}

/* Footer */

.site-footer {
  background: var(--sand);
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  color: var(--ink-soft);
}

.site-footer p { margin: 0 0 0.5rem; }

/* Wider screens */

@media (min-width: 40em) {
  h1 { font-size: 2.2rem; }
}

/* Wide screens: use the extra room for the lists, not for longer lines. */

@media (min-width: 60em) {
  .header-inner {
    padding: 1rem 2rem;
  }

  .support-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }
}

/* Name on the left, facts on the right, so every row starts in the same
   place and a sparse entry doesn't leave an obvious gap. */

@media (min-width: 48em) {
  .listing {
    display: grid;
    grid-template-columns: minmax(14rem, 2fr) 3fr;
    gap: 0 2rem;
    align-items: start;
  }

  .listing-facts {
    margin-top: 0;
  }
}
