/* 공통 초기화 */
* { 
    margin: 0; padding: 0; box-sizing: border-box; 
    scrollbar-gutter: auto;  /* 스크롤바가 생겨도 레이아웃 밀림 방지 */
}

/* [2] 기본 브라우저 설정 (단독 페이지일 때 적용) */
html, body {
    width: 100%;
    height: auto !important;
    min-height: 0 !important; /* 강제 초기화 */
    overflow-x: hidden;
    background: #fff;
}

/* [3] iframe 내부일 때만 적용되는 스타일 (이중 스크롤 방지 핵심) */
html.is-iframe, 
body.is-iframe {
    overflow: hidden !important; /* 내부 스크롤 차단 */
}

/* iframe 내부일 때만 스크롤바 모양을 숨김 */
.is-iframe::-webkit-scrollbar,
.is-iframe ::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
}
.is-iframe {
    -ms-overflow-style: none; /* IE, Edge */
    scrollbar-width: none; /* Firefox */
}

body {
    background: #fff;
    display: block; 
    font-family: 'Pretendard', sans-serif;
}

#detail-payload {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0; /* 상하 여백 확보 */
    box-sizing: border-box;
    min-height: 0 !important; /* 강제 초기화 */
    padding-bottom: 10px; /* 푸터와의 최소 간격 */
}

/* ======================================== */
/* ======== 토문건축 스타일 뉴스 상세 헤더 ======== */
/* ======================================== */
.news-view-header {
 display: flex;
 justify-content: space-between;
 align-items: flex-end;
 padding-bottom: 15px;
 border-bottom: 2px solid #0a4a44; /* 샘플 사이트 형태의 밑줄 한 줄 (비아건축 브랜드 색상) */
 margin-bottom: 25px;
 width: 100%;
}

.header-left-group {
 display: flex;
 align-items: center;
 gap: 12px;
}

/* 구분 글자 디자인: [NOTICE] 비아 진녹색 포인트 적용 */
.news-category {
 font-size: 16px;
 font-weight: 700;
 color: #0a4a44;
 letter-spacing: -0.02em;
}

/* 뉴스 제목 디자인 (좌측 배치) */
.news-title-text {
 font-size: 21px;
 font-weight: 500;
 color: #111;
 margin: 0;
 letter-spacing: -0.03em;
}

/* 뉴스 등록 날짜 디자인 (우측 배치) */
.news-date-text {
 font-size: 14px;
 color: #777;
 font-weight: 400;
}

/* ======================================== */
/* ======== 뉴스 본문 및 수직 이미지 영역 ======== */
/* ======================================== */
.news-view-container {
 width: 100%;
 margin-bottom: 10px;
}

/* 하부 글씨 두 줄 입력 스타일링 */
.news-text-area {
 margin-bottom: 25px;
 width: 100%;
}

.news-text-area p {
 font-size: 15px;
 line-height: 1.5;
 color: #333;
 margin-bottom: 10px;
 word-break: keep-all;
}

/* 하부 이미지 수직 순차 배치 구조 */
.news-image-vertical-group {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 10px; /* 이미지와 이미지 사이의 수직 간격 정의 */
 width: 100%;
}

.news-image-vertical-group img {
 width: 100%;
 max-width: 1100px; /* [수정] 이미지 우측 밀림이나 여백 없이 폭을 1100px까지 꽉 채움 */
 aspect-ratio: 16 / 10; /* [수정] 모든 수직 이미지 비율을 16:10으로 고정 */
 height: auto;
 margin-bottom: 10px;
 display: block;
 object-fit: cover; /* [추가] 지정 비율에서 왜곡 없이 중앙 크롭 형태로 정렬 */
 object-position: center;
}

/* ======================================== */
/* ======== 하단 목록(LIST) 버튼 영역 ======== */
/* ======================================== */
.news-view-footer-bar {
 display: flex;
 justify-content: center;
 width: 100%;
 padding-top: 20px;
 border-top: 1px solid #eee;
}

.news-list-btn {
 text-decoration: none;
 color: #222;
 font-weight: 700;
 font-size: 13px;
 width: 110px;
 height: 38px;
 display: flex;
 align-items: center;
 justify-content: center;
 border: 1px solid #bbb;
 background-color: #fff;
 transition: all 0.2s ease;
 letter-spacing: 0.5px;
}

.news-list-btn:hover {
 border-color: #0a4a44;
 color: #0a4a44;
}



/* [모바일 대응] 화면이 작아지면 세로로 배치 */
@media (max-width: 1024px) {
    #detail-payload { 
        padding: 0 0px;
        padding-top: 0px !important; /* 상단 탭 하부 여백 획기적으로 축소 */
        padding-bottom: 0px !important; /* 전체 하단 여백 축소 */
    }
    
    /* 가로 한 줄 정렬 강제 유지 및 여백 축소 */
    .news-view-header {
        display: flex !important;
        flex-direction: row !important; /* 모바일 세로 꺾임 해제 */
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        padding-bottom: 8px !important;
        margin-bottom: 15px !important; /* 헤더 하단 여백 축소 */
    }
    .header-left-group {
        display: flex !important;
        flex-direction: row !important; /* 텍스트 세로 정렬 방지 */
        align-items: center !important;
        gap: 8px !important;
        overflow: hidden;
    }
    
    /* 텍스트 크기 일괄 70% 수준으로 정밀 축소 */
    .news-category {
        font-size: 11px !important; 
        white-space: nowrap;
    }
    .news-title-text {
        font-size: 13.5px !important; 
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; /* 모바일 화면 오버시 말줄임표 처리 */
    }
    .news-date-text {
        font-size: 10.5px !important; 
        align-self: center !important;
        margin-top: 0 !important;
        white-space: nowrap;
    }
    
    /* 본문 글씨 영역 축소 및 공백 제거 */
    .news-text-area {
        margin-bottom: 20px !important;
    }
    .news-text-area p {
        font-size: 11px !important; /* 기존 15px의 약 70% 축소 완료 */
        line-height: 1.5 !important;
        margin-bottom: 5px !important;
    }
    
    /* 이미지 그룹 여백 축소 */
    .news-image-vertical-group {
        gap: 12px !important;
        margin-bottom: 0px !important; 
    }
    
    /* 1. 본문 영역 하단 마진을 줄여 이미지와 수평줄 사이 간격을 좁힙니다 */
    .news-view-container {
        margin-bottom: 10px !important; /* 기존 40px -> 10px로 축소 */
    }

    /* 2. LIST 버튼 상단 수평줄 패딩 및 푸터 마진 조절 */
    .news-view-footer-bar {
        padding-top: 10px !important;   /* 수평줄과 LIST 버튼 사이 간격 */
        margin-top: 0 !important;
        margin-bottom: 5px !important;  /* LIST 버튼과 검은색 회사 정보 푸터 사이 간격 */
    }

    /* LIST 버튼과 검은 푸터 사이 마진 제거 및 컴팩트화 */
    .news-view-footer-bar {
        padding-top: 12px !important;
        margin-bottom: 5px !important; /* 푸터 컴포넌트 간 여백 최소화 */
    }
    .news-list-btn {
        width: 85px !important;
        height: 30px !important;
        font-size: 11px !important;
    }
}