/* === 기본 변수, 레이아웃 === */

:root {
    --max-w: 1440px;
    /* 넓은 화면용 상한 */
    --gap: 16px;
    --text: #111;
    --muted: #666;
    --border: #eee;
}

body {
    line-height: 1.6;
    color: var(--text);
}

/* 뷰포트에 맞춰 여백이 살짝 커졌다 줄었다 */
.container {
    max-width: min(var(--max-w), 100%);
    margin: 0 auto;
    padding: 0 16px;
    /* 좌우 균등한 여백 고정 */
}


/* 가변 폰트 크기 (작은 화면에서 과대/과소 방지) */
html {
    font-size: clamp(14px, 1.05vw, 17px);
}

h1 {
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.2;
}

h2 {
    font-size: clamp(20px, 2.2vw, 28px);
}

h3 {
    font-size: clamp(16px, 1.6vw, 20px);
}

/* 미디어 요소는 줄어들게 */
img,
iframe,
video {
    max-width: 100%;
    height: auto;
}

/* 1024px 아래: 헤더 높이 살짝 줄이기 */
@media (max-width: 1024px) {
    .header__inner {
        height: 56px;
    }
}

/* 768px 아래: 패널을 한 컬럼으로, 메뉴 간격 촘촘하게 */
@media (max-width: 768px) {
    .panel__inner {
        grid-template-columns: 1fr;
    }

    .nav {
        gap: 16px;
    }
}

/* 480px 아래: 버튼/타이틀 행간 보정 */
@media (max-width: 480px) {

    .expand-btn,
    .close-btn {
        right: 10px;
        bottom: 10px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* === 헤더 === */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand-logo {
    height: 65px;
    /* 기존보다 조금 커서 시인성 향상 */
    width: auto;
    display: block;
    object-fit: contain;
}

/* === 상위 네비게이션 === */
.nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
}

.nav a {
    display: inline-block;
    padding: 12px 8px;
    text-decoration: none;
    color: #222;
    border-radius: 8px;
    transition: background .2s ease, color .2s ease;
}

.nav a:hover,
.nav a:focus-visible {
    background: #f5f5f5;
    outline: none;
}

.nav a.is-active,
.nav a[aria-current="page"] {
    background: #000;
    color: #fff;
}

/* === 패널 열림 로직 === */
.global-panel {
    display: none;
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* === 패널 안쪽 레이아웃: 3열 가로 고정 === */
.global-panel .panel__inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 회사소개 | 시공사례 | 고객지원 */
    gap: 24px;
    padding: 24px 16px;
}

/* === 각 컬럼은 항상 보이도록 === */
.panel__col {
    display: block;
}

/* === 컬럼 제목, 링크 스타일 === */
.panel__col h3 {
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 700;
}

.panel__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.panel__col li a {
    display: block;
    padding: 6px 0;
    color: #222;
    text-decoration: none;
}

.panel__col li a:hover {
    color: #000;
    font-weight: 600;
}

/* === 패널 안쪽 레이아웃: 3열 가로 고정(데스크탑) === */
.global-panel .panel__inner {
    display: grid !important;
    /* 충돌 방지용 */
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px;
    padding: 16px 0 24px;
}

/* 모바일(<= 720px)에서는 1열로 자동 전환 */
@media (max-width: 720px) {
    .global-panel .panel__inner {
        grid-template-columns: 1fr !important;
    }
}

/* 컬럼은 항상 보이게(섞여 있던 display:none 방지) */
.global-panel .panel__col {
    display: block !important;
}

/* === 반응형 처리 === */
@media (max-width: 720px) {
    .panel__inner {
        grid-template-columns: 1fr;
    }
}

/* === 히어로 섹션 === */
.hero {
    padding: clamp(40px, 8vh, 96px) 0;
}

/* 기존 구조용 설정 */
.hero h1 {
    margin: 0;
}

.hero.full {
    min-height: calc(100vh - 64px - 80px);
    display: flex;
    align-items: center;
}

/* === 건물 배경 이미지 및 중앙 배치 === */
.hero--main {
    position: relative;
    background: url("../img/building1.jpg") center/cover no-repeat;
    min-height: 60vh;
    /* 헤더 밑 공간 확보 */
    display: flex;
    align-items: center;
    justify-content: center;
}


/* 어두운 반투명 오버레이 */
.hero--main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 부모 높이에 맞게 자동 조정 */
    background: rgba(0, 0, 0, 0.45);
    /* 반투명 검정 */
    z-index: 0;
}

/* 안쪽 내용이 사진 위에 보이도록 */
.hero--main .container {
    position: relative;
    z-index: 1;
}

/* 메인 페이지 글씨 */
.hero-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.hero-container h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-container p {
    font-size: 20px;
    font-weight: 500;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3);
}

/* 버튼 스타일 */
.hero .btn {
    background: rgba(255, 255, 255, 0.9);
    color: #222;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.hero .btn:hover {
    background: #fff;
}

/* === 메인 섹션 간격 & 기본 구조 === */
.main-sections section {
    padding: 100px 0;
}

.main-sections section+section {
    margin-top: 60px;
}

@media (max-width: 768px) {
    .main-sections section {
        padding: 80px 0;
    }

    .main-sections section+section {
        margin-top: 60px;
    }
}

/* --- 회사소개 --- */
.about-section {
    margin-top: 80px;
    /* 메인배너와 거리 확보 */
}

.about-section .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
}

.about-section .text {
    flex: 1;
    min-width: 300px;
}

.about-section .text h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-section .text p {
    color: #555;
    line-height: 1.8;
}

.about-section img {
    flex: 1;
    min-width: 300px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- CEO 인사말 --- */
.ceo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.ceo-section .box {
    background: #f7f8fa;
    padding: 60px 40px;
    border-radius: 12px;
    max-width: 900px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.ceo-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
}

.ceo-section p {
    color: #555;
    line-height: 1.8;
    white-space: pre-line;
    text-align: left;
}

.ceo-section .sign {
    margin-top: 24px;
    font-weight: 600;
    text-align: right;
}

.ceo-signature {
    text-align: right !important;
    font-size: 16px;
    font-weight: 400;
    margin-top: 40px;
    font-family: 'Noto Sans KR', sans-serif;
    color: #111;
}

.ceo-signature span {
    font-family: 'Nanum Brush Script', cursive;
    font-size: 28px;
    font-weight: 700;
    margin-left: 10px;
    vertical-align: middle;
}

/* --- 회사연혁 --- */
.history-section {
    text-align: center;
}

.history-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
}

.history-section .timeline {
    display: inline-block;
    text-align: left;
    border-left: 3px solid #ddd;
    padding-left: 16px;
}

.history-section .timeline p {
    margin-bottom: 12px;
    color: #444;
    font-size: 16px;
}

/* === 푸터 === */
.footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.footer__inner {
    padding: 16px 0;
    font-size: 14px;
}

/* 스크롤바 폭 변화 방지 */
:root {
    --max-w: 1440px;
    --gap: 16px;
    --text: #111;
    --muted: #666;
    --border: #eee;
}

/* ✅ 추가: 항상 스크롤바 공간 확보 */
html {
    overflow-y: scroll;
}