.mth-brand-page,
.mth-brand-page * {
  box-sizing: border-box;
}

.mth-brand-page {
  --mth-card-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  --mth-card-shadow-hover: 0 10px 26px rgba(0, 0, 0, 0.12);
  max-width: var(--mth-max-width);
  margin: 0 auto 30px;
  color: var(--mth-black);
  font-size: 15px;
}

.mth-brand-page.mth-no-shadow {
  --mth-card-shadow: none;
  --mth-card-shadow-hover: none;
}

.mth-brand-page a,
.mth-brand-page button,
.mth-brand-page input {
  transition: border-color .18s ease, color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}

.mth-brand-hero {
  position: relative;
  min-height: var(--mth-hero-height);
  padding: 52px 48px;
  border: 1px solid var(--mth-light-gray);
  border-radius: var(--mth-radius);
  background: var(--mth-white);
  overflow: hidden;
  isolation: isolate;
}

.mth-brand-hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--mth-hero-image);
  background-position: var(--mth-hero-position);
  background-size: cover;
  background-repeat: no-repeat;
  opacity: var(--mth-hero-opacity);
  filter: grayscale(var(--mth-hero-grayscale)) blur(var(--mth-hero-blur));
  transform: scale(1.02);
  z-index: -2;
}

.mth-brand-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,var(--mth-hero-fade)) 48%, rgba(255,255,255,.70) 100%);
  z-index: -1;
}

.mth-brand-hero__content {
  max-width: 620px;
}

.mth-brand-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--mth-black);
}

.mth-brand-hero p {
  max-width: 520px;
  margin: 0 0 24px;
  font-size: 19px;
  line-height: 1.45;
  color: var(--mth-dark-gray);
}

.mth-brand-search {
  position: relative;
  max-width: 560px;
}

.mth-brand-search input {
  width: 100%;
  height: 58px;
  padding: 0 52px 0 56px;
  border: 2px solid var(--mth-primary);
  border-radius: var(--mth-radius);
  background: rgba(255,255,255,.94);
  color: var(--mth-black);
  font-size: 16px;
  outline: none;
  box-shadow: 0 8px 24px rgba(0, 155, 58, 0.10);
}

.mth-brand-search input:focus {
  box-shadow: 0 0 0 4px rgba(0, 155, 58, 0.14), 0 8px 24px rgba(0, 155, 58, 0.12);
}

.mth-search-icon {
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mth-dark-gray);
  font-size: 18px;
  line-height: 1;
  z-index: 2;
}

.mth-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mth-dark-gray);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.mth-search-clear.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mth-search-clear:hover {
  background: var(--mth-light-gray);
  color: var(--mth-black);
}

.mth-popular-searches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
  color: var(--mth-dark-gray);
}

.mth-popular-searches strong {
  color: var(--mth-black);
}

.mth-search-chip {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--mth-primary);
  font-weight: 600;
  cursor: pointer;
}

.mth-search-chip:hover,
.mth-search-chip:focus {
  color: var(--mth-black);
  text-decoration: underline;
}

.mth-featured-wrap,
.mth-directory,
.mth-brand-cta,
.mth-trust-bar {
  margin-top: 30px;
}

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

.mth-section-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--mth-black);
  text-transform: uppercase;
  letter-spacing: -0.015em;
}

.mth-section-head p {
  margin: 5px 0 0;
  color: var(--mth-dark-gray);
}

.mth-view-all {
  color: var(--mth-primary);
  font-weight: 700;
  white-space: nowrap;
}

.mth-view-all:hover {
  color: var(--mth-black);
}

.mth-featured-row + .mth-featured-row {
  margin-top: 28px;
}

.mth-featured-grid {
  display: grid;
  grid-template-columns: repeat(var(--mth-featured-cols), minmax(0, 1fr));
  gap: 14px;
}

.mth-brand-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--mth-light-gray);
  border-radius: var(--mth-radius);
  background: var(--mth-white);
  color: var(--mth-black);
  text-decoration: none !important;
  box-shadow: var(--mth-card-shadow);
  overflow: hidden;
}

.mth-brand-card:hover,
.mth-brand-card:focus {
  border-color: var(--mth-primary);
  color: var(--mth-black);
  box-shadow: var(--mth-card-shadow-hover);
  transform: translateY(-2px);
}

.mth-featured-card {
  min-height: 190px;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 16px 16px;
  text-align: center;
}

.mth-row-style-compact .mth-featured-card {
  min-height: 140px;
  padding: 16px;
}

.mth-row-style-text .mth-featured-card {
  min-height: 118px;
  align-items: flex-start;
  text-align: left;
}

.mth-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--mth-accent);
  color: var(--mth-black);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .025em;
}

.mth-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 72px;
  margin-bottom: 14px;
}

.mth-card-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mth-card-logo--small {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  margin: 0;
}

.mth-card-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(0, 155, 58, 0.09);
  color: var(--mth-primary);
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
}

.mth-card-initial--small {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin: 0;
  font-size: 20px;
}

.mth-card-title {
  display: block;
  width: 100%;
  color: var(--mth-black);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
}

.mth-featured-card .mth-card-title {
  margin-top: auto;
}

.mth-card-subtitle {
  display: block;
  width: 100%;
  margin-top: 6px;
  color: var(--mth-dark-gray);
  font-size: 13px;
  line-height: 1.3;
}

.mth-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 34px;
  margin-top: 14px;
  padding: 7px 13px;
  border: 1px solid var(--mth-primary);
  border-radius: calc(var(--mth-radius) * .75);
  color: var(--mth-primary);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
}

.mth-brand-card:hover .mth-card-action,
.mth-brand-card:focus .mth-card-action {
  background: var(--mth-primary);
  color: var(--mth-white);
}

.mth-directory {
  padding-top: 6px;
}

.mth-directory-head {
  align-items: flex-start;
}

.mth-result-count {
  color: var(--mth-dark-gray);
  font-weight: 700;
  white-space: nowrap;
}

.mth-az-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 20px;
  padding: 10px;
  border: 1px solid var(--mth-light-gray);
  border-radius: var(--mth-radius);
  background: rgba(255, 255, 255, .95);
}

.mth-az-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .05);
}

.mth-az-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 34px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: calc(var(--mth-radius) * .7);
  color: var(--mth-dark-gray);
  font-weight: 800;
  text-decoration: none !important;
}

.mth-az-nav a:hover,
.mth-az-nav a:focus,
.mth-az-nav a.is-active {
  background: var(--mth-primary);
  color: var(--mth-white);
}

.mth-az-nav a.is-empty {
  opacity: .35;
  pointer-events: none;
}

.mth-az-nav small {
  font-size: 10px;
  opacity: .9;
}

.mth-letter-section {
  scroll-margin-top: 80px;
  margin-bottom: 22px;
}

.mth-letter-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--mth-primary);
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
}

.mth-letter-section h3:after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: var(--mth-light-gray);
}

.mth-letter-section h3 small {
  color: var(--mth-dark-gray);
  font-size: 12px;
  font-weight: 600;
}

.mth-directory-grid {
  display: grid;
  grid-template-columns: repeat(var(--mth-directory-cols), minmax(0, 1fr));
  gap: 12px;
}

.mth-directory-card {
  min-height: 92px;
  padding: 17px 18px;
  justify-content: center;
}

.mth-directory-card .mth-card-main,
.mth-directory-card[href] {
  gap: 10px;
}

.mth-directory-card .mth-card-title {
  font-size: 15px;
}

.mth-directory-card .mth-card-subtitle {
  font-size: 12px;
}

.mth-directory-card:has(.mth-card-logo--small),
.mth-directory-card:has(.mth-card-initial--small) {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.mth-card-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mth-group-card .mth-card-main {
  width: 100%;
}

.mth-group-toggle {
  align-self: flex-start;
  margin-top: 10px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--mth-primary);
  font-weight: 800;
  cursor: pointer;
}

.mth-group-toggle:hover,
.mth-group-toggle:focus {
  color: var(--mth-black);
  text-decoration: underline;
}

.mth-group-members {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--mth-light-gray);
}

.mth-group-members a {
  color: var(--mth-primary);
  font-weight: 700;
  text-decoration: none !important;
}

.mth-group-members a:hover {
  color: var(--mth-black);
}

.mth-no-results {
  margin: 16px 0;
  padding: 18px 20px;
  border: 1px solid rgba(0, 155, 58, .25);
  border-left: 4px solid var(--mth-primary);
  border-radius: var(--mth-radius);
  background: rgba(0, 155, 58, .05);
  color: var(--mth-dark-gray);
}

.mth-no-results strong,
.mth-no-results span {
  display: block;
}

.mth-no-results strong {
  color: var(--mth-black);
  margin-bottom: 4px;
}

.mth-brand-cta {
  display: grid;
  grid-template-columns: auto minmax(200px, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 26px 32px;
  border-radius: var(--mth-radius);
  background: linear-gradient(90deg, rgba(0, 155, 58, .10), rgba(0, 155, 58, .04));
}

.mth-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--mth-primary);
  color: var(--mth-white);
  font-size: 32px;
}

.mth-cta-copy h2 {
  margin: 0 0 6px;
  color: var(--mth-black);
  font-size: 22px;
  font-weight: 800;
}

.mth-cta-copy p {
  margin: 0;
  color: var(--mth-dark-gray);
  line-height: 1.45;
}

.mth-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.mth-cta-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 150px;
  min-height: 58px;
  padding: 10px 18px;
  border: 1px solid var(--mth-primary);
  border-radius: var(--mth-radius);
  background: var(--mth-primary);
  color: var(--mth-white) !important;
  text-align: center;
  text-decoration: none !important;
  box-shadow: var(--mth-card-shadow);
}

.mth-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--mth-card-shadow-hover);
}

.mth-cta-button span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  opacity: .95;
}

.mth-cta-button--light {
  background: var(--mth-white);
  color: var(--mth-primary) !important;
}

.mth-trust-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-radius: var(--mth-radius);
  background: var(--mth-black);
  overflow: hidden;
}

.mth-trust-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 20px;
  color: var(--mth-white);
}

.mth-trust-dot {
  grid-row: span 2;
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 2px solid var(--mth-white);
  border-radius: 50%;
  opacity: .82;
}

.mth-trust-item strong {
  line-height: 1.2;
}

.mth-trust-item span:not(.mth-trust-dot) {
  color: rgba(255,255,255,.78);
  font-size: 13px;
}

.mth-brand-page .is-hidden-by-search,
.mth-brand-page .is-empty-by-search {
  display: none !important;
}

@media (max-width: 1199px) {
  .mth-featured-grid {
    grid-template-columns: repeat(var(--mth-featured-tablet-cols), minmax(0, 1fr));
  }

  .mth-directory-grid {
    grid-template-columns: repeat(var(--mth-directory-tablet-cols), minmax(0, 1fr));
  }

  .mth-brand-cta {
    grid-template-columns: auto 1fr;
  }

  .mth-cta-buttons {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .mth-brand-page {
    margin-bottom: 20px;
  }

  .mth-brand-hero {
    min-height: var(--mth-hero-height-mobile);
    padding: 30px 20px;
  }

  .mth-brand-hero:after {
    background: rgba(255,255,255,.88);
  }

  .mth-brand-hero p {
    font-size: 16px;
  }

  .mth-brand-search input {
    height: 52px;
    font-size: 14px;
  }

  .mth-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .mth-section-head h2 {
    font-size: 20px;
  }

  .mth-mobile-scroll .mth-featured-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .mth-mobile-scroll .mth-featured-card {
    min-width: 210px;
    scroll-snap-align: start;
  }

  .mth-mobile-grid .mth-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mth-directory-grid {
    grid-template-columns: repeat(var(--mth-directory-mobile-cols), minmax(0, 1fr));
  }

  .mth-az-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mth-az-sticky {
    top: 0;
  }

  .mth-brand-cta {
    grid-template-columns: 1fr;
    padding: 22px 18px;
    text-align: left;
  }

  .mth-cta-icon {
    width: 54px;
    height: 54px;
    font-size: 26px;
  }

  .mth-cta-buttons {
    width: 100%;
  }

  .mth-cta-button {
    width: 100%;
  }

  .mth-trust-bar {
    grid-template-columns: 1fr 1fr;
  }

  .mth-trust-item {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .mth-mobile-grid .mth-featured-grid,
  .mth-directory-grid,
  .mth-trust-bar {
    grid-template-columns: 1fr;
  }
}
