/* ===========================================
   암텍 홈페이지 공통 스타일시트
   모든 페이지에서 공통으로 사용되는 스타일
   =========================================== */

/* ===========================================
   1. 전역 스타일 및 기본 설정
   =========================================== */

/* 전역 안전벨트 - 문제 원인이 제거되면 주석 처리 */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* 전역 이미지/비디오 스타일 */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 긴 텍스트 오버플로우 방지 */
.email, .url, code, pre {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* 기본 폰트 설정 */
@font-face {
    font-family: 'GmarketSansMedium';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'GmarketSansLight';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansLight.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'GmarketSansMedium', sans-serif;
    background-color: #f5f7fa;
}

/* ===========================================
   2. 네비게이션 바 스타일
   =========================================== */

/* 네비게이션 바 기본 스타일 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

/* 스크롤 시 네비게이션 바 투명도 변경 */
.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

/* 네비게이션 브랜드 로고 */
.navbar-brand {
    padding: 0;
    margin-left: 0px;
}

.navbar-brand img {
    height: 35px;
    filter: brightness(0);
}

/* 네비게이션 링크 스타일 */
.nav-link {
    color: #444;
    font-weight: 400;
    padding: 0.5rem 1rem;
    position: relative;
}

.nav-link:hover {
    color: #1a56ff;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: #1a56ff;
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 네비게이션 아이템 */
.nav-item {
    margin: 0 40px;
    position: relative;
    transition: all 0.2s ease;
}

/* 드롭다운 메뉴 */
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    background-color: #fff;
    border-radius: 8px;
    min-width: 220px;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-weight: 400;
    font-family: 'GmarketSansLight', sans-serif;
    font-size: 0.9rem;
    position: relative;
    transition: all 0.2s ease;
    color: #000;
}

.dropdown-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 0;
    height: 1px;
    background-color: #e0e0e0;
}

.dropdown-item:hover {
    background-color: #edf2ff;
    color: #1a56ff;
    font-weight: 500;
}

.dropdown-item:active {
    background-color: #dbe4ff;
    color: #1a56ff;
}

/* 네비게이션 토글 버튼 */
.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-nav {
    margin: 0 auto;
}

/* 영문 링크 스타일 */
.english-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #444;
    margin-left: 20px;
    transition: all 0.3s ease;
    position: relative;
    right: 60px;
}

.english-link:hover {
    color: #1a56ff;
    transform: translateY(-2px);
}

.english-link i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.english-link span {
    font-size: 0.8rem;
    font-weight: 300;
}

/* ===========================================
   3. 푸터 스타일
   =========================================== */

.footer {
    background-color: #2a2a2a;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 40px;
    position: relative;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-content {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 40px;
}

.footer-info {
    text-align: left;
}

.footer-info h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #fff;
}

.footer-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 10px;
    font-weight: 300;
    font-family: 'GmarketSansLight', sans-serif;
}

.footer-info .address {
    margin-bottom: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    position: relative;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    width: 100vw;
}

.copyright {
    font-size: 0.9rem;
    color: #999;
    position: relative;
    z-index: 1;
}

/* ===========================================
   4. 반응형 스타일
   =========================================== */

/* Bootstrap 기본 브레이크포인트 */
@media (max-width: 575.98px) { /* xs */ }
@media (min-width: 576px) and (max-width: 767.98px) { /* sm */ }
@media (min-width: 768px) and (max-width: 991.98px) { /* md */ }
@media (min-width: 992px) and (max-width: 1199.98px) { /* lg */ }
@media (min-width: 1200px) and (max-width: 1399.98px) { /* xl */ }
@media (min-width: 1400px) { /* xxl */ }

/* 갤럭시탭 S8+, Ultra Portrait (세로: 약 800px ~ 960px) */
@media (min-device-width: 800px) and (max-device-width: 980px) and (orientation: portrait) {
    /* 세로 모드 전용 스타일 */
}

/* 모바일 네비게이션 메뉴 스타일 */
@media (max-width: 1199.98px) {
    .navbar-collapse {
        margin-top: 0px;
        padding-top: 0px;
        border-top: 1px solid #eee;
        background-color: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .nav-item {
        margin: 0px 0px 10px 20px;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 20px;
    }

    .navbar-brand {
        padding: 0;
        margin-left: 0px;
    }

    .navbar-brand img {
        height: 28px;
    }

    .english-link {
        margin: 10px 20px;
        right: 0;
    }
}

/* 푸터 반응형 스타일 */
@media (max-width: 767.98px) {
    .footer {
        padding: 40px 0 20px;
    }

    .footer-info h3 {
        font-size: 1.3rem;
    }

    .footer-info p {
        font-size: 0.9rem;
    }

    .copyright {
        font-size: 0.85rem;
    }
}
