/* ==========================================================================
   style_prestige_1.css (최종 통합본)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 기본 설정 및 변수 (Variables & Basic Setup)
   -------------------------------------------------------------------------- */
:root {
    --primary-color: #2c3e50; /* 딥 블루 */
    --secondary-color: #34495e; /* 쿨 그레이 */
    --accent-color: #d35400; /* 포인트 오렌지 */
    --text-color: #333;
    --light-gray: #f8f9fa;
    --white-color: #ffffff;
    --font-main: 'Noto Sans KR', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--white-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.subtitle {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   2. 헤더 (Header)
   -------------------------------------------------------------------------- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color); /* 기본 로고 색상 (스크롤 후, 서브페이지) */
    font-weight: 900;
    font-size: 22px;
    transition: color 0.4s ease;
}

.logo img {
    height: 36px;
    margin-right: 12px;
    filter: none; /* 기본 로고 이미지 필터 없음 */
    transition: filter 0.4s ease;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color); /* 기본 메뉴 글자색 (스크롤 후, 서브페이지) */
    font-weight: 700;
    font-size: 16px;
    transition: color 0.3s;
}

/* --- 헤더 상태별 디자인 --- */
.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.main-header.scrolled .nav-links a:hover {
    color: var(--accent-color);
}

.main-header.transparent-header:not(.scrolled) {
    background-color: transparent;
}
.main-header.transparent-header:not(.scrolled) .logo,
.main-header.transparent-header:not(.scrolled) .nav-links a {
    color: var(--white-color);
}
.main-header.transparent-header:not(.scrolled) .logo:hover,
.main-header.transparent-header:not(.scrolled) .nav-links a:hover {
    color: rgba(255, 255, 255, 0.8);
}
.main-header.transparent-header:not(.scrolled) .logo img {
    filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

/* --------------------------------------------------------------------------
   3. 아이콘 사용자 메뉴 (User Menu)
   -------------------------------------------------------------------------- */
.user-menu {
    position: relative;
    margin-left: 24px;
}

.user-menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 24px;
    color: var(--secondary-color);
    transition: color 0.4s ease, transform 0.3s ease;
}

.user-menu-trigger:hover {
    transform: scale(1.1);
}

.main-header.transparent-header:not(.scrolled) .user-menu-trigger {
    color: var(--white-color);
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 240px;
    background-color: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1010;
    overflow: hidden;
}

.user-menu.open .user-dropdown-menu {
    display: block;
}

.user-dropdown-menu .user-info {
    padding: 20px;
    background-color: rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.user-dropdown-menu .user-info p {
    margin: 0;
    line-height: 1.4;
    color: var(--secondary-color);
}

.user-dropdown-menu .user-info strong {
    color: var(--primary-color);
    font-size: 16px;
}

.user-actions-list {
    list-style: none;
    padding: 8px 0;
}

.user-actions-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.2s, color 0.2s;
}

.user-actions-list a:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--accent-color);
}

.user-actions-list a i {
    width: 18px;
    text-align: center;
    color: var(--secondary-color);
}

/* --------------------------------------------------------------------------
   4. 메인 비주얼 (Hero Section)
   -------------------------------------------------------------------------- */
.hero-prestige {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    will-change: opacity;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-prestige::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 20, 30, 0.6);
    z-index: 2;
}

.hero-prestige .hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 0 24px;
    transition: opacity 0.4s ease-in-out;
}

.hero-prestige .hero-content.fade-out {
    opacity: 0;
}

.hero-prestige h1 {
    font-size: 52px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-prestige p {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: var(--white-color);
    color: var(--primary-color);
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    border: 2px solid var(--white-color);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: transparent;
    color: var(--white-color);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   5. 공통 콘텐츠 섹션
   -------------------------------------------------------------------------- */
main {
    position: relative;
    background-color: var(--white-color);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-header h2 {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 16px;
}
.section-header p {
    font-size: 18px;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

.story-section { padding: 120px 0; }
.story-content { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; }
.story-image { border-radius: 16px; overflow: hidden; }
.story-image img { width: 100%; display: block; }
.story-text h3 { font-size: 36px; font-weight: 900; color: var(--primary-color); margin-bottom: 24px; line-height: 1.3; }
.story-text p { font-size: 17px; margin-bottom: 16px; }

.products-trend-section { padding: 120px 0; background-color: var(--light-gray); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.product-card-trend { background: var(--white-color); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: all 0.3s ease; cursor: pointer; }
.product-card-trend:hover { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(0,0,0,0.1); }
.product-image-trend { height: 250px; overflow: hidden; }
.product-image-trend img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card-trend:hover .product-image-trend img { transform: scale(1.05); }
.product-image-trend.is-patent img { object-fit: contain; padding: 20px; }
.product-info-trend { padding: 24px; }
.product-info-trend h3 { font-size: 22px; font-weight: 700; color: var(--primary-color); margin-bottom: 8px; }
.product-info-trend p { font-size: 15px; color: var(--secondary-color); }

.tech-section { padding: 120px 0; }

.contact-trend-section { padding: 120px 0; background-color: var(--light-gray); }
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; background: var(--white-color); padding: 60px; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.contact-info h3, .contact-form h3 { font-size: 28px; font-weight: 900; color: var(--primary-color); margin-bottom: 32px; }
.info-item { margin-bottom: 24px; }
.info-item strong { display: block; font-size: 16px; font-weight: 700; color: var(--secondary-color); margin-bottom: 4px; }
.info-item p { font-size: 18px; color: var(--text-color); }
.contact-form input, .contact-form textarea { width: 100%; padding: 16px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 16px; font-size: 16px; font-family: var(--font-main); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1); }
.contact-form .cta-button { width: 100%; font-size: 16px; cursor: pointer; background-color: var(--primary-color); color: var(--white-color); border-color: var(--primary-color); }
.contact-form .cta-button:hover { background-color: var(--secondary-color); border-color: var(--secondary-color); color: var(--white-color); }

/* --------------------------------------------------------------------------
   6. 푸터 (Footer)
   -------------------------------------------------------------------------- */
.main-footer-trend {
    background-color: var(--white-color);
    color: var(--text-color);
    padding: 60px 0;
    border-top: 1px solid #e9ecef;
}
.main-footer-trend .footer-top-area { margin-bottom: 30px; }
.main-footer-trend .footer-logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--primary-color); font-weight: 900; font-size: 22px; }
.main-footer-trend .footer-logo img { height: 36px; margin-right: 12px; filter: none; }
.main-footer-trend .footer-info-area { margin-bottom: 40px; }
.main-footer-trend .info-line { font-size: 14px; color: var(--secondary-color); margin: 0 0 10px 0; padding: 0; line-height: 1.6; }
.main-footer-trend .info-line strong { font-weight: 700; color: var(--primary-color); }
.main-footer-trend .footer-bottom-area { padding-top: 30px; border-top: 1px solid #f1f3f5; }
.main-footer-trend .footer-copyright, .main-footer-trend .footer-slogan { font-size: 13px; color: #868e96; margin: 0; padding: 0; }
.main-footer-trend .footer-slogan { margin-top: 8px; }

/* --------------------------------------------------------------------------
   7. 기타 유틸리티
   -------------------------------------------------------------------------- */
.reveal-up, .reveal-fade { opacity: 0; transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal-up { transform: translateY(40px); }
.reveal-fade { transform: scale(0.95); }
.is-revealed { opacity: 1; transform: translateY(0) scale(1); }

.image-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); }
.image-modal.active { display: flex; align-items: center; justify-content: center; }
.modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 80%; max-width: 700px; border-radius: 16px; position: relative; animation: fadeIn 0.5s; }
.close-btn { color: #aaa; position: absolute; top: 10px; right: 25px; font-size: 35px; font-weight: bold; cursor: pointer; }
#modalImage { width: 100%; border-radius: 8px; }
.modal-info { padding: 20px 0 0; }
.modal-info h3 { font-size: 24px; color: var(--primary-color); }
.modal-info p { font-size: 16px; color: var(--secondary-color); }
@keyframes fadeIn { from {opacity: 0} to {opacity: 1} }

.sub-page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e9ecef' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

.sub-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    margin-top: 120px;
    margin-bottom: 80px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(5px);
}

.sub-page-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
}
/* ==========================================================================
   💡 [추가] 데스크탑 드롭다운 내 서브메뉴 스타일
   ========================================================================== */
.user-actions-list .submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-actions-list .submenu-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

/* 'open' 클래스가 있을 때 화살표 회전 */
.user-actions-list .has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.user-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0; /* 💡 핵심: 평소에는 높이를 0으로 만들어 숨깁니다. */
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background-color: rgba(0,0,0,0.03); /* 약간의 배경색으로 구분 */
}

/* 💡 핵심: 'open' 클래스가 있을 때 서브메뉴를 펼칩니다. */
.user-actions-list .has-submenu.open .user-submenu {
    max-height: 200px; /* 펼쳐질 최대 높이 (내용에 맞게 조절) */
}

.user-submenu li a {
    padding-left: 40px !important; /* 들여쓰기 효과 */
    font-size: 14px !important;
    font-weight: 400 !important;
}

.user-submenu li a:hover {
    background-color: rgba(0,0,0,0.08) !important;
}

/* 구분선 스타일 */
.user-dropdown-menu .dropdown-divider {
    height: 1px;
    margin: 8px 0;
    overflow: hidden;
    background-color: rgba(0,0,0,0.1);
}

/* --- 문의하기 팝업(모달) 스타일 --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 960px; /* 팝업 최대 너비 */
    max-height: 90vh; /* 팝업 최대 높이 */
    overflow-y: auto; /* 내용이 길면 스크롤 */
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: #333;
}



/* --- 문의 폼 메시지 영역 --- */
.form-message-area {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    display: none; /* 평소에는 숨김 */
    text-align: center;
}
.form-message-area.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}
.form-message-area.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* --------------------------------------------------------------------------
   8. 반응형 스타일 (Responsive)
   -------------------------------------------------------------------------- */

/* --- 데스크탑에서는 햄버거 버튼 숨기기 --- */
/* ... (기타 유틸리티 스타일) ... */

/* ==========================================================================
   💡 [추가] 모바일/데스크탑 메뉴 분리 기본 스타일
   ========================================================================== */

/* 기본적으로(데스크탑 화면에서) 모바일 전용 메뉴 항목들을 숨깁니다. */
.mobile-only,
.mobile-only-menu-divider {
    display: none;
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* --- 1. 태블릿 & 데스크탑 중간 사이즈 (992px 이하) --- */
@media (max-width: 992px) {
    .story-content, .contact-wrapper {
        grid-template-columns: 1fr;
    }
    .story-image {
        order: -1;
        margin-bottom: 40px;
    }
    .contact-wrapper {
        padding: 40px;
    }
    .hero-prestige h1 {
        font-size: 42px;
    }
    .hero-prestige p {
        font-size: 18px;
    }
    .section-header h2 {
        font-size: 36px;
    }
}

/* --- 2. 모바일 & 태블릿 작은 사이즈 (768px 이하) --- */
@media (max-width: 768px) {

    /* 헤더 레이아웃 */
    .main-header nav {
        justify-content: space-between;
    }

    /* 모바일 메뉴 패널 */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 280px;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.9);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: 80px;
        padding-bottom: 40px;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transform: translateX(0);
        transition: right 0.35s ease-in-out;
        z-index: 1001;
        gap: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        width: 100%;
        padding: 12px 25px;
        font-size: 16px;
        color: var(--text-color) !important; /* 모바일 메뉴에서는 항상 어두운 색 글씨 */
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .nav-links a:hover {
        color: var(--accent-color) !important;
    }

    /* 햄버거 아이콘 */
    .mobile-menu-btn {
        display: block;
        position: relative;
        width: 40px;
        height: 40px;
        padding: 5px;
        z-index: 1002;
    }

    .hamburger-box {
        width: 30px;
        height: 24px;
        display: inline-block;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .hamburger-inner,
    .hamburger-inner::before,
    .hamburger-inner::after {
        width: 100%;
        height: 3px;
        background-color: var(--secondary-color);
        border-radius: 4px;
        position: absolute;
        transition: transform 0.25s ease-in-out, background-color 0.4s ease;
    }

    .main-header.transparent-header:not(.scrolled) .hamburger-inner,
    .main-header.transparent-header:not(.scrolled) .hamburger-inner::before,
    .main-header.transparent-header:not(.scrolled) .hamburger-inner::after {
        background-color: var(--white-color);
    }

    .hamburger-inner { top: 50%; transform: translateY(-50%); }
    .hamburger-inner::before { content: ''; left: 0; top: -10px; }
    .hamburger-inner::after { content: ''; left: 0; bottom: -10px; }

    .mobile-menu-btn.is-active .hamburger-inner { background-color: transparent; }
    .mobile-menu-btn.is-active .hamburger-inner::before { transform: translateY(10px) rotate(45deg); background-color: var(--text-color); }
    .mobile-menu-btn.is-active .hamburger-inner::after { transform: translateY(-10px) rotate(-45deg); background-color: var(--text-color); }

    /* 모바일/데스크탑 메뉴 분리 */
    .user-menu {
        display: none; /* 데스크탑용 아이콘 메뉴 숨기기 */
    }
    .mobile-only, .mobile-only-menu-divider {
        display: block; /* 모바일 전용 메뉴 보이기 */
        width: 100%;
    }
    .mobile-only-menu-divider {
        padding: 10px 25px;
        margin-top: 10px;
    }
    .mobile-only-menu-divider hr {
        border: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    /* 모바일 드롭다운 메뉴 */
    .nav-item-dropdown {
        width: 100%;
        position: relative;
    }
    .nav-item-dropdown .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        background-color: transparent;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 0 20px; /* 안쪽으로 들여쓰기 */
        margin-top: 0;
        list-style: none;
    }

    .nav-item-dropdown.open .dropdown-menu {
        display: block;
    }

    .nav-item-dropdown .dropdown-menu a {
        padding: 10px 25px;
        font-size: 15px;
        font-weight: 400;
        color: var(--secondary-color) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-item-dropdown > a.dropdown-toggle::after {
        content: '▼';
        display: inline-block;
        font-size: 10px;
        margin-left: 8px;
        transition: transform 0.3s ease;
        vertical-align: middle;
    }

    .nav-item-dropdown.open > a.dropdown-toggle::after {
        transform: rotate(180deg);
    }

    /* 기타 레이아웃 및 폰트 조정 */
    .hero-prestige h1 {
        font-size: 32px;
    }
    .hero-prestige p {
        font-size: 16px;
    }
    .section-header h2 {
        font-size: 28px;
    }
    .contact-wrapper {
        padding: 30px 20px;
    }
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    .modal-content .contact-wrapper {
        flex-direction: column;
    }
}
