/* 2026-11-27 메인 전체 서비스 보기 모바일 정리 + 고정버튼/지원사업 바 가림 해소. max-width 767px 전용 */

@media (max-width: 767px) {
  /* HS-1. 탭 필 3-2. .display-inherit 가 display:inherit !important 라 grid 만 !important */
  .sec11 .tab-style2 .nav-tabs {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 10px;
    width: auto;
    margin-left: -15px;
    margin-right: -15px;
  }

  .sec11 .tab-style2 .nav-tabs:before,
  .sec11 .tab-style2 .nav-tabs:after {
    content: none;
    display: none;
  }

  .sec11 .tab-style2 .nav-tabs > li,
  .sec11 .tab-style2 .nav-tabs > li + li {
    display: block;
    float: none;
    margin: 0;
    min-width: 0;
    height: auto;
  }

  .sec11 .tab-style2 .nav-tabs > li:nth-child(-n + 3) {
    grid-column: span 2;
  }

  .sec11 .tab-style2 .nav-tabs > li:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .sec11 .tab-style2 .nav-tabs > li:nth-child(5) {
    grid-column: 4 / span 2;
  }

  /* FIX3. 두 단어 이상은 공백에서 두 줄. 한 줄은 min-height 40(border-box, 테두리 2px 포함) */
  .sec11 .tab-style2 .nav-tabs > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 40px;
    min-width: 0;
    box-sizing: border-box;
    border-width: 2px;
    line-height: 1.2;
    padding: 4px;
    white-space: normal;
    word-break: keep-all;
    font-size: 14px;
    text-align: center;
  }

  .sec11 .tab-style2 .nav-tabs > li.active > a {
    border-width: 2px;
  }

  /* FIX2. 390에서 AI SERVICES(약 88px)가 칸보다 넓다. 필 좌우 패딩 4px 는 유지 */
  @media (max-width: 400px) {
    .sec11 .tab-style2 .nav-tabs > li > a {
      font-size: 13px;
    }
  }

  @media (max-width: 370px) {
    .sec11 .tab-style2 .nav-tabs > li > a {
      font-size: 12px;
    }
  }

  /* FIX3. 영문만 한 단계 더 줄인다. 국문 14/13/12 는 위 규칙 유지 */
  @media (max-width: 400px) {
    html[lang="en"] .sec11 .tab-style2 .nav-tabs > li > a {
      font-size: 12px;
    }
  }

  @media (max-width: 370px) {
    html[lang="en"] .sec11 .tab-style2 .nav-tabs > li > a {
      font-size: 11px;
    }
  }

  /* FIX2. 카드 글자가 단어 중간에서 끊기지 않게. 위아래 20px 는 style.css 그대로 */
  .sec11 .equalize ul li a {
    word-break: keep-all;
    overflow-wrap: break-word;
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
  }

  /* HS-2. 카드 오른쪽 끝 = 화면폭-48, 고정버튼 왼쪽 = 화면폭-40 */
  .sec11 {
    padding-left: 48px;
    padding-right: 48px;
  }

  /* HS-3. 지원사업 띠를 왼쪽 알약으로. 768px 띠 모양은 support_2026.css 에 둔다 */
  html .gs.gs-sticky {
    display: block;
    left: 12px;
    right: 52px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 0;
    background: transparent;
    border-top: 0;
    box-shadow: none;
  }

  html .gs.gs-sticky .gs-btn {
    display: flex;
    width: 100%;
    min-height: 46px;
    border-radius: 23px;
    box-shadow: 0 6px 18px rgba(13, 64, 93, 0.28);
  }

  html:has(.gs-sticky) .top-btn {
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
}
