/* =====================================================================
 * 모바일 공통 보정 (2026-11-19)
 * - fragments/head.html에서 main.css, custom-ichngo.css 다음에 불러옵니다.
 * - 모든 규칙은 화면 폭 1100px 이하에서만 적용되어 데스크톱 화면에는 영향이 없습니다.
 * - 점검 결과(390px): 표/이미지/긴 URL 때문에 가로 스크롤이 생기던 7개 페이지와
 *   회의록(minutes) 메뉴·목록이 화면 밖으로 잘리던 문제를 보정합니다.
 * ===================================================================== */
@media screen and (max-width: 1100px) {

    /* 1. 긴 URL·단어가 화면 밖으로 나가지 않도록 줄바꿈 */
    .content_wrap,
    .main_content,
    .container-wrap,
    .typography {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    .content_wrap a,
    .main_content a,
    .container-wrap a {
        overflow-wrap: anywhere;
    }

    /* 2. 워드프레스에서 옮겨 온 본문 이미지(WG 페이지 등)와 회원 사진을 화면 폭에 맞춤 */
    .container-wrap img,
    .main_content img,
    .typography img,
    img.alignright,
    img.alignleft,
    img.aligncenter,
    img[class*="wp-image"] {
        max-width: 100% !important;
        height: auto !important;
    }
    img.alignright,
    img.alignleft {
        float: none !important;
        display: block;
        margin: 16px auto !important;
    }

    /* 3. 넓은 표(SC 위원 명단 등): 페이지 전체가 아니라 표 안에서만 가로 스크롤 */
    .typography table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 3-0. SC 위원 명단 상단 언어 버튼(English/Français)이 화면 오른쪽 끝에 붙던 문제 */
    .change_button {
        margin-left: 6px;
    }
    .detail_info > span:first-of-type:has(.change_button) {
        padding-right: 12px;
    }

    /* 3-1. 상세 화면 슬라이더 좌우 화살표가 화면 밖(약 5px)으로 나가던 문제 */
    .list_detail .slick-prev { left: 0 !important; z-index: 2; }
    .list_detail .slick-next { right: 0 !important; z-index: 2; }

    /* 4. 회의록(minutes) 상단 메뉴: 글자 크기를 줄이고 3개 메뉴가 화면 안에 들어오도록 */
    .menu_list2 {
        font-size: 13px;
        line-height: 1.3;
        gap: 8px;
        padding: 0 12px;
    }
    .menu_list2 > li {
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
    }
    .menu_list2 > li a {
        padding: 12px 0;
        overflow-wrap: anywhere;
    }

    /* 5. 회의록 목록: 좌우 여백, 제목과 날짜가 겹치지 않도록, 요약이 화면 안에서 줄바꿈 */
    .sc_ich_list {
        padding: 0 16px;
        box-sizing: border-box;
    }
    .sc_ich_list li {
        padding: 16px;
        margin-bottom: 16px;
        box-sizing: border-box;
    }
    .sc_ich_list_info {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }
    /* 워드클라우드 미리보기 자리(현재 주석 처리되어 비어 있음)가 오른쪽 폭을 차지하던 문제 */
    .sc_ich_list li > div:last-child:empty {
        display: none;
    }
    .sc_ich_list_info > div {
        display: block;
        width: 100%;
    }
    .sc_ich_list_info div:first-child > p {
        display: block;
        line-height: 1.4;
        margin: 0;
    }
    .sc_ich_list_info div:first-child > p[style*="float"] {
        float: none !important;
        width: auto !important;
        text-align: right;
        margin: 6px 0 10px;
        font-size: 14px;
    }
    .sc_ich_list_info div:last-child {
        overflow-wrap: anywhere;
    }
}

/* ===== 홈 목록 카드 이미지: 상자를 꽉 채움 (2026-11-19) =====
 * 위 2번 규칙(.main_content img { height:auto })이 목록 카드 이미지에도 걸려서
 * 가로 사진이 450px 상자의 절반만 차지하고 아래가 비어 보였음.
 * 카드 이미지는 상자 크기에 맞춰 cover로 꽉 채우고, 모바일 상자는 4:3 비율로(사진 대부분이 가로형). */
@media screen and (max-width: 1100px) {
    .list_img_box {
        height: auto !important;
        aspect-ratio: 4 / 3;
    }
    .main_content .list_img_box img,
    .list_img_box img,
    .list_img_box video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        display: block;
    }
    /* 이미지 없는 글: 회색 안내 그림은 상자 가운데 작게 */
    .list_img_box img[src$="noimage.png"] {
        width: 60% !important;
        height: 85% !important;
        object-fit: contain;
    }
}

/* ===== footer 로고 제거 (2026-11-19) =====
 * 로고 칸을 없애서 footer_wrap 안에 본문 칸 하나만 남음.
 * main.css의 :first-child(15%) / :last-child(85%) 규칙이 이 한 칸에 같이 걸리므로 폭을 100%로 되돌림. */
.footer_wrap > div:only-child {
    width: 100%;
    margin-bottom: 0;
}
