/* ===================================
   푸르지오 헤더 스타일 통합 (PC & Mobile)
   =================================== */

/* 스크롤바 숨김 */
::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 선택 텍스트 스타일 */
::selection {
    background: #3498db;
    color: white;
}

/* 포커스 스타일 */
*:focus {
    outline: none;
}

/* 모든 링크의 밑줄 제거 */
a {
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
    text-decoration-thickness: 0 !important;
}

a:hover,
a:visited,
a:active,
a:focus {
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
    text-decoration-thickness: 0 !important;
}

/* 접근성을 위한 포커스 스타일 (키보드 사용자용) */
*:focus-visible {
    outline: none;
}

/* 헤더 내 링크들의 포커스 스타일 제거 */
.header a:focus,
.header button:focus {
    outline: none;
}

/* 접근성 개선 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .section-title::after {
        background: #000;
    }
    
    .nav-btn {
        background: rgba(0,0,0,0.8);
        color: white;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #fff;
    }
    
    .section {
        background: #2d2d2d;
    }
}

/* 인쇄 스타일 */
@media print {
    .banner-nav,
    .premium-nav,
    .nav-btn,
    .footer {
        display: none !important;
    }
    
    .section {
        height: auto !important;
        page-break-inside: avoid;
    }
}

/* 서브페이지 body 패딩 */
body {
    padding-top: 0; /* PC 상단 흰색 영역 제거 */
}

@media (max-width: 1024px) {
    body {
        padding-top: 0; /* 모바일 상단 흰색 배경 제거 */
    }
}

/* 아이콘 폰트 (Xeicon) */
@import url('https://cdn.jsdelivr.net/npm/xeicon@2.3.3/xeicon.min.css');


/* ===================================
   헤더 기본 스타일 (PC)
   =================================== */
.theme-header, .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent; /* 초기 투명 */
    z-index: 9999;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.1); /* 투명 시 경계선도 연하게 */
}

/* 스크롤 시 또는 호버 시 스타일 */
.theme-header.scrolled, .header.scrolled,
.theme-header.hovered, .header.hovered {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
}

/* 로고 스타일 */
.header-logo, .logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-logo a, .logo a {
    text-decoration: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.logo-brand {
    font-family: 'Arial', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #fff; /* 초기 화이트 */
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.prugio-header.scrolled .logo-brand, .header.scrolled .logo-brand,
.prugio-header.hovered .logo-brand, .header.hovered .logo-brand {
    color: #1a1a1a;
}

/* 호버 시 로고 이미지 색상 반전 (흰색 -> 검정색) */
.prugio-header.hovered .logo-image, 
.header.hovered .logo-image,
.theme-header.hovered .logo-image {
    filter: brightness(0);
}

.logo-project {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,0.8); /* 초기 화이트 계열 */
    letter-spacing: -0.3px;
    transition: color 0.3s ease;
}

.prugio-header.scrolled .logo-project, .header.scrolled .logo-project,
.prugio-header.hovered .logo-project, .header.hovered .logo-project {
    color: #666;
}

/* 데스크톱 네비게이션 */
.desktop-nav, .main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 60px;
}

.main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 65px;
    align-items: center;
}

.menu-item > a, .main-nav a {
    display: block;
    padding: 40px 0;
    color: #fff; /* 초기 화이트 */
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.3s ease;
    cursor: pointer;
    position: relative;
}

.prugio-header.scrolled .menu-item > a, .header.scrolled .main-nav a,
.prugio-header.hovered .menu-item > a, .header.hovered .main-nav a {
    color: #333;
}

.menu-item > a:hover,
.menu-item.active > a,
.main-nav a:hover,
.main-nav a.active {
    color: #fff; /* 투명 상태 호버도 화이트 유지 (또는 포인트 컬러) */
    font-weight: 500;
}

.prugio-header.scrolled .menu-item > a:hover,
.prugio-header.scrolled .menu-item.active > a,
.header.scrolled .main-nav a:hover,
.header.scrolled .main-nav a.active,
.prugio-header.hovered .menu-item > a:hover,
.prugio-header.hovered .menu-item.active > a,
.header.hovered .main-nav a:hover,
.header.hovered .main-nav a.active {
    color: #1a1a1a;
}

/* 전화번호 버튼 */
.header-contact, .contact-info {
    flex-shrink: 0;
}

.phone-button {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.phone-icon {
    width: 40px;
    height: 40px;
    background: #004e50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.phone-icon i {
    font-size: 16px;
    color: #fff !important;
    display: inline-block !important;
    line-height: 1;
    font-style: normal;
    vertical-align: middle;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.phone-icon .fa-phone::before {
    content: "\f095";
}

.phone-button:hover .phone-icon {
    background: #004e50;
    transform: scale(1.05);
}

.phone-number {
    font-size: 20px;
    font-weight: 600;
    color: #fff; /* 초기 화이트 */
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.prugio-header.scrolled .phone-number, .header.scrolled .phone-number,
.prugio-header.hovered .phone-number, .header.hovered .phone-number {
    color: #333;
}

.phone-button:hover .phone-number {
    color: #004e50; /* 호버 시 그린 */
}

/* ===================================
   풀드롭다운 메뉴
   =================================== */
.full-dropdown-menu {
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

.full-dropdown-menu.active,
.prugio-header.hovered .full-dropdown-menu,
.header.hovered .full-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

/* 헤더에 호버 시에도 드롭다운 표시 (JS 외에 CSS로도 보조) 
   - JS가 더 정교한 제어를 위해 사용되지만, 호버 시 배경 흰색 전환과 연동 */

.dropdown-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.dropdown-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.dropdown-content-wrapper {
    padding: 40px 0;
    width: 100%;
}

.submenu-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 65px;
}

.submenu-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 140px;
}

.submenu-item {
    border-bottom: 1px solid #f0f0f0;
}

.submenu-item:last-child {
    border-bottom: none;
}

.submenu-item a {
    display: block;
    padding: 14px 0;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.submenu-item a:hover {
    color: #004e50;
    font-weight: 500;
    padding-left: 6px;
}

/* ===================================
   모바일 메뉴 (사이드바 & 헤더 변형)
   =================================== */
.mobile-menu-toggle {
    display: none; /* PC에서는 숨김 */
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 26px;
    height: 2px;
    background: #fff; /* 모바일 헤더는 항상 투명이므로 아이콘은 화이트 */
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    max-width: 85%;
    height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100000;
}

.mobile-menu-overlay.active .mobile-menu-container {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-logo span {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 30px;
    color: #333;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    line-height: 1;
    z-index: 10001;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    -webkit-appearance: none;
    appearance: none;
    opacity: 1 !important;
    visibility: visible !important;
}

.mobile-menu-close:hover {
    color: #004e50;
}

.mobile-menu-close i {
    font-size: 28px;
    line-height: 1;
    color: inherit;
}

/* SVG Close Icon Fallback */
.mobile-menu-close svg {
    width: 24px;
    height: 24px;
    stroke: #333;
    stroke-width: 2;
    fill: none;
}

.mobile-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.mobile-main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-item > a,
.mobile-menu-item > .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: none;
    width: 100%;
    border: none;
    text-align: left;
}

.mobile-menu-item > a:hover,
.mobile-menu-item > .menu-toggle:hover {
    background: #f8f9fa;
    color: #004e50;
}

.mobile-menu-item.has-submenu > .menu-toggle {
    cursor: pointer;
}

.mobile-menu-item.has-submenu > .menu-toggle i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.mobile-menu-item.active > .menu-toggle i {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu li a {
    display: block;
    padding: 16px 25px 16px 45px;
    color: #666;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

.mobile-submenu li a:hover {
    background: #fff;
    color: #004e50;
}

.mobile-menu-footer {
    padding: 25px;
    border-top: 1px solid #e0e0e0;
}

.mobile-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px;
    background: #004e50;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 17px;
    transition: all 0.3s ease;
}

.mobile-contact-btn:hover {
    background: #004e50;
}

.mobile-contact-btn i {
    font-size: 22px;
}

/* ===================================
   반응형 미디어 쿼리 (Mobile Header Special)
   =================================== */
@media (min-width: 1601px) {
    .header-container,
    .dropdown-container {
        max-width: 1800px;
    }
}

@media (max-width: 1400px) {
    .header-container,
    .dropdown-container {
        padding: 0 40px;
    }
    
    .main-menu {
        gap: 40px;
    }
    
    .menu-item > a {
        font-size: 16px;
    }
    
    .desktop-nav {
        margin: 0 40px;
    }
}

@media (max-width: 1200px) {
    .header-container,
    .dropdown-container {
        padding: 0 30px;
    }
    
    .main-menu {
        gap: 30px;
    }
    
    .submenu-grid {
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    /* Header Base - Mobile: Transparent & No Border */
    .theme-header, .header {
        background: transparent !important;
        backdrop-filter: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
        padding: 0;
        height: auto;
    }
    
    /* 모바일에서는 스크롤되어도 투명 유지 (또는 필요 시 변경) */
    .prugio-header.scrolled, .header.scrolled,
    .prugio-header.hovered, .header.hovered {
        background: transparent !important;
        border-bottom: none !important;
        box-shadow: none !important;
    }

    .header-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        width: 100%;
        position: relative;
        height: 70px;
    }

    /* Hide Desktop Elements */
    .desktop-nav, .main-nav {
        display: none !important;
    }
    
    .header-top-mobile {
        display: none !important;
    }

    /* Hamburger Menu (Left) */
    .mobile-menu-toggle {
        display: flex !important;
        order: 1;
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.8);
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        border: none;
        cursor: pointer;
        flex-direction: column;
        gap: 4px;
        padding: 0;
        z-index: 10;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        background-color: #fff;
        transition: all 0.3s ease;
    }

    /* Logo (Center) */
    .header-logo, .logo {
        order: 2;
        flex: 1;
        justify-content: center;
        margin: 0;
        padding: 0;
    }

    .header-logo a, .logo a {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        justify-content: center;
    }

    .logo-brand {
        font-size: 1.2rem;
        font-weight: 700;
        letter-spacing: 1px;
        color: #fff;
    }
    
    .logo-project {
        font-size: 0.9rem;
        font-weight: 400;
        color: #fff;
        border-left: 1px solid rgba(255,255,255,0.5);
        padding-left: 6px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .logo img {
        height: 30px;
        width: auto;
    }

    /* Phone Icon (Right) */
    .header-contact, .contact-info {
        order: 3;
        display: block !important;
        flex-shrink: 0;
    }

    .phone-button {
        display: flex;
        width: 40px;
        height: 40px;
        background: #004e50;
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        text-decoration: none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    .phone-icon {
        width: 100%;
        height: 100%;
        background: transparent; /* Remove inner bg as parent has it */
        border-radius: 50%; /* Maintain radius */
    }
    
    .phone-icon i {
        font-size: 18px;
        color: #fff !important; /* Force white */
    }

    .phone-number {
        display: none; /* Hide text */
    }
    
    /* Dropdown Hide */
    .full-dropdown-menu {
        display: none !important;
    }
    
    .submenu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .dropdown-content-wrapper {
        padding: 35px 0;
    }
}
