/* ================================================
   공통 네비게이션 바 스타일
   모든 페이지에 일관된 네비게이션 적용
   ================================================ */

.header,
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c5f4f 0%, #1a4838 100%);
    backdrop-filter: blur(20px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 3px solid rgba(212, 175, 55, 0.4);
}

.nav,
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-nav-logo,
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-nav-logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #d4af37 0%, #f0d98c 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    transition: all 0.3s ease;
}

.page-nav-logo-icon i,
.logo-icon {
    font-size: 26px;
    color: #2c5f4f;
    font-weight: 900;
}

/* 텍스트 로고 아이콘 "M" - 검사 페이지용 */
.page-nav-logo-icon-text {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #d4af37 0%, #f0d98c 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    font-weight: 900;
    color: #2c5f4f;
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
    letter-spacing: -1px;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 텍스트 로고 아이콘 "M" - 메인 페이지용 (index.html) */
.logo-icon-text {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #d4af37 0%, #f0d98c 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
    color: #2c5f4f;
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
    letter-spacing: -1px;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 로고 아이콘 내부 아이콘 스타일 */
.logo-icon-text i,
.page-nav-logo-icon-text i {
    font-size: 26px;
    color: #2c5f4f;
    font-weight: 900;
    z-index: 2;
    position: relative;
}

.page-nav-logo-icon-text::before,
.logo-icon-text::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.page-nav-logo:hover .page-nav-logo-icon-text::before,
.nav-logo:hover .logo-icon-text::before {
    left: 100%;
}

.page-nav-logo:hover .page-nav-logo-icon {
    transform: scale(1.08) translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.5));
}

.page-nav-logo:hover .page-nav-logo-icon-text,
.nav-logo:hover .logo-icon-text {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.7);
    background: linear-gradient(135deg, #f0d98c 0%, #d4af37 100%);
}

.page-nav-logo-text,
.logo-text-main {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
}

.nav-menu,
.page-nav-menu {
    display: flex;
    list-style: none;
    gap: 45px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link,
.page-nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 10px 18px;
    border-radius: 8px;
}

.nav-link::after,
.page-nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 16px;
    width: 0;
    height: 2px;
    background: #d4af37;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.nav-link:hover,
.page-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link:hover::after,
.page-nav-link:hover::after {
    width: calc(100% - 32px);
}

.nav-link.admin-link {
    color: #ffffff;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.2));
    border: 1px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.nav-link.admin-link:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.5), rgba(212, 175, 55, 0.3));
    border-color: rgba(212, 175, 55, 0.8);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.5);
}

.nav-link.admin-link i {
    margin-right: 6px;
    color: #d4af37;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: #d4af37;
    transform: scale(1.1);
}

.theme-toggle {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-size: 22px;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #d4af37;
    color: #d4af37;
    transform: scale(1.1) rotate(20deg);
}

.page-nav-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
}

.page-nav-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.page-nav-center {
    display: flex;
    gap: 30px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.page-nav-item {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 10px 16px;
    border-radius: 8px;
    white-space: nowrap;
}

.page-nav-item::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 16px;
    width: 0;
    height: 2px;
    background: #d4af37;
    transition: width 0.3s ease;
}

.page-nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.page-nav-item:hover::after {
    width: calc(100% - 32px);
}

.page-nav-item.active {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.15);
}

/* 드롭다운 메뉴 */
.page-nav-dropdown,
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dropdown-toggle .fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.page-nav-dropdown-content,
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: rgba(26, 72, 56, 0.98);
    backdrop-filter: blur(20px);
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 10px;
    z-index: 1001;
    border: 1px solid rgba(212, 175, 55, 0.3);
    list-style: none;
}

.page-nav-dropdown:hover .page-nav-dropdown-content,
.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.page-nav-dropdown-content a,
.dropdown-menu a {
    display: block;
    padding: 12px 18px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
}

.page-nav-dropdown-content a:hover,
.dropdown-menu a:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37;
    transform: translateX(5px);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-nav-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.page-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-nav-btn-back {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.page-nav-btn-back:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-3px);
}

.page-nav-btn-home {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.2));
    color: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.page-nav-btn-home:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.5), rgba(212, 175, 55, 0.3));
    border-color: rgba(212, 175, 55, 0.8);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.page-nav-btn i {
    font-size: 1.1rem;
}

/* 페이지 컨텐츠 여백 (네비게이션 바 높이만큼) */
.page-content-wrapper {
    padding-top: 80px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .page-nav {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    
    .page-nav-left {
        gap: 12px;
    }
    
    .page-nav-logo-icon {
        width: 38px;
        height: 38px;
    }
    
    .page-nav-logo-icon-text {
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
        border-radius: 10px;
    }
    
    .page-nav-logo-text,
    .logo-text-main,
    .logo-text {
        font-size: 1.2rem;
    }
    
    .page-nav-title {
        display: none;
    }
    
    .page-nav-divider {
        display: none;
    }
    
    .page-nav-right {
        gap: 8px;
    }
    
    .page-nav-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .page-nav-btn span {
        display: none;
    }
    
    .page-nav-btn i {
        margin-right: 0 !important;
    }
    
    /* 모바일에서 메뉴 숨기기 */
    .page-nav-menu,
    .nav-menu {
        display: none;
    }
    
    /* 모바일 토글 버튼 표시 */
    .mobile-menu-toggle {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .page-nav {
        padding: 12px 15px;
    }
    
    .page-nav-logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .page-nav-logo-icon-text {
        width: 35px;
        height: 35px;
        font-size: 1.4rem;
        border-radius: 8px;
    }
    
    .page-nav-logo-text {
        font-size: 1.1rem;
    }
    
    .page-nav-btn {
        padding: 8px 12px;
    }
}

/* ================================================
   드롭다운 메뉴 스타일 (메인 네비게이션)
   ================================================ */

.nav-dropdown {
    position: relative;
}

.nav-dropdown > .nav-link,
.nav-dropdown > .page-nav-link,
.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-dropdown > .nav-link i,
.nav-dropdown > .page-nav-link i,
.dropdown-trigger i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover > .nav-link i,
.nav-dropdown:hover > .page-nav-link i,
.nav-dropdown:hover .dropdown-trigger i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 15px;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 15px;
    border: 2px solid rgba(212, 175, 55, 0.2);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    list-style: none;
    margin-bottom: 8px;
}

.dropdown-menu li:last-child {
    margin-bottom: 0;
}

.dropdown-menu a,
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #2c5f4f !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 10px;
    background: white;
}

.dropdown-menu a i,
.dropdown-item i {
    color: #d4af37;
    font-size: 18px;
    width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover,
.dropdown-item:hover {
    background: linear-gradient(135deg, #f9f6ed, #ffffff);
    color: #1a4838 !important;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.dropdown-menu a:hover i,
.dropdown-item:hover i {
    color: #2c5f4f;
    transform: scale(1.1);
}

/* Dark Mode */
body.dark-mode .dropdown-menu {
    background: #0f3460;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(212, 175, 55, 0.3);
}

body.dark-mode .dropdown-menu a {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .dropdown-menu a:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37 !important;
}

/* 모바일에서는 드롭다운 비활성화 */
@media (max-width: 768px) {
    .nav-dropdown > .nav-link i {
        display: none;
    }
    
    .dropdown-menu {
        display: none;
    }
}
