@charset "utf-8";

/* =========================================================
   MISOWORLD 반응형 오버라이드
   - site.css(PC)는 수정하지 않고 이 파일로 덮어씁니다.
   - index.html 에서 항상 로드하지만, 아래 @media 안에서만 적용됩니다.
   ========================================================= */

/* 모바일 전용 카드: PC에서는 숨김 */
.recruit-mobile { display: none; }

/* ---------------------------------------------------------
   1. 태블릿 / 좁은 노트북 (768px ~ 1199px)
      : 1200px 고정 폭 때문에 전체가 축소되던 문제 해제
   --------------------------------------------------------- */
@media screen and (max-width: 1199px) {
    body {
        font-size: 16px;
        line-height: 1.6;
    }

    section,
    header,
    footer,
    .wrap {
        min-width: 0;
    }

    .wrap {
        width: auto;
        max-width: none;
        padding: 0 24px;
    }

    section {
        min-height: 0;
    }

    header .navbar-nav > .nav-item {
        padding: 12px 14px;
        font-size: 18px;
    }

    .image-bg-container h1 {
        padding: 100px 16px;
        font-size: 44px;
        line-height: 1.35;
    }

    #section-1 .intro-description {
        font-size: 22px;
        line-height: 1.7;
        padding: 30px 0;
    }

    #section-1 .intro-m3-title {
        padding: 36px 0 28px;
    }

    #section-1 .intro-m3 > li {
        font-size: 18px;
        line-height: 1.7;
    }

    #section-2 .row {
        font-size: 18px;
    }

    /* 인재채용 표는 rowspan 구조라 세로 스택 대신 가로 스크롤 */
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #section-4 table {
        min-width: 700px;
    }

    /* 표 모드(768~1199px)에서도 사업부문 사이 간격 확보 */
    #section-4 table tr.group-start td {
        border-top: 10px solid #C8AE7D;
    }
}

/* ---------------------------------------------------------
   2. 모바일 (~767px)
      : 3열을 세로로 쌓고, 메뉴는 가로 스크롤로 처리
   --------------------------------------------------------- */
@media screen and (max-width: 767px) {
    .wrap {
        padding: 0 16px;
    }

    section {
        margin-bottom: 3em;
    }

    h1 { font-size: 28px; }
    h2 { font-size: 22px; }

    /* Header */
    header {
        display: block;
        padding: 8px 0;
    }

    header .wrap {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    header .logo {
        padding-left: 0;
    }

    header .logo img {
        max-width: 150px;
        height: auto;
    }

    header .navbar {
        width: 100%;
        min-width: 0;
    }

    header .navbar-nav {
        width: 100%;
        min-width: 0;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    header .navbar-nav::-webkit-scrollbar {
        display: none;
    }

    header .navbar-nav > .nav-item {
        float: none;
        flex: 0 0 auto;
        padding: 8px 12px;
        font-size: 16px;
    }

    /* Section 1 */
    .image-bg-container {
        height: auto;
        min-height: 320px;
    }

    .image-bg-container h1 {
        padding: 60px 16px;
        font-size: 28px;
        line-height: 1.45;
    }

    #section-1 .intro-description {
        font-size: 17px;
        line-height: 1.8;
        padding: 24px 16px;
    }

    #section-1 .intro-m3-title {
        padding: 28px 0 18px;
    }

    #section-1 .intro-m3 > li {
        float: none;
        width: 100%;
        text-align: left;
        font-size: 16px;
        line-height: 1.75;
        padding: 12px 0;
    }

    /* Section 2 */
    #section-2,
    #section-3,
    #section-4 {
        padding: 20px 0 30px;
    }

    #section-2 .section-title,
    #section-3 .section-title,
    #section-4 .section-title {
        margin: 24px 0;
    }

    #section-2 .row {
        padding: 10px 0;
        font-size: 16px;
    }

    #section-2 .title {
        float: none;
        width: auto;
        margin-bottom: 6px;
        padding: 10px 12px;
    }

    #section-2 .detail {
        margin-left: 0;
        padding: 12px;
        font-size: 15px;
        line-height: 1.6;
    }

    /* Section 3 */
    #section-3 .portfolio-nav {
        display: flex;
        padding: 10px 0;
    }

    #section-3 .portfolio-nav > .nav-item {
        display: block;
        width: 33.33%;
        font-size: 15px;
    }

    #section-3 .portfolio-nav > .nav-item > .nav-link {
        padding: 8px 0;
        border-bottom-width: 3px;
    }

    #section-3 .portfolio-nav > .nav-item > .nav-link.active {
        border-bottom-width: 3px;
    }

    #section-3 .portfolio-item {
        padding: 12px 4px;
    }

    #section-3 .portfolio-item > .project-date,
    #section-3 .portfolio-item > .project-client,
    #section-3 .portfolio-item > .project-title {
        display: block;
        width: auto;
        line-height: 1.6;
    }

    /* Section 4: JS가 카드를 만들면 표를 숨김 (JS 실패 시 표가 남아 폴백) */
    #section-4 table.is-cardified {
        display: none;
    }

    #section-4 .recruit-mobile.is-ready {
        display: block;
    }

    .recruit-card {
        border: 1px solid #A8907E;
        background-color: #fff;
        margin-bottom: 24px;
    }

    .recruit-card:last-child {
        margin-bottom: 0;
    }

    .recruit-group {
        background-color: #765827;
        color: #fff;
        font-size: 16px;
        font-weight: bold;
        padding: 10px 12px;
    }

    .recruit-job,
    .recruit-apply {
        padding: 12px;
        border-top: 1px solid #EAC696;
    }

    .recruit-job h3,
    .recruit-apply h3 {
        margin-bottom: 8px;
        color: #65451F;
        font-size: 15px;
        font-weight: bold;
    }

    .recruit-card li {
        font-size: 14px;
        line-height: 1.7;
        word-break: keep-all;
    }

    .recruit-apply {
        background-color: #FCF7EF;
    }

    /* Footer: 메일은 메일주소와 함께 다음 줄에 출력 */
    footer {
        font-size: 13px;
        line-height: 1.8;
        padding: 20px 16px;
    }

    footer .footer-fax {
        margin-left: 20px;
    }

    footer .footer-mail {
        display: block;
        margin: 4px 0 0;
    }
}

/* 좁은 폰(360px 미만)에서는 FAX도 다음 줄로 */
@media screen and (max-width: 359px) {
    footer .footer-fax {
        display: block;
        margin: 4px 0 0;
    }
}
