/* Attorneys page template sections — mobile first (base = mobile, min-width for larger) */
.attorneys-section__inner {
  max-width: 100%;
  padding-top: 1.5rem;
}

.attorneys-profiles__intro:last-child {
  margin-bottom: 0;
}

.attorneys-profiles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Override theme list padding (e.g. .article ul) so grid has no left indent */
.attorneys-section--profiles .attorneys-profiles-grid {
  padding-left: 0;
}

.attorneys-profile-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.attorneys-profile-card__link {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.attorneys-profile-card:hover {
  border-color: #bbb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Mobile: fixed-size thumbnail so images don’t appear really long */
.attorneys-profile-card__image {
  line-height: 0;
  flex-shrink: 0;
  width: 100px;
  min-width: 100px;
  height: 100px;
  min-height: 0;
  max-height: 100px;
  overflow: hidden;
  background: #eee;
}

.attorneys-profile-card__image img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

@media screen and (min-width: 600px) {
  .attorneys-profiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .attorneys-profile-card,
  .attorneys-profile-card__link {
    flex-direction: column;
  }

  .attorneys-profile-card__image {
    width: 100%;
    min-width: 0;
    height: 200px;
    max-height: 200px;
  }

  .attorneys-profile-card__content {
    align-items: center;
    justify-content: flex-start;
    text-align: center;
  }

  .attorneys-profile-card__excerpt {
    display: block;
  }
}

@media screen and (min-width: 900px) {
  .attorneys-profiles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (min-width: 1350px) {
  .attorneys-profiles-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.attorneys-profile-card__content {
  padding: 1rem;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* Mobile only: vertically center title and CTA (max-width so it doesn’t override 600px+ rule) */
@media screen and (max-width: 599px) {
  .attorneys-profile-card__content {
    justify-content: center;
  }
}

.attorneys-profile-card__excerpt {
  display: none;
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.4;
  flex: 1;
}

.attorneys-profile-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.875rem;
  font-weight: 600;
  color: inherit;
  transition: color 0.2s ease;
}

.attorneys-profile-card__cta-icon {
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  background-color: currentColor;
  -webkit-mask-image: url("../img/right-arrow.svg");
  mask-image: url("../img/right-arrow.svg");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: transform 0.2s ease;
}

.attorneys-profile-card__link:hover .attorneys-profile-card__cta,
.attorneys-profile-card__link:focus .attorneys-profile-card__cta {
  text-decoration: underline;
  color: #375570;
}

.attorneys-profile-card__link:hover .attorneys-profile-card__cta-icon,
.attorneys-profile-card__link:focus .attorneys-profile-card__cta-icon {
  transform: translateX(2px);
}

/* No underline on the link itself (CTA still underlines via rule below); scoped so theme a:hover doesn’t override */
.attorneys-section--profiles .attorneys-profile-card__link:hover,
.attorneys-section--profiles .attorneys-profile-card__link:focus {
  text-decoration: none;
}

.attorneys-profile-card__link:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
