/* =================================== */
/* 🧩 COMPONENT STYLES (Mobile/Desktop) */
/* =================================== */

/* =================================== */
/* 🖥️📱 RESPONSIVE VISIBILITY CONTROL */
/* =================================== */

/* 데스크탑 컴포넌트 기본 표시 (768px 이상) */
.d-header,
.d-navbar,
.d-footer {
    display: block;
}

/* 모바일 컴포넌트 기본 숨김 */
.m-header,
.m-navbar,
.m-footer {
    display: none;
}

/* 모바일 미디어쿼리 (767px 이하) */
@media (max-width: 767px) {
    /* 데스크탑 숨김 */
    .d-header,
    .d-navbar,
    .d-footer {
        display: none;
    }
    
    /* 모바일 표시 */
    .m-header,
    .m-navbar,
    .m-footer {
        display: block;
    }
    
    /* 기존 네비게이션바도 숨김 */
    .navbar {
        display: none;
    }
    
    /* 기존 푸터도 숨김 */
    .footer {
        display: none;
    }
}

/* =================================== */
/* 🖥️ DESKTOP NAVIGATION STYLES */
/* =================================== */

.d-navbar {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(18, 1, 1, 0.05);
    height: 7.4vh;
    min-height: 54px;
    max-height: 84px;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.d-navbar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    height: 100%;
}

/* 데스크탑 로고 */
.d-navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 40px;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.d-navbar-logo-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: scale(0.8);
}

/* 스크롤 시 로고 숨김 */
.d-navbar.scrolled .d-navbar-logo {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(-20px);
}

/* 데스크탑 메뉴 */
.d-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 16px;
    gap: 88px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.d-nav-item {
    position: relative;
    text-align: center;
}

/* 각 메뉴별 고정 너비 설정 */
.d-nav-item:nth-child(1) { /* HOME */
    width: 85px;
}

.d-nav-item:nth-child(2) { /* PRODUCT */
    width: 119px;
}

.d-nav-item:nth-child(3) { /* MEMBERS */
    width: 120px;
}

.d-nav-item:nth-child(4) { /* HISTORY */
    width: 108px;
}

.d-nav-link {
    color: #888888;
    text-decoration: none;
    padding: 5px 2px;
    border-radius: 0px;
    transition: all 0.3s ease;
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: -2.5%;
    position: relative;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.d-nav-link:hover {
    color: #ddd;
    border-radius: 10px;
    background-color: rgba(221, 221, 221, 0.05);
}

.d-nav-link.active {
    color: #ddd;
}

.d-nav-link.active::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    height: 1.5px;
    background-color: #888888;
}

/* 각 메뉴별 선 길이 설정 */
.d-nav-item:nth-child(1) .d-nav-link.active::after { /* HOME */
    width: 73px;
}

.d-nav-item:nth-child(2) .d-nav-link.active::after { /* PRODUCT */
    width: 107px;
}

.d-nav-item:nth-child(3) .d-nav-link.active::after { /* MEMBERS */
    width: 108px;
}

.d-nav-item:nth-child(4) .d-nav-link.active::after { /* HISTORY */
    width: 96px;
}

/* 데스크탑 CTA 버튼 */
.d-navbar-actions {
    position: absolute;
    right: 244px;
    top: 50%;
    transform: translateY(-50%);
}

.d-contact-button {
    background-color: white;
    color: #000;
    border-radius: 12px;
    padding: 12px 24px;
    width: 160px;
    height: 50px;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: -2.5%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.d-contact-button:hover {
    background-color: #f8f9fa;
    color: #FF2B00;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 데스크탑 드롭다운 메뉴 (태블릿용) */
.d-nav-dropdown {
    position: relative;
    display: none;
}

@media (max-width: 1024px) and (min-width: 768px) {
    .d-nav-menu {
        display: none;
    }
    
    .d-nav-dropdown {
        display: block;
    }
}

.d-dropdown-toggle {
    background: none;
    border: none;
    color: #888888;
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: -2.5%;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.d-dropdown-toggle:hover {
    background-color: rgba(136, 136, 136, 0.05);
}

.d-dropdown-toggle.active {
    color: #ddd;
    font-weight: 500;
}

.d-dropdown-toggle.active::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    height: 1px;
    width: calc(100% - 20px);
    background-color: #888888;
    opacity: 0.8;
}

.d-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 1, 1, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
}

.d-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.d-dropdown-item {
    display: block;
    color: #888888;
    text-decoration: none;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: -2.5%;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(136, 136, 136, 0.1);
    text-align: center;
}

.d-dropdown-item:last-child {
    border-bottom: none;
}

.d-dropdown-item:hover {
    background-color: rgba(136, 136, 136, 0.1);
    color: #fff;
}

.d-dropdown-item.active {
    font-weight: 700;
    color: #fff;
}

/* =================================== */
/* 📱 MOBILE NAVIGATION STYLES */
/* =================================== */

.m-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    height: 60px;
}

.m-navbar-container {
    display: flex;
    align-items: center;
    justify-content: center; /* 중앙 정렬 */
    padding: 0 1rem;
    height: 100%;
}

.m-navbar-logo {
    display: flex;
    align-items: center;
}

/* 모바일 메뉴 버튼 (햄버거) - 숨김 */
.m-menu-button {
    display: none; /* 완전히 숨김 */
}
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 모바일 로고 */
.m-navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.m-navbar-logo-img {
    height: 35px;
    width: auto;
}

/* 모바일 액션 버튼들 - 검색 버튼 제거됨 */
.m-navbar-actions {
    display: none; /* 검색 버튼 컨테이너 숨김 */
}

.m-search-button {
    display: none; /* 검색 버튼 완전 숨김 */
}

/* 🔥 모바일 슬라이드 메뉴 (오른쪽에서 절반 크기) */
.m-fullscreen-menu {
    display: none !important; /* 완전히 숨김 */
}

.m-fullscreen-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.m-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 40vw; /* 나머지 화면 영역 */
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* 메뉴 활성화 시 오버레이 표시 */
.m-fullscreen-menu.active .m-menu-overlay {
    opacity: 1;
    visibility: visible;
}

.m-menu-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 80px 20px 20px 20px; /* 상단 여백 추가 */
    box-sizing: border-box;
    overflow-y: auto;
}

/* 메뉴 헤더 */
.m-menu-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 닫기 버튼만 오른쪽에 */
    padding: 15px 20px;
    height: 60px;
    background: transparent;
}

.m-menu-logo {
    display: none; /* 로고 숨김 */
}

.m-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: transform 0.3s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-menu-close:hover {
    transform: rotate(90deg);
    background: rgba(255, 255, 255, 0.1);
}

/* 메뉴 리스트 */
.m-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 400px;
}

.m-menu-item {
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease forwards;
}

.m-menu-item:nth-child(1) { animation-delay: 0.1s; }
.m-menu-item:nth-child(2) { animation-delay: 0.2s; }
.m-menu-item:nth-child(3) { animation-delay: 0.3s; }
.m-menu-item:nth-child(4) { animation-delay: 0.4s; }
.m-menu-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.m-menu-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 16px 20px;
    background: transparent;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
    text-align: left;
}

.m-menu-link:hover,
.m-menu-link:active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.m-menu-link-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.m-menu-icon {
    font-size: 1.2rem;
    width: 20px;
}

.m-menu-text {
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.m-menu-arrow {
    display: none; /* 화살표 숨김 */
}

.m-menu-link:hover .m-menu-arrow {
    transform: translateX(5px);
    opacity: 1;
}

.m-menu-desc {
    display: none; /* 설명 텍스트 숨김 */
}

/* 특별한 Contact 아이템 */
.m-contact-item {
    margin-top: 1.5rem;
}

.m-contact-link {
    background: linear-gradient(135deg, #FF2B00, #FF6B4A);
    border: none;
}

.m-contact-link:hover {
    background: linear-gradient(135deg, #E02500, #FF5530);
    box-shadow: 0 12px 30px rgba(255, 43, 0, 0.3);
}

/* 메뉴 푸터 - 숨김 */
.m-menu-footer {
    display: none;
}

.m-contact-info {
    margin-bottom: 1rem;
}

.m-contact-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.m-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin: 0;
}

/* =================================== */
/* 🖥️ DESKTOP FOOTER */
/* =================================== */

.d-footer {
    background-color: #120101;
    padding: 60px 0 0 0;
    margin-top: 0;
    width: 100%;
}

.d-footer-container {
    width: 100%;
    margin: 0;
    padding: 0 40px;
    box-sizing: border-box;
}

.d-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 40px;
    padding: 0 80px;
}

.d-footer-company {
    flex: 1;
    min-width: 300px;
}

.d-footer-logo {
    font-size: 24px;
    color: #8597ab;
    margin-bottom: 20px;
    display: block;
    text-decoration: none;
}

.d-footer-info {
    color: #777;
    font-size: 14px;
    line-height: 1.6;
}

.d-footer-info p {
    margin: 5px 0;
}

.d-footer-links {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
}

.d-footer-column {
    min-width: 120px;
}

.d-footer-column h4 {
    color: #8597ab;
    margin-bottom: 15px;
    font-size: 16px;
}

.d-footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.d-footer-column li {
    margin-bottom: 8px;
}

.d-footer-column a {
    color: #777;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.d-footer-column a:hover {
    color: #8597ab;
}

.d-footer-bottom {
    border-top: 1px solid #818c98;
    padding-top: 20px;
    padding-bottom: 0;
    margin-bottom: 0;
    text-align: right;
}

.d-footer-copyright {
    color: #777;
    font-size: 12px;
}

/* 📱 MOBILE FOOTER */
.m-footer {
    background: #120101;
    color: white;
    padding: 2rem 0 1rem;
}

.m-footer-container {
    padding: 0 1rem;
}

.m-footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.m-footer-company {
    text-align: center;
}

.m-footer-logo {
    font-size: 24px;
    color: #8597ab;
    margin-bottom: 20px;
    display: block;
    text-decoration: none;
}

.m-footer-info {
    color: #777;
    font-size: 14px;
    line-height: 1.6;
}

.m-footer-info p {
    margin: 5px 0;
}

.m-footer-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.m-footer-column {
    flex: 1;
}

.m-footer-column h4 {
    color: #8597ab;
    margin-bottom: 15px;
    font-size: 16px;
}

.m-footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.m-footer-column li {
    margin-bottom: 8px;
}

.m-footer-column a {
    color: #777;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.m-footer-column a:hover {
    color: #8597ab;
}

.m-footer-bottom {
    border-top: 1px solid #818c98;
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
}

.m-footer-copyright {
    color: #777;
    font-size: 12px;
}

/* =================================== */
/* 🔧 UTILITY COMPONENTS */
/* =================================== */

/* 스크롤 투 탑 버튼 */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background-color: rgba(136, 136, 136, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    transform: scale(0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.footer-mode {
    background-color: rgba(197, 197, 197, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.footer-mode::before {
    color: #333;
}

.scroll-to-top::before {
    content: '🡱';
    font-size: 24px;
    color: #c5c5c5;
    font-weight: bold;
    line-height: 1;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-to-top:hover {
    transform: scale(1.05);
    background-color: rgba(136, 136, 136, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* 실시간 문의 버튼 - 책갈피 스타일 */
.live-chat-btn {
    position: fixed;
    top: 45%;
    right: 0;
    transform: translateY(-50%);
    background-color: rgba(118, 118, 118, 0.5);
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 20px 12px;
    cursor: pointer;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    min-width: 60px;
    writing-mode: horizontal-tb;
}

.live-chat-btn::before {
    content: '💬';
    font-size: 18px;
}

.live-chat-btn:hover {
    transform: translateY(-50%) translateX(-5px);
    background-color: rgba(70, 70, 70, 0.9);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.4);
}

.live-chat-btn.footer-mode {
    background-color: rgba(197, 197, 197, 0.9);
    color: #333;
    backdrop-filter: blur(8px);
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.live-chat-btn.footer-mode:hover {
    background-color: rgba(150, 150, 150, 0.95);
    transform: translateY(-50%) translateX(-5px);
}

/* =================================== */
/* 🔧 LEGACY STYLES (기존 코드와의 호환성) */
/* =================================== */

/* 기존 네비게이션 바 (데스크탑에서만 표시) */
.navbar {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(18, 1, 1, 0.05);
    height: 7.4vh;
    min-height: 54px;
    max-height: 84px;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 기존 푸터 (데스크탑에서만 표시) */
.footer {
    background-color: #120101;
    padding: 60px 0 0 0;
    margin-top: 0;
    width: 100%;
}

.footer-container {
    width: 100%;
    margin: 0;
    padding: 0 40px;
    box-sizing: border-box;
}