/* SocialAtoZ header.
   Self-contained and namespaced under .sn-header / .sn-cats / .sn-search so it does not
   depend on, or fight with, Bootstrap's navbar or the older theme.css header rules. */

.sn-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid #ececf1;
}

.sn-header__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.sn-header__brand { flex: none; display: inline-flex; align-items: center; }
.sn-header__brand img { display: block; width: 200px; height: auto; }

.sn-header__nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  min-width: 0;
}

.sn-header__links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  flex: none;
}

.sn-header__links > li { margin: 0; }

.sn-header__links a {
  text-decoration: none;
  white-space: nowrap;
}

/* Colour and weight are scoped away from .sn-btn. A bare `.sn-header__links a` selector scores
   (0,1,1) and beats `.sn-btn--ghost` / `.sn-btn--solid` at (0,1,0), which repainted both button
   labels dark: the ghost button lost its blue text, and the solid button rendered dark navy on
   its blue fill. */
.sn-header__links a:not(.sn-btn) {
  color: #2b2b35;
  font-size: 15px;
  font-weight: 500;
}

/* :not(.sn-btn) matters. `.sn-header__links a:hover` scores (0,2,1) and would otherwise beat
   `.sn-btn--ghost:hover` / `.sn-btn--solid:hover` at (0,2,0), repainting the button label blue
   on top of the blue hover background. */
.sn-header__links a:not(.sn-btn):hover { color: #3e7bfa; }

.sn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.sn-btn--ghost { border: 1.5px solid #3e7bfa; color: #3e7bfa; }
.sn-btn--ghost:hover { background: #3e7bfa; color: #fff; }
.sn-btn--solid { background: #3e7bfa; color: #fff; border: 1.5px solid #3e7bfa; }
.sn-btn--solid:hover { background: #2f63d4; border-color: #2f63d4; color: #fff; }

/* Categories -------------------------------------------------------------- */

.sn-cats { position: static; flex: none; }

.sn-cats__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #2b2b35;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.sn-cats__trigger:hover { background: #f4f6fb; color: #3e7bfa; }
.sn-cats__trigger[aria-expanded="true"] { background: #f4f6fb; color: #3e7bfa; }
.sn-cats__chev { transition: transform .18s ease; }
.sn-cats__trigger[aria-expanded="true"] .sn-cats__chev { transform: rotate(180deg); }

.sn-cats__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid #ececf1;
  box-shadow: 0 18px 40px rgba(16, 24, 40, .14);
  padding: 22px 0 0;
  z-index: 1040;
  /* Cap the panel and scroll the groups instead of the whole thing, so the
     "browse all categories" action stays visible rather than falling below the fold. */
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 68px);
}

.sn-cats__panel[hidden] { display: none; }

/* width:100% matters because the panel is a column flexbox: without it these rows are
   flex items with auto side margins, which shrink them to their content width. */
.sn-cats__filter,
.sn-cats__groups,
.sn-cats__foot,
.sn-cats__empty {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
}

.sn-cats__filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.sn-cats__filter svg { color: #8a8a9e; flex: none; }

.sn-cats__filter input {
  flex: 1 1 auto;
  height: 42px;
  border: 1.5px solid #e3e6ef;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}

.sn-cats__filter input:focus { border-color: #3e7bfa; }

.sn-cats__groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 28px;
  padding-bottom: 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.sn-cats__filter { flex: none; }

.sn-cats__group-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8a8a9e;
  margin: 0 0 8px;
}

.sn-cats__group ul { list-style: none; margin: 0 0 14px; padding: 0; }
.sn-cats__group li { margin: 0 0 2px; }

.sn-cats__group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: #444458;
  text-decoration: none;
}

.sn-cats__group a:hover { background: #f4f6fb; color: #3e7bfa; }

.sn-cats__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sn-cats__count {
  flex: none;
  min-width: 26px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #8a8a9e;
  background: #f1f3f8;
  border-radius: 20px;
  padding: 1px 7px;
}

.sn-cats__empty { padding-bottom: 18px; color: #666; font-size: 14px; }

.sn-cats__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #ececf1;
  padding-top: 14px;
  padding-bottom: 16px;
  font-size: 14px;
  color: #7a7a8c;
  flex: none;
  background: #fff;
}

.sn-cats__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  background: #3e7bfa;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sn-cats__all:hover { background: #2f63d4; color: #fff; text-decoration: none; }

/* Search ------------------------------------------------------------------ */

.sn-search { position: relative; flex: 1 1 320px; max-width: 420px; min-width: 0; }
.sn-search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8a8a9e; pointer-events: none; }

.sn-search input {
  width: 100%;
  height: 42px;
  border: 1.5px solid #e3e6ef;
  border-radius: 8px;
  padding: 0 14px 0 34px;
  font-size: 15px;
  background: #fafbfd;
  outline: none;
}

.sn-search input:focus { border-color: #3e7bfa; background: #fff; }

.sn-search__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ececf1;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(16, 24, 40, .12);
  padding: 6px;
  z-index: 1050;
}

.sn-search__results[hidden] { display: none; }
.sn-search__results .search_item { margin: 0; }

.sn-search__results .search_item a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: #2b2b35;
  text-decoration: none;
}

.sn-search__results .search_item a:hover { background: #f4f6fb; color: #3e7bfa; }
.sn-search__results .search_no_found { margin: 0; padding: 10px; font-size: 14px; color: #8a8a9e; }

/* Burger + scrim ---------------------------------------------------------- */

.sn-header__burger {
  display: none;
  flex: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 11px 10px;
}

.sn-header__burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #2b2b35;
  transition: transform .2s ease, opacity .2s ease;
}

.sn-header__burger span + span { margin-top: 5px; }
.sn-header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sn-header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sn-header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sn-header__scrim { position: fixed; inset: 68px 0 0; background: rgba(16, 24, 40, .35); z-index: 1020; }
.sn-header__scrim[hidden] { display: none; }

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1199px) {
  .sn-cats__groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sn-search { flex-basis: 220px; }
}

@media (max-width: 991px) {
  .sn-header__burger { display: block; }

  .sn-header__nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    background: #fff;
    border-top: 1px solid #ececf1;
    box-shadow: 0 18px 40px rgba(16, 24, 40, .14);
    padding: 16px 20px 22px;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    z-index: 1040;
  }

  .sn-header__nav.is-open { display: flex; }

  .sn-search { max-width: none; flex: none; order: -1; }

  .sn-cats { width: 100%; }
  .sn-cats__trigger { width: 100%; justify-content: space-between; height: 46px; padding: 0 14px; background: #f4f6fb; }

  /* On mobile the panel is an inline accordion rather than a dropdown overlay. The desktop
     cap + inner scroll are undone here, otherwise the groups scroll inside the nav that is
     already scrolling and you get nested scrollbars. */
  .sn-cats__panel {
    position: static;
    box-shadow: none;
    border-top: 0;
    padding: 14px 0 0;
    display: block;
    max-height: none;
  }

  .sn-cats__groups { overflow: visible; }

  .sn-cats__filter,
  .sn-cats__groups,
  .sn-cats__foot,
  .sn-cats__empty { padding-left: 0; padding-right: 0; }

  .sn-cats__groups { grid-template-columns: 1fr; gap: 4px; }
  .sn-cats__foot { flex-direction: column; align-items: flex-start; gap: 10px; }

  .sn-header__links { flex-direction: column; align-items: stretch; gap: 10px; margin: 4px 0 0; }
  .sn-header__links a { padding: 6px 0; }
  .sn-btn { width: 100%; height: 46px; }
}

@media (max-width: 575px) {
  .sn-header__brand img { width: 160px; }
  .sn-header__bar { min-height: 60px; }
  .sn-header__scrim { top: 60px; }
  .sn-header__nav { max-height: calc(100vh - 60px); }
}

/* 404 ---------------------------------------------------------------------
   The theme had no 404.php at all, so this styles the new one. */

.sn-404 { padding: 64px 0 80px; text-align: center; }
.sn-404__code { font-size: 68px; line-height: 1; font-weight: 700; color: #3e7bfa; margin: 0 0 8px; }
.sn-404__title { font-size: 32px; font-weight: 700; color: #2b2b35; margin: 0 0 12px; }
.sn-404__lead { max-width: 560px; margin: 0 auto 28px; color: #6b6b7d; font-size: 16px; line-height: 1.6; }

.sn-404__search { display: flex; gap: 8px; max-width: 520px; margin: 0 auto 24px; }
.sn-404__search input {
  flex: 1 1 auto; height: 46px; border: 1.5px solid #e3e6ef; border-radius: 8px;
  padding: 0 14px; font-size: 15px; outline: none;
}
.sn-404__search input:focus { border-color: #3e7bfa; }
.sn-404__search button {
  flex: none; height: 46px; padding: 0 22px; border: 0; border-radius: 8px;
  background: #3e7bfa; color: #fff; font-weight: 600; font-size: 15px; cursor: pointer;
}
.sn-404__search button:hover { background: #2f63d4; }

.sn-404__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }

.sn-404__popular h2 { font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a8a9e; margin: 0 0 16px; }
.sn-404__popular ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sn-404__popular a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid #e3e6ef; border-radius: 999px; font-size: 14px; color: #444458; text-decoration: none;
}
.sn-404__popular a:hover { border-color: #3e7bfa; color: #3e7bfa; }
.sn-404__popular a span { font-size: 12px; font-weight: 600; color: #8a8a9e; background: #f1f3f8; border-radius: 999px; padding: 1px 7px; }

/* WordPress's conventional visually-hidden helper; the theme did not define one. */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 575px) {
  .sn-404 { padding: 44px 0 56px; }
  .sn-404__code { font-size: 54px; }
  .sn-404__title { font-size: 25px; }
  .sn-404__search { flex-direction: column; }
  .sn-404__search button { width: 100%; }
}

/* All-categories filter ---------------------------------------------------
   ~2,900 terms render on that page; without a filter it is unusable. */

.sn-catfilter { margin: 4px 0 26px; }

.sn-catfilter__field { position: relative; display: flex; align-items: center; max-width: 520px; }
.sn-catfilter__field > svg { position: absolute; left: 13px; color: #8a8a9e; pointer-events: none; }

.sn-catfilter__field input {
  width: 100%; height: 46px; border: 1.5px solid #e3e6ef; border-radius: 8px;
  padding: 0 40px 0 36px; font-size: 15px; outline: none;
}
.sn-catfilter__field input:focus { border-color: #3e7bfa; }

.sn-catfilter__clear {
  position: absolute; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: #f1f3f8; color: #6b6b7d; font-size: 18px; line-height: 1; cursor: pointer;
}
.sn-catfilter__clear:hover { background: #e3e6ef; color: #2b2b35; }
.sn-catfilter__clear[hidden] { display: none; }

.sn-catfilter__count { margin: 10px 0 0; font-size: 14px; color: #6b6b7d; min-height: 20px; }
.sn-catfilter__empty { margin: 24px 0; font-size: 15px; color: #6b6b7d; }
.sn-catfilter__empty[hidden] { display: none; }

/* Heading-level corrections -----------------------------------------------
   Category pages skipped levels (h1 -> h3, and an h5 appearing after h2s), and the
   Buyer's Guide -- the page's main written content -- was an h3 sitting below the
   product list. The tags are now correct; these classes preserve the previous sizing
   so the fix is structural only, with no visual change. */

.sn-section-heading { font-size: 28px; font-weight: 500; }
.sn-panel-heading   { font-size: 18px; font-weight: 500; }
.sn-card-heading    { font-size: 20px; font-weight: 500; }

@media (max-width: 575px) {
  .sn-section-heading { font-size: 23px; }
}

/* Category comparison table ------------------------------------------------
   The site previously had no <table> anywhere, although comparison is the whole
   point of a software directory. Tabular data is also what gets lifted into AI
   answers and featured snippets. */

.sn-ct { margin: 8px 0 36px; }
.sn-ct__title { margin: 0 0 6px; }
.sn-ct__lead { margin: 0 0 16px; color: #6b6b7d; font-size: 15px; }

/* The table scrolls inside its own box so a narrow screen never scrolls the page sideways. */
.sn-ct__scroll { overflow-x: auto; border: 1px solid #e9ecf3; border-radius: 10px; }

.sn-ct__table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; background: #fff; }

.sn-ct__table thead th {
  text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #6b6b7d; background: #f7f9fc;
  padding: 12px 14px; border-bottom: 1px solid #e9ecf3; white-space: nowrap;
}

.sn-ct__table tbody td,
.sn-ct__table tbody th { padding: 13px 14px; border-bottom: 1px solid #f1f3f8; vertical-align: middle; text-align: left; }
.sn-ct__table tbody tr:last-child td,
.sn-ct__table tbody tr:last-child th { border-bottom: 0; }
.sn-ct__table tbody tr:hover { background: #fafbfd; }

.sn-ct__name { font-weight: 600; min-width: 210px; }
.sn-ct__name a { color: #2b2b35; text-decoration: none; }
.sn-ct__name a:hover { color: #3e7bfa; }
.sn-ct__tag { display: block; font-weight: 400; font-size: 12.5px; color: #8a8a9e; margin-top: 2px; }

.sn-ct__yes { color: #16a34a; font-weight: 700; }
.sn-ct__no { color: #c3c3d0; }
.sn-ct__muted { color: #a3a3b3; }

@media (max-width: 575px) {
  .sn-ct__table { font-size: 13px; }
  .sn-ct__name { min-width: 170px; }
}
