/* ═══════════════════════════════════════════════════════════════
   🎨 CLARTE 헤더 & 푸터 시스템 (header-footer.css)
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────── Header ──────────────── */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    z-index: 200;
    transition: all 0.3s ease;
}

/* ──────────────── 홈페이지 투명 헤더 (기본 상태) ──────────────── */
body.home-page header {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

/* 홈페이지에서 스크롤했을 때 헤더 */
body.home-page header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* 홈페이지 투명 상태에서 텍스트 색상 (기본 상태) */
body.home-page header .nav a,
body.home-page header .auth-links a {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    font-weight: 400 !important;
}

/* 홈페이지 스크롤 상태에서 텍스트 색상 */
body.home-page header.scrolled .nav a,
body.home-page header.scrolled .auth-links a {
    color: var(--font-primary) !important;
    text-shadow: none !important;
    font-weight: 400 !important;
}

/* 홈페이지 투명 상태에서 검색창 스타일 (기본 상태) */
body.home-page header .search input {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

body.home-page header .search input::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

body.home-page header .search i {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 홈페이지 스크롤 상태에서 검색창 원래 스타일로 복원 */
body.home-page header.scrolled .search input {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--font-primary) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.home-page header.scrolled .search input::placeholder {
    color: var(--input-placeholder) !important;
}

body.home-page header.scrolled .search i {
    color: var(--font-light) !important;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 왼쪽 그룹: 로고 + nav */
.left-group {
    display: flex;
    align-items: center;
}

.nav {
    display: flex;
    gap: 34px;
    font-size: 15px;
    margin-left: 50px; /* 로고에서 50px 떨어진 위치 */
}

.nav a {
    transition: color 0.3s ease;
}

/* 오른쪽 그룹: search + auth-links */
.right-group {
    display: flex;
    align-items: center;
    gap: 50px; /* search와 auth-links 간 50px 간격 */
}

/* 로그인/회원가입/마이페이지 링크들을 묶는 새로운 클래스 */
.auth-links {
    display: flex;
    align-items: center;
    gap: 34px; /* nav와 동일한 gap */
    font-size: 14px;
}

.auth-links a {
    transition: color 0.3s ease;
}

/* 검색 입력창 별도 위치 */
.search {
    position: relative;
}

.search input {
    width: 260px; /* 길이 260으로 고정 */
    height: 32px;
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 0 34px 0 14px;
    font-size: 13px;
    background: var(--input-bg);
    transition: all 0.3s ease;
}

.search input::placeholder {
    color: var(--input-placeholder);
    transition: color 0.3s ease;
}

.search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--font-light);
    font-size: 14px;
    transition: color 0.3s ease;
}

.logo img {
    height: 22px;
}

header .logo {
    background: none !important;
    font-size: 0;
}

header .logo img {
    height: 40px;
    width: auto;
    display: block;
}

header .header-inner {
    display: flex;
    align-items: center;
}

/* ──────────────── Notice & Footer ──────────────── */
.notice-wrap {
    padding: 70px 0 70px;
}

.notice-grid {
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 40px;
}

.notice-grid h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
}

.notice-grid li {
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--divider-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ──────────────── 푸터 전체 너비 설정 ──────────────── */
footer {
    background: var(--bg-footer);
    color: var(--footer-info-text);
    width: 100vw; /* 뷰포트 전체 너비 */
    position: relative;
    left: 50%;
    margin-left: -50vw; /* 중앙에서 왼쪽으로 50vw 이동하여 전체 너비 확보 */
    padding: 0; /* 기본 패딩 제거 */
}

footer .footer-inner {
    width: 100%; /* 전체 너비 사용 */
    padding: 66px 0 66px 110px; /* 위66px 오른쪽0 아래66px 왼쪽120px */
}

footer .company-info {
    width: 100%; /* 전체 너비 사용 */
    box-sizing: border-box;
    line-height: 1.6;
    display: flex;
    flex-direction: column; /* 세로 배열 */
    gap: 14px; /* 각 요소 간 14px 간격 */
}

footer .footer-logo {
    margin-left: -26px; /* 상위 컨테이너 기준 -20px */
    display: block;
}

footer .footer-logo img {
    height: 40px;
    width: auto;
    display: block;
}

footer .company-name {
    font-weight: 700;
    color: var(--footer-company-text);
    font-size: 18px;
    display: block;
    margin: 24px 0; /* 위아래 14px 간격 */
}

footer .company-details {
    display: grid;
    grid-template-columns: 260px 1fr; /* 1열 160px 고정, 2열 나머지 공간 */
    gap: 6px 40px; /* 행 간격 6px, 열 간격 40px */
    font-size: 14px;
    font-weight: 400;
    margin-top: 24px; /* 상단 14px 간격 */
}

footer .company-details .detail-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 6px; /* 각 아이템 간 6px 간격 */
}

/* 헤더 내부 컨테이너 너비 확장 */
header .header-inner {
    max-width: none !important; /* 기존 container 클래스 max-width 무시 */
    margin: 0 !important; /* 기존 margin-inline: auto 무시 */
    padding: 0 100px; /* 좌우 패딩 100px */
    width: 100%; /* 전체 너비 사용 */
    box-sizing: border-box;
}

/* ──────────────── 1200px 미만 반응형 ──────────────── */
@media (max-width: 1199px) {
    header .header-inner {
        padding: 0 70px;
    }

    footer .footer-inner {
        padding: 66px 0 66px 70px; /* 모바일에서 좌측 패딩 줄임 */
    }

    /* nav와 search 숨기기 */
    .nav {
        display: none;
    }

    .search {
        display: none;
    }

    /* 로고와 auth-links만 양쪽 끝에 배치 */
    .left-group {
        flex: none;
    }

    .right-group {
        flex: none;
    }
}

/* ──────────────── 990px 미만 반응형 ──────────────── */
@media (max-width: 989px) {
    header .header-inner {
        padding: 0 70px;
        justify-content: flex-start;
    }

    footer .footer-inner {
        padding: 66px 0 66px 70px; /* 모바일에서 좌측 패딩 더 줄임 */
    }

    /* 모든 요소 숨기고 로고만 표시 */
    .nav {
        display: none;
    }

    .search {
        display: none;
    }

    .auth-links {
        display: none;
    }

    .right-group {
        display: none;
    }
}