/* regionaldirectory.us — ported production palette and layout.
   Blue banner + red stripe + grey breadcrumb bar + blue sidebar + white main,
   920px max-width panel centered on a grey (#999) body. Arial throughout.
   Typography values are taken directly from the old region.css. */

:root {
  --brand-blue: #0000cc;
  --brand-red:  #cc0000;
  --grey-bar:   #cccccc;
  --grey-soft:  #eeeeee;
  --page-bg:    #999999;
  --muted:      #555555;
  --border:     #dddddd;
  --panel-w:    920px;
  --sidebar-w:  176px;
  --gap:        8px;
}

* { box-sizing: border-box; }
html { overflow-y: scroll; }

body {
  font: 15px/1.5 arial, sans-serif;
  background: var(--page-bg);
  color: #222;
  margin: 0;
  min-width: 350px;
}

form { margin: 0; padding: 0; }

/* --- panel frame --------------------------------------------------------- */

.site-panel {
  max-width: var(--panel-w);
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(0,0,0,0.35);
}

.row { display: flex; align-items: stretch; }

/* top banner: blue logo cell + white title cell */
.row-header { min-height: 52px; }
.cell-logo {
  flex: 0 0 var(--sidebar-w);
  background: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px 4px;
}
.cell-logo a { display: inline-flex; align-items: center; text-decoration: none; }
.cell-logo img { max-width: 160px; max-height: 48px; height: auto; border: 0; }

/* Listing-detail pages (/<state>/<link_id>.htm) have no cell-title, so the
   blue logo bar spans the full panel width and centers the logo inside it. */
.listing-page .cell-logo { flex: 1 1 100%; }
.cell-logo-text {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  padding: 0 6px;
}

.cell-title {
  flex: 1;
  background: #ffffff;
  padding: 6px 16px;
  display: flex;
  align-items: center;
}
.brand-title {
  font-size: 27px;
  line-height: 36px;
  font-weight: 700;
  color: #000;
  margin: 0;
}

/* red stripe divider */
.row-red {
  background: var(--brand-red);
  height: 6px;
}
.row-red-bot { height: 6px; }

/* breadcrumb row */
.row-breadcrumb { background: var(--grey-bar); }
.cell-spacer {
  flex: 0 0 var(--sidebar-w);
  background: var(--grey-bar);
}
.cell-breadcrumb {
  flex: 1;
  padding: 4px 16px;
  font-size: 16px;
  line-height: 28px;
  min-height: 36px;
  color: #000;
  background: var(--grey-bar);
}
.cell-breadcrumb a { color: var(--brand-blue); text-decoration: none; }
.cell-breadcrumb a:hover { text-decoration: underline; }

/* Small "Regional Directory" map icon at the start of every breadcrumb.
   Matches region.css's .y class (35x20 desktop, 42x24 mobile). */
.breadcrumb-icon {
  height: 20px;
  width: 35px;
  vertical-align: middle;
  margin-right: 6px;
  border: 0;
}
@media (max-width: 939px) {
  .breadcrumb-icon { height: 24px; width: 42px; }
}

/* body row: blue sidebar + white main */
.row-body { min-height: 400px; }

.cell-sidebar {
  flex: 0 0 var(--sidebar-w);
  background: var(--brand-blue);
  color: #fff;
  padding: 16px 8px;
  text-align: center;
}
.cell-sidebar a { color: #fff; text-decoration: none; }
.cell-sidebar a:hover { text-decoration: underline; }
.cell-sidebar img { max-width: 160px; height: auto; border: 0; }
.sidebar-cta {
  color: #fff;
  font-size: 15px;
  line-height: 20px;
  margin: 10px 4px;
}
.submit-btn-text {
  display: inline-block;
  background: #fff;
  color: var(--brand-blue);
  font-weight: 700;
  padding: 8px 10px;
  font-size: 14px;
}

.cell-main {
  flex: 1;
  background: #ffffff;
  padding: 16px 20px 24px 20px;
  overflow: hidden;
}

/* footer */
.site-footer {
  background: var(--grey-bar);
  color: #333;
  font-size: 13px;
  line-height: 17px;
  text-align: center;
  padding: 10px 16px;
}
.site-footer a { color: var(--brand-blue); }
.site-footer .footer-links { margin-bottom: 4px; font-weight: 600; }
.site-footer .footer-copy  { font-size: 12px; color: #555; }

/* Auth + submit forms (/account/, /register/, /submit-listing/) */
.submit-form label { display: block; margin: 10px 0; font-weight: 600; }
.submit-form label em { font-weight: normal; color: #666; }
.submit-form input[type="text"],
.submit-form input[type="email"],
.submit-form input[type="password"],
.submit-form input[type="tel"],
.submit-form input[type="url"],
.submit-form select,
.submit-form textarea {
  font-size: 14px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-weight: normal;
}
.submit-form .req { color: #c00; }
.submit-form .field-hint { margin: -8px 0 4px 0; font-size: 13px; color: #666; }
.submit-form label.agree { display: block; margin: 14px 0; font-weight: normal; text-align: left; }
.submit-form label.agree input[type="checkbox"] { margin-right: 8px; vertical-align: middle; }
.submission-details { margin: 16px 0; border-collapse: collapse; font-size: 14px; }
.submission-details th,
.submission-details td { padding: 4px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #eee; }
.submission-details th { width: 180px; color: #666; font-weight: 600; white-space: nowrap; }
.submit-form .button {
  background: var(--brand-blue); color: #fff; border: 0;
  padding: 8px 20px; font-size: 15px; cursor: pointer; border-radius: 3px;
}
.submit-form .button:hover { opacity: 0.9; }

/* --- typography (ported from region.css) -------------------------------- */

.cell-main h1 { font-size: 27px; line-height: 36px; margin: 0 0 12px 0; color: #000; }
.cell-main h2 { font-size: 16px; line-height: 21px; margin: 20px 0 8px 0; color: #000;
                border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.cell-main h3 { font-size: 16px; line-height: 21px; margin: 16px 0 6px 0; }
.cell-main h4 { font-size: 15px; line-height: 20px; margin: 12px 0 4px 0; }
.cell-main p  { margin: 0.5em 0; }
.cell-main a  { color: var(--brand-blue); }

/* --- shared content components ------------------------------------------ */

.lede, .category-definition, .category-summary,
.state-summary, .city-summary, .county-summary {
  font-size: 16px;
  color: #333;
}
.category-definition { font-style: italic; }

.sub-menu {
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  margin: 4px 0 12px 0;
}
.sub-menu a { text-decoration: none; }
.sub-menu a:hover { text-decoration: underline; }

/* AdSense slot wrappers. Centered, with a visible placeholder in dev. */
.ad-slot { text-align: center; margin: 10px 0; clear: both; }
.ad-slot-728x90  { min-height: 90px; }
.ad-slot-300x600 { min-height: 600px; }
.ad-slot-160x600 { min-height: 600px; }

/* Production .s/.i/.t search-box classes (values from region.css desktop rule). */
.s {
  font-size: 18px;
  height: 30px;
  line-height: 24px;
  margin: 0;
  text-align: center;
}
input.i {
  font-size: 18px;
  height: 28px;
  line-height: 24px;
  margin: 0;
  padding: 0;
  width: calc(100% - 105px);
}
input.t {
  font-size: 18px;
  height: 28px;
  line-height: 24px;
  margin: 0;
  padding: 0;
  width: 100px;
}
@media (max-width: 939px) {
  input.i {
    font-size: 24px;
    height: 36px;
    line-height: 32px;
    width: calc(100% - 108px);
  }
  input.t {
    font-size: 24px;
    height: 36px;
    line-height: 36px;
    width: 100px;
  }
  .s {
    font-size: 24px;
    height: 36px;
    line-height: 32px;
  }
}

.submit-cta {
  background: var(--grey-soft);
  padding: 6px 12px;
  border: 1px solid var(--border);
  margin: 8px 0 14px 0;
  font-size: 14px;
}
.submit-cta a { font-weight: 700; }

/* state / parent lists */
.state-list, .parent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 3;
  column-gap: 24px;
}
.state-list li, .parent-list li {
  margin: 0.25em 0;
  break-inside: avoid;
}
.state-count, .listing-count {
  color: var(--muted);
  font-size: 0.9em;
  margin-left: 0.3em;
}

/* category-home state menu — explicit 2-column table, 50/50 split of main width */
.state-menu-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 22px;
  margin: 8px 0;
}
.state-menu-col {
  width: 50%;
  vertical-align: top;
  padding: 0 8px;
}
.state-menu-col a { display: inline-block; padding: 1px 0; }

/* Account dashboard — pending/recent submissions table.
   Matches admin/admin_layout.css's table.admin-table look. */
.account-submissions { width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--border); margin: 8px 0 16px; font-size: 13px; }
.account-submissions th,
.account-submissions td { padding: 6px 10px; border-bottom: 1px solid #eee;
  text-align: left; vertical-align: top; }
.account-submissions th { background: #e9e9e9; font-weight: bold; }
.account-submissions .col-title     { width: 16%; }
.account-submissions .col-address   { width: 22%; }
.account-submissions .col-category  { width: 14%; }
.account-submissions .col-status    { width: 10%; white-space: nowrap; }
.account-submissions .col-submitted { width: 10%; white-space: nowrap; }
.account-submissions .col-paid      { width: 11%; white-space: nowrap; }
.account-submissions .col-note      { width: 17%; color: #555; }
.account-submissions .paypal-cell   { min-width: 110px; }
.account-submissions .pp-err        { color: #c00; font-size: 12px; margin: 4px 0 0; }

/* Sidebar nav on /account/ pages */
.account-nav { list-style: none; padding: 0; margin: 16px 0 0; }
.account-nav li { margin: 6px 0; }
.account-nav a { color: #fff; text-decoration: none; }
.account-nav a:hover { text-decoration: underline; }

/* Profile sections */
.profile-section { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 8px; }
.profile-section:first-of-type { border-top: 0; margin-top: 0; }
.profile-section h2 { margin: 12px 0; }

/* Account landing links */
.account-landing { list-style: disc; padding-left: 22px; margin: 16px 0; }
.account-landing li { margin: 10px 0; }
.account-landing a { font-weight: 600; }

/* listings */
.listings {
  list-style: none;
  padding: 0;
  counter-reset: item;
}
.listings .listing {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.listings .listing:last-child { border-bottom: 0; }

.listing-title {
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  color: var(--brand-blue);
}
.listing-title:hover { text-decoration: underline; }

.listing-address, .listing-phone {
  font-size: 14px;
  color: #444;
  margin-top: 2px;
}

/* featured groups — the curated home-page category grid */
.featured-groups { margin-top: 16px; }
.featured-group-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 20px;
}
.featured-group { break-inside: avoid; }
.featured-group-title {
  font-size: 16px;
  margin: 0 0 2px 0;
  color: var(--brand-blue);
  font-weight: 700;
}
.featured-group-title a { color: var(--brand-blue); text-decoration: none; }
.featured-group-title a:hover { text-decoration: underline; }
.featured-group-members {
  list-style: none;
  margin: 0 0 0 16px;
  padding: 0;
  font-size: 14px;
  line-height: 20px;
}
.featured-group-members li { margin: 0; }
.featured-group-members .featured-group-more {
  color: var(--muted);
  letter-spacing: 2px;
}

/* per-category state page: two-column listings table + state hero + adjacent */
.state-hero { text-align: center; margin: 8px 0 12px 0; }
.state-hero img { max-width: 360px; height: auto; border: 0; }

.listings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 22px;
  margin: 8px 0;
}
.listings-table td { padding: 6px 8px; vertical-align: top; }
.listings-table hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

.listing-cell  { width: 50%; }
.listing-tags  { width: 50%; font-size: 14px; line-height: 18px; color: #444; }
.listing-tags ul.l { list-style: disc; margin: 0 0 0 20px; padding: 0; }
.listing-tags ul.l li { margin: 0; }

.listings-table .d { font-size: 13px; color: #555; margin-top: 2px; }
.listings-table .c { font-size: 13px; color: #555; margin-top: 2px; }

/* related-web section (bullet list + chosensites image on right) */
.related-web-table {
  width: 100%;
  margin-top: 10px;
}
.related-web-col {
  width: 440px;
  padding-right: 40px;
}
.related-web-col ul { padding-left: 24px; margin: 0; }
.related-web-col .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.related-web-image img { max-width: 240px; height: auto; border: 0; }

/* related-pages thumbnail grid */
.related-pages {
  width: 100%;
  border-collapse: separate;
  border-spacing: 12px 4px;
  margin-top: 8px;
}
.related-pages th.f {
  padding: 4px 8px;
  text-align: center;
  font-weight: normal;
  vertical-align: top;
}
.related-pages th.f a {
  font-weight: 700;
  text-decoration: none;
}
.related-pages th.f a:hover { text-decoration: underline; }
.related-pages th.f img {
  max-width: 100%;
  height: auto;
  border: 0;
  margin: 0 auto 4px auto;
  display: block;
}

/* adjacent / directory-and-map / bottom footnote (per-category state) */
h3.e { margin-top: 20px; font-size: 16px; line-height: 22px; }
ul.menu, ul.c {
  list-style: none;
  padding: 0;
  margin: 4px 0;
}
ul.menu li.f, ul.c li.f {
  margin: 4px 0;
  font-size: 15px;
}
.listing-footnote {
  text-align: center;
  font-size: 13px;
  color: #333;
  margin-top: 10px;
}

/* /states.htm — State Pages Menu (3-column table matching production) */
.states-menu {
  margin: 18px 0;
}
.states-menu-header {
  background: #eeeeee;
  text-align: center;
  padding: 4px 8px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.states-menu-header h2 { margin: 0; font-size: 16px; line-height: 21px; border: 0; padding: 0; }
.states-menu-stripe { background: var(--brand-red); height: 6px; }
.states-menu-grid {
  width: 100%;
  table-layout: fixed;
}
.states-menu-col { vertical-align: top; padding: 10px 14px; font-weight: bold; }
.states-menu-col ul.v { list-style-type: disc; margin: 0 0 0 20px; padding: 0; font-weight: normal; }
.states-menu-col ul.v li { margin: 0.2em 0; }
.states-menu-divider { width: 3px; background: #cccccc; }
.states-menu-caption {
  text-align: center;
  font-size: 15px;
  margin: 12px 0;
}

/* Narrow screens: the 3-column Manufacturer / Retail / State menu table
   collapses into stacked blocks so long category labels ("Cutting Tools",
   "Outdoor Furniture", "Landscape Architects") stop overlapping. */
@media (max-width: 800px) {
  .states-menu-grid,
  .states-menu-grid > tbody,
  .states-menu-grid > tbody > tr,
  .states-menu-col {
    display: block;
    width: auto;
  }
  .states-menu-col { padding: 8px 14px; }
  .states-menu-divider { display: none; }

  .state-menu-table,
  .state-menu-table > tbody,
  .state-menu-table > tbody > tr,
  .state-menu-col {
    display: block;
    width: auto;
  }
  .state-menu-col { padding: 6px 0; }
}
.states-locator-caption {
  text-align: center;
  font-size: 15px;
  color: #333;
  margin: 14px 0;
}

/* state-page categories menu (3-column table-like layout matching production) */
.categories-menu {
  clear: right;
  margin: 24px 0 18px 0;
  border: 0;
}
.categories-menu-header {
  background: #eeeeee;
  text-align: center;
  padding: 4px 8px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.categories-menu-header h2 { margin: 0; font-size: 16px; line-height: 21px; border: 0; padding: 0; }
.categories-menu-header h2 a { color: #000; text-decoration: none; }
.categories-menu-header h2 a:hover { text-decoration: underline; }
.categories-menu-stripe {
  background: var(--brand-red);
  height: 6px;
}
.categories-menu-grid {
  columns: 3;
  column-gap: 16px;
  column-rule: 3px solid #cccccc;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
}
.categories-menu-grid .category-group {
  break-inside: avoid;
  margin: 0;
}
.category-group-title {
  font-weight: bold;
  margin-top: 8px;
  color: #000;
}
.categories-menu-grid ul.v {
  list-style: none;
  padding: 0;
  margin: 2px 0 4px 16px;
  font-size: 15px;
  line-height: 20px;
}
.categories-menu-grid ul.v li { margin: 0; }
.categories-menu-grid ul.v a { color: var(--brand-blue); }

/* state page map icon (right-aligned at top of root_state) */
.state-map-icon {
  float: right;
  margin: 0 0 12px 20px;
  max-width: 360px;
  height: auto;
  border: 2px solid var(--brand-blue);
}

.state-intro,
.state-demographics,
.state-land,
.state-employment {
  font-size: 16px;
  line-height: 24px;
  margin: 12px 0;
}

.major-cities { margin-top: 20px; }
.major-cities ul { list-style: none; padding: 0; margin: 6px 0; }
.major-cities li { margin: 2px 0; }
.major-cities-footnote {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* adjacent states / related boxes */
.adjacent-states, .search-related, .about-related {
  margin-top: 24px;
  padding: 10px 14px;
  background: var(--grey-soft);
  border: 1px solid var(--border);
}
.adjacent-states ul,
.search-related .related-list,
.about-related .related-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
}
.adjacent-states li { display: inline-block; margin-right: 14px; }

/* floating hero images — home "US map", states page "fifty-states", etc. */
.us-map {
  float: right;
  margin: 0 0 12px 20px;
  display: inline-block;
}
.us-map img {
  max-width: 360px;
  height: auto;
  border: 0;
}

.page-tagline {
  text-align: center;
  margin: 20px 0 6px 0;
  font-size: 15px;
  color: #333;
}

.about-regional-directory,
.about-states {
  clear: none;
}
.about-regional-directory::after,
.about-states::after {
  content: "";
  display: block;
  clear: both;
}

/* category home hero image — centered block on desktop + mobile */
.category-hero {
  text-align: center;
  margin: 12px 0;
}
.category-hero img {
  max-width: 360px;
  height: auto;
  border: 2px solid var(--brand-blue);
}

/* about page */
.about-hero { text-align: center; margin: 14px 0; }
.about-hero img { max-width: 100%; height: auto; }
.about-intro { font-size: 16px; }

/* search page */
.search-box { margin: 14px 0; }

/* --- responsive (mobile collapse) -------------------------------------- */

@media (max-width: 939px) {
  .brand-title { font-size: 22px; line-height: 28px; }
  .featured-group-grid { grid-template-columns: repeat(2, 1fr); }
  .state-list, .parent-list { columns: 2; }
  /* .category-hero is already centered */
}
@media (max-width: 560px) {
  .featured-group-grid { grid-template-columns: 1fr; }
  .state-list, .parent-list, .category-list { columns: 1; }
}
