/* 미디어쿼리 */

@media (max-width: 1200px) {
  .sub-visual {
    height: 250px;
  }

  .sub-visual h2 {
    font-size: 28px !important;
  }

  /* */

  .page-title {
    margin: 40px 10px 10px;
    padding: 0 0 20px;
  }

  .page-title h2 {
    font-size: 28px !important;
  }

  /* */

  .nav-pills.d-flex.line-bottom {
    column-gap: 5px;
    padding: 10px 0 !important;
  }

  .nav-pills .nav-link {
    padding: 5px 10px;
    font-size: 14px !important;
    border-radius: 999px;
  }

  /* */

  #ctt .sec-inner {
    padding: 20px 10px;
  }

  .sec-inner._fir {
    padding: 20px 10px;
  }

  /* 오시는 길 */

  .ctt_direction table th {
    padding: 15px 20px;
  }

  .ctt_direction table td {
    padding: 15px 10px;
  }
}

@media (max-width: 768px) {
  .sub-visual {
    height: 200px;
  }

  .sub-visual h2 {
    font-size: 24px !important;
  }
}

@media (max-width: 1024px) {
  /* */

  br._mobile {
    display: none;
  }

  .badge.fs-3,
  #ctt div.fs-5 {
    font-size: 18px !important;
  }

  /* */

  .table th,
  .table td,
  .table td strong {
    font-size: 14px !important;
  }

  .list-group li,
  .text-bg-dark,
  .text-bg-dark p {
    font-size: 14px !important;
  }
}

@media (max-width: 991px) {
  /* */

  #site_config .home > span {
    font-size: 14px;
  }

  #site_config .toggle_menu li a {
    padding: 12px 14px;
    font-size: 13px;
  }

  /* 나의 강의실 */

  ._row_th {
    display: block;
  }

  ._row_td .col {
    text-align: left !important;
  }

  /* 모바일에서 테이블 스타일 개선 - 가로 스크롤 방식 */
  @media (max-width: 991px) {
    .table-wrap {
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 4px;
      margin: 10px 0;
      overflow-x: auto;
      overflow-y: hidden;
      white-space: nowrap;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    ._row_th {
      background: #f8f9fa;
      border-bottom: 2px solid #dee2e6;
      padding: 0;
      margin: 0;
      display: flex;
      min-width: 600px;
    }

    ._row_th .col {
      padding: 14px 10px;
      font-weight: 600;
      color: #495057;
      font-size: 13px;
      text-align: center;
      border-right: 1px solid #dee2e6;
      flex: 1;
      min-width: 80px;
    }

    ._row_th .col:last-child {
      border-right: none;
    }

    ._row_td {
      border-bottom: 1px solid #e9ecef;
      padding: 0;
      margin: 0;
      background: #fff;
      display: flex;
      min-width: 600px;
      transition: background-color 0.2s ease;
    }

    ._row_td:hover {
      background-color: #f8f9fa;
    }

    ._row_td:last-child {
      border-bottom: none;
    }

    ._row_td .col {
      padding: 14px 10px;
      font-size: 13px;
      line-height: 1.5;
      border-right: 1px solid #e9ecef;
      vertical-align: middle;
      flex: 1;
      min-width: 80px;
    }

    ._row_td .col:last-child {
      border-right: none;
    }

    ._row_td .col a {
      color: #007bff;
      text-decoration: none;
      font-weight: 500;
    }

    ._row_td .col a:hover {
      text-decoration: underline;
      color: #0056b3;
    }

    .btn-outline-primary.btn-sm {
      padding: 6px 12px;
      font-size: 12px;
      border-radius: 4px;
      border: 1px solid #007bff;
      color: #007bff;
      background: transparent;
      display: inline-block;
      min-width: 70px;
      font-weight: 500;
      transition: all 0.2s ease;
    }

    .btn-outline-primary.btn-sm:hover {
      background-color: #007bff;
      border-color: #007bff;
      color: #fff;
      transform: translateY(-1px);
    }

    /* 섹션 간격 조정 */
    .section {
      margin-bottom: 25px;
    }

    .sec-inner._fir {
      padding: 20px 15px;
    }

    /* 모바일에서 텍스트 정렬 */
    ._row_td .col.text-center {
      text-align: center !important;
    }

    ._row_td .col.text-nowrap {
      white-space: nowrap;
    }

    /* 작은 화면에서 추가 최적화 */
    @media (max-width: 576px) {
      ._row_th .col,
      ._row_td .col {
        padding: 10px 6px;
        font-size: 12px;
        min-width: 70px;
      }

      .btn-sm {
        min-width: 60px;
        font-size: 11px;
        padding: 4px 8px;
      }
    }
  }
}
