/**
 * Home page responsive adjustments.
 *
 * Shared works card and CTA styles are defined in global.css.
 */

.p-home-kv__badge {
  padding: 4px 12px;
  border-radius: 6px;
  background-color: #202020;
  white-space: nowrap;
}

.p-home-kv h1 {
  font-size: clamp(2rem, 2.78vw, 2.5rem) !important;
}

.p-home-works .smb-section__title .sme-font-size {
  font-size: inherit !important;
}

@supports (word-break: auto-phrase) {
  .p-home-kv h1,
  .p-home-kv-responsive h1 {
    word-break: auto-phrase;
  }
}

@media not all and (min-width: 1024px) {
  .p-home-kv-responsive,
  .p-home-about,
  .p-home-problems,
  .p-home-strengths,
  .p-home-service,
  .p-home-works {
    padding-block: 56px !important;
  }

  .p-home-about .wp-block-columns {
    flex-wrap: wrap !important;
    gap: 40px;
  }

  .p-home-about .wp-block-columns > .wp-block-column {
    flex-basis: 100% !important;
  }

  .p-home-about .about-container > .wp-block-column:first-child {
    order: 2;
  }

  .p-home-service .smb-list ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 640px;
    margin-inline: auto;
    gap: 16px 24px;
  }

  .p-home-service .smb-list li {
    margin-top: 0;
  }

  .p-home-kv-responsive .smb-flex {
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
  }

  .p-home-kv-responsive .kv__title-lead {
    font-size: clamp(1.3rem, calc(0.133rem + 2.917vw), 2rem) !important;
    line-height: 1.4;
  }

  .p-home-kv-responsive .kv__title {
    font-size: clamp(1.8rem, calc(0.633rem + 2.917vw), 2.5rem) !important;
    line-height: 1.4;
    word-break: normal;
    text-wrap: balance;
  }

  .p-home-kv-responsive .wp-block-image {
    max-width: 600px !important;
    margin-inline: auto !important;
  }

  .p-home-kv-responsive .d-inline-block {
    display: block;
    width: 100%;
  }

  .p-home-kv-responsive .smb-btn-wrapper {
    width: 100%;
    max-width: 480px;
  }

  .p-home-kv-responsive .smb-btn {
    box-sizing: border-box;
    width: 100%;
    padding-inline: 24px !important;
    white-space: normal;
  }

  .p-home-about .wp-block-columns > .wp-block-column:first-child {
    max-width: 520px;
    margin-inline: auto;
  }

  .p-home-about h2 {
    font-size: 2rem !important;
    line-height: 1.5;
  }

  .p-home-problems .smb-section__contents-wrapper {
    padding-inline: 40px;
  }

  .p-home-problems .smb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .p-home-problems .smb-grid > * {
    grid-column: auto !important;
  }

  .p-home-strengths .smb-section__subtitle .sme-font-size {
    font-size: 1.125rem !important;
    line-height: 1.4;
  }

  .p-home-strengths .smb-section__title .sme-font-size {
    font-size: clamp(1.5rem, calc(0.667rem + 2.083vw), 2rem) !important;
    line-height: 1.4;
  }

  .p-home-strengths .smb-section__body {
    margin-top: 40px;
  }

  .p-home-strengths .wp-block-columns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .p-home-strengths .wp-block-column {
    display: flex;
    flex-direction: column;
    width: auto;
    padding: 32px 24px !important;
  }

  .p-home-strengths .wp-block-column > p:first-child {
    line-height: 1.2;
  }

  .p-home-strengths .wp-block-column > .wp-block-group {
    width: 100%;
    max-width: 250px;
    margin-inline: auto;
  }

  .p-home-strengths .wp-block-column:last-child {
    grid-column: 1 / -1;
    width: 100%;
    max-width: calc((100% - 24px) / 2);
    justify-self: center;
  }

  .p-home-strengths .strengths-title {
    min-height: auto;
    margin-bottom: 8px !important;
    font-size: 1.125rem !important;
    line-height: 1.5;
  }

  .p-home-strengths .wp-block-column > p:last-child {
    line-height: 1.7;
  }

}

@media not all and (min-width: 640px) {
  .p-home-kv-responsive,
  .p-home-about,
  .p-home-problems,
  .p-home-strengths,
  .p-home-service,
  .p-home-works {
    padding-block: 48px !important;
  }

  .p-home-about .wp-block-columns {
    gap: 32px;
  }

  .p-home-kv-responsive .p-home-kv__badges {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .p-home-kv-responsive .kv__list-container li {
    margin-top: 0;
    font-size: 0.875rem !important;
    line-height: 1.6;
  }

  .p-home-kv-responsive .smb-btn-wrapper {
    max-width: none;
  }

  .p-home-kv-responsive .smb-btn {
    padding-inline: 20px !important;
  }

  .p-home-about h2 {
    font-size: 1.75rem !important;
  }

  .p-home-about h3 {
    font-size: 1.125rem !important;
    line-height: 1.7;
  }

  .p-home-about .about-text {
    font-size: 1rem !important;
  }

  .p-home-problems .smb-section__contents-wrapper {
    padding-inline: 20px;
  }

  .p-home-problems h2 {
    line-height: 1.5;
  }

  .p-home-problems h2 {
    font-size: 1.3rem !important;
  }

  .p-home-problems .smb-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.8em !important;
  }

  .p-home-strengths .smb-section__body {
    margin-top: 32px;
  }

  .p-home-strengths .wp-block-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .p-home-strengths .wp-block-column,
  .p-home-strengths .wp-block-column:last-child {
    grid-column: auto;
    width: auto;
    max-width: none;
    padding: 24px !important;
  }

  .p-home-strengths .wp-block-column > .wp-block-group {
    max-width: 225px;
  }

  .p-home-service .smb-list li {
    font-size: 1rem !important;
  }

  .p-home-service .wp-block-button,
  .p-home-works .wp-block-button {
    width: 100% !important;
    max-width: 320px;
  }
}

@media (min-width: 1024px) {
  .p-home-strengths .strengths-title {
    min-height: 4em;
  }
}
