.common-phrases-page {
  min-height: 100vh;
  padding: 2rem 0 4rem;
}

.common-phrases__hero {
  text-align: center;
  margin-bottom: 2rem;
}

.common-phrases__hero h1 {
  margin-bottom: 0.5rem;

  color: var(--heading-color);

  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

.common-phrases__hero p {
  max-width: 700px;
  margin: 0 auto;

  color: var(--text-light-color);
}

.common-phrases__content {
  width: 100%;
}

.level-filter {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 0.5rem;

  margin-bottom: 2rem;
}

.level-filter__button {
  min-width: 3rem;

  padding: 0.45rem 0.85rem;

  border: none;
  border-radius: 0.75rem;

  background: transparent;

  color: var(--text-color);

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.level-filter__button:hover {
  background-color: #e8f7fc;
}

.level-filter__button--active {
  background-color: var(--primary-color);
  color: #ffffff;
}

.level-filter__button--active:hover {
  background-color: var(--primary-color);
}

.common-phrases__translation {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.common-phrases__translate-all-button {
  padding: 0.75rem 1.25rem;
  border: 1px solid #dbeafe;
  border-radius: 0.5rem;
  background: #f8fbff;
  color: #1d4ed8;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.common-phrases__translate-all-button:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.common-phrases__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.common-phrase-card {
  display: flex;
  flex-direction: column;

  min-width: 0;
  min-height: 390px;

  padding: 1.5rem;

  border-radius: 1rem;

  background: var(--card-background-color);

  box-shadow: 0 8px 25px rgba(31, 55, 80, 0.06);

  overflow: hidden;
}

.common-phrase-card__header {
  position: relative;

  display: flex;
  align-items: center;

  margin-bottom: 1.5rem;

  padding-right: 3rem;
}

.common-phrase-card__phrase {
  color: var(--heading-color);

  font-size: 1.7rem;
  line-height: 1.2;
  font-weight: 800;

  overflow-wrap: anywhere;
}

.common-phrase-card__level {
  position: absolute;

  top: -0.25rem;
  right: 0;

  padding: 0.2rem 0.55rem;

  border-radius: 0.45rem;

  background: #eaf8fc;

  color: var(--primary-color);

  font-size: 0.75rem;
  font-weight: 700;
}

.common-phrase-card__audio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  width: 2.8rem;
  height: 2.8rem;

  margin-left: 0.75rem;

  border: none;
  border-radius: 50%;

  background: #eaf6fb;

  color: var(--primary-color);

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.common-phrase-card__audio-button:hover {
  background-color: #d9f1f8;
  transform: scale(1.05);
}

.common-phrase-card__audio-button--speaking {
  background-color: #c8edf7;
  transform: scale(1.05);
}

.common-phrase-card__audio-button svg {
  width: 1.3rem;
  height: 1.3rem;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.common-phrase-card__section {
  margin-top: 0.5rem;
}

.common-phrase-card__section--example {
  margin-top: 1.25rem;
}

.common-phrase-card__section-label {
  display: flex;
  align-items: center;

  gap: 0.45rem;

  margin-bottom: 0.55rem;

  font-weight: 700;
}

.common-phrase-card__section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 1rem;
}

.common-phrase-card__section-label--meaning {
  color: var(--meaning-color);
}

.common-phrase-card__section-label--example {
  color: var(--example-color);
}

.common-phrase-card__section-text {
  padding-left: 1.4rem;
  color: #172b46;
  overflow-wrap: anywhere;
}

.common-phrase-card__translation {
  display: none;
}

.common-phrase-card__translation--visible {
  display: block;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #dbeafe;
  border-radius: 0.5rem;
  background: #f8fbff;
  line-height: 1.5;
}

.common-phrase-card__translation-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.common-phrase-card__translation-text {
  display: block;
}

.common-phrase-card__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.5rem;
}

.common-phrase-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 0.35rem;

  padding: 0.55rem 0.85rem;

  border: 1px solid #a9dfff;
  border-radius: 0.75rem;

  background: #f7fbff;

  color: var(--primary-color);

  font-weight: 700;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.common-phrase-card__action:hover {
  background-color: #eaf7ff;
  transform: translateY(-1px);
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 0.4rem;

  margin-top: 2rem;
}

.pagination__button {
  min-width: 2.4rem;
  height: 2.4rem;

  padding: 0 0.5rem;

  border: 1px solid var(--border-color);
  border-radius: 0.6rem;

  background: #ffffff;

  color: var(--text-color);
}

.pagination__button:hover {
  background-color: #eef9fc;
}

.pagination__button--active {
  border-color: var(--primary-color);

  background-color: var(--primary-color);

  color: #ffffff;
}

@media (max-width: 1000px) {
  .common-phrases__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .common-phrases-page {
    padding: 1rem 0.75rem 3rem;
  }

  .common-phrases__list {
    grid-template-columns: 1fr;
  }

  .common-phrase-card {
    min-height: auto;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .common-phrase-card {
    padding: 1.25rem;
  }

  .common-phrase-card__phrase {
    font-size: 1.5rem;
  }
}
