.practice-areas {
  width: 100%;
  max-width: 100%;
  padding: 3rem 1.5rem;
  box-sizing: border-box;
}


.practice-grid {
  display: grid;

  /*
   * Fit as many cards as comfortably possible.
   *
   * Each card will be at least 260px wide.
   * Wider screens can fit more cards automatically.
   */
  grid-template-columns: repeat(
    auto-fit,
    minmax(260px, 1fr)
  );

  gap: 1.5rem;

  width: 100%;
  max-width: 1100px;
  margin: 0 auto;

  box-sizing: border-box;
}


/*
 * ==========================================================
 * PRACTICE CARD
 * ==========================================================
 */

.practice-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;

  /*
   * Do not force the card to be square.
   *
   * The content determines the required height.
   */
  min-height: 260px;
  height: auto;

  display: block;
  position: relative;

  overflow: hidden;
  box-sizing: border-box;

  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 12px;

  background: linear-gradient(
    to bottom,
    #eaf8fc 0%,
    #f8fcfd 100%
  );

  color: inherit;
  text-decoration: none;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}


.practice-card:hover,
.practice-card.selected {
  transform: translateY(-2px);

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 1),
    rgba(205, 238, 247, 1)
  );

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12);
}


/*
 * ==========================================================
 * PRACTICE CARD CONTENT
 * ==========================================================
 */

.practice-card__content {
  text-align: center;
  width: 100%;
  min-height: 260px;

  padding: 2rem;

  display: flex;
  flex-direction: column;
  justify-content: center;

  box-sizing: border-box;
}


/*
 * ==========================================================
 * ICON
 * ==========================================================
 */

.practice-card__icon {
  display: flex;
  justify-content: center;
  align-items: center;

  margin-bottom: 1rem;
}


.practice-card__icon svg {
  width: 64px;
  height: 64px;
  max-width: 100%;
}


/*
 * ==========================================================
 * TITLE
 * ==========================================================
 */

.practice-card h2 {
  margin: 0 0 1rem;

  font-size: 1.5rem;
  line-height: 1.15;
}


/*
 * ==========================================================
 * DESCRIPTION
 * ==========================================================
 */

.practice-card p {
  margin: 0;

  line-height: 1.5;

  opacity: 0.75;
}


/*
 * ==========================================================
 * EXPLORE LINK
 * ==========================================================
 */

.practice-card__link {
  margin-top: 1.5rem;
  padding-top: 0;

  font-size: 0.9rem;
  font-weight: 600;
}


/*
 * ==========================================================
 * PRACTICE DETAIL PANELS
 * ==========================================================
 *
 * Legacy functionality.
 *
 * These remain available if the old in-page practice-area
 * behavior is ever restored.
 *
 */

.practice-details {
  display: block;
}


.practice-detail {
  display: none;
}


.practice-detail.active {
  display: block;
}


/*
 * ==========================================================
 * SELECTED CARD
 * ==========================================================
 *
 * Legacy functionality.
 *
 */

.practice-card.selected .practice-card__link {
  font-weight: bold;
}


/*
 * ==========================================================
 * MEDIUM SCREENS
 * ==========================================================
 *
 * On narrower screens, two columns gives the content more
 * breathing room without immediately going to one column.
 *
 */

@media (max-width: 850px) {

  .practice-grid {
    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    );

    gap: 1rem;
  }

  .practice-card {
    min-height: 250px;
  }

  .practice-card__content {
    min-height: 250px;
    padding: 1.5rem;
  }

  .practice-card__icon svg {
    width: 56px;
    height: 56px;
  }

  .practice-card h2 {
    font-size: 1.3rem;
  }

}


/*
 * ==========================================================
 * SMALL SCREENS
 * ==========================================================
 */

@media (max-width: 600px) {

  .practice-areas {
    padding: 2rem 1rem;
  }


  .practice-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }


  .practice-card {
    min-height: 220px;
  }


  .practice-card__content {
    min-height: 220px;
    padding: 1.25rem;
  }


  .practice-card__icon {
    margin-bottom: 0.75rem;
  }


  .practice-card__icon svg {
    width: 48px;
    height: 48px;
  }


  .practice-card h2 {
    margin-bottom: 0.75rem;

    font-size: 1.15rem;
  }


  .practice-card p {
    font-size: 0.9rem;
    line-height: 1.45;
  }


  .practice-card__link {
    margin-top: 1.25rem;

    font-size: 0.9rem;
  }

}
