/* ─────────────────────────────────────────────
   header.css — Header, GNB, Mega Menu, Breadcrumb
   ───────────────────────────────────────────── */

/* Transparent Header with Fixed Black Text */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background 0.4s, box-shadow 0.4s, transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
header.header-hidden {
    transform: translateY(-100%);
}
header.active { background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
header.active .gnb-wrap { color: #111; }
header.active .util-menu { color: #333; }
header.active .search-btn, header.active .all-menu, header.active .hamburger { color: var(--main-brand); }

.nav-container {
    width: 100%; max-width: clamp(1800px, calc(400px + 72.917vw), 3200px); margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    height: 65px;
    padding: 0 50px;
}

/* Original Logo */
.logo-img { height: 50px; }

.gnb-wrap {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: flex; align-items: center; gap: 60px; height: 100%;
    color: #111;
}

.gnb { display: flex; gap: 65px; height: 100%; align-items: center; }
.gnb > li { height: 100%; display: flex; align-items: center; position: relative; }
.gnb > li > a {
    font-size: 1.3rem; font-weight: 700; color: inherit;
    position: relative;
}
.gnb > li > a::after {
    content: ''; position: absolute; bottom: -8px; left: 0; width: 0; height: 3px; background: var(--main-brand); transition: 0.3s;
}
.gnb > li:hover > a::after { width: 100%; }
header.active .gnb > li > a:hover { color: var(--main-brand); }

.header-right {
    height: 100%; display: flex; align-items: center; gap: 35px; margin-left: 20px;
    color: #111;
}
.util-menu { display: flex; gap: 20px; font-size: 0.9rem; font-weight: 600; align-items: center; color: #333; }
.util-menu a:hover { opacity: 0.7; color: var(--main-brand); }
.header-right .search-btn, .header-right .all-menu, .hamburger {
    font-size: 1.6rem; cursor: pointer; transition: 0.3s;
    color: var(--main-brand);
}
.hamburger { display: none; }

/* Mega Menu Panel */
.mega-menu-panel {
    position: absolute; top: 65px; left: 0; width: 100%;
    background: #fff; border-top: 1px solid #eee;
    overflow: hidden; max-height: 0; opacity: 0; visibility: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* Global Header Background Utility */
header.bg-white {
    background-color: #ffffff !important;
    opacity: 1 !important;
}
header.bg-white.shadow-active {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
header.bg-white .gnb-wrap { color: #111; }
header.bg-white .util-menu { color: #333; }
header.bg-white .header-right .search-btn,
header.bg-white .header-right .all-menu,
header.bg-white .hamburger { color: var(--main-brand); }

header.active .mega-menu-panel { max-height: 1400px; padding-bottom: 30px; opacity: 1; visibility: visible; }

.mega-container {
    max-width: clamp(1800px, calc(400px + 72.917vw), 3200px); margin: 0 auto; height: 100%;
    display: flex; padding: 40px; gap: 40px;
}

/* Left Aside: Certification */
.mega-aside-left {
    flex: 1.1; border-right: 1px solid #f0f0f0; padding-right: 40px;
    display: flex; flex-direction: column; justify-content: center;
}
.mega-cert-header { text-align: center; padding-bottom: 25px; border-bottom: 1px solid #eee; margin-bottom: 25px; }
.cert-img { width: 90px; margin-bottom: 15px; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.05)); }
.mega-cert-header h5 { font-size: 1.1rem; font-weight: 700; color: #111; line-height: 1.5; letter-spacing: -0.3px; }
.mega-cert-header h5 .cert-small { font-size: 0.78rem; color: #aaa; font-weight: 400; display: block; margin-top: 5px; }

.mega-cert-footer { text-align: center; }
.mega-cert-footer p.phone-label { font-size: 0.85rem; color: #888; font-weight: 500; margin-bottom: 5px; text-align: center; }
.mega-cert-footer p.phone-num { font-size: 1.3rem; color: var(--main-brand); font-weight: 800; font-family: 'GmarketSansBold'; text-align: center; justify-content: center; }

/* Center Content: Sub Menus */
.mega-content { flex: 3; position: relative; }
.mega-content-block {
    display: none;
    gap: 40px;
    width: 100%; height: 100%; animation: fadeIn 0.3s forwards;
}
.mega-content-block.active {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.mega-sub-col {
    flex: 0 1 260px;
    min-width: 0;
    margin-bottom: 40px;
    padding-right: 40px;
    border-right: 1px solid #f0f0f0;
}
.mega-sub-col:last-child {
    padding-right: 0;
    border-right: none;
}
.mega-sub-section {
    margin-bottom: 32px;
}
.mega-sub-section:last-child {
    margin-bottom: 0;
}
.mega-sub-title {
    font-size: 1.15rem; font-weight: 800; color: #111; margin-bottom: 25px;
    position: relative; display: block;
}
.mega-sub-title::after {
    content: ''; position: absolute; bottom: -8px; left: 0; width: 20px; height: 2px; background: var(--main-brand);
}
.mega-sub-list li { margin-bottom: 15px; }
.mega-sub-list a { font-size: 1rem; color: #666; font-weight: 500; transition: 0.3s; display: block; }
.mega-sub-list a:hover { color: var(--main-brand); padding-left: 5px; }

/* Right Aside: Banner */
.mega-aside-right {
    flex: 1; border-left: 1px solid #f0f0f0; padding-left: 40px;
    display: flex; flex-direction: column; justify-content: center;
}
.mega-banner {
    background: linear-gradient(135deg, #fef2e8 0%, #fff 100%);
    border: 1px solid #fce8d5;
    border-radius: 15px; padding: 30px; height: 100%;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden;
}
.mega-banner-text h6 { font-size: 0.95rem; color: var(--main-brand); font-weight: 800; margin-bottom: 8px; }
.mega-banner-text p { font-size: 1.25rem; font-weight: 800; color: #111; line-height: 1.4; }
.mega-banner-link {
    position: relative; z-index: 1; font-size: 0.9rem; font-weight: 700; color: #555;
    display: flex; align-items: center; gap: 8px; margin-top: 15px;
}
.mega-banner-link:hover { color: var(--main-brand); text-decoration: underline; }

/* Breadcrumb Navigation */
.breadcrumb-nav {
    display: none;
    padding: 120px 20px 0;
    max-width: 1400px; margin: 0 auto;
}
.breadcrumb-inner {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    font-size: 0.9rem; color: #999;
}
.breadcrumb-inner a { color: #999; transition: 0.2s; }
.breadcrumb-inner a:hover { color: var(--main-brand); }
.breadcrumb-inner .bc-sep { color: #ccc; font-size: 0.75rem; }
.breadcrumb-inner .bc-select {
    appearance: none; -webkit-appearance: none;
    background: transparent; border: none; border-bottom: 1px dashed #bbb;
    font-size: 0.9rem; font-family: inherit; color: #111; font-weight: 600;
    padding: 2px 18px 2px 4px; cursor: pointer; transition: 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 4px center;
}
.breadcrumb-inner .bc-select:focus { outline: none; border-bottom-color: var(--main-brand); }
.breadcrumb-inner .bc-current {
    color: var(--main-brand); font-weight: 700;
}

/* Mobile Optimization */
@media (max-width: 1024px) {
    .gnb-wrap > .gnb, .header-right .search-btn, .header-right .all-menu { display: none; }
    .util-menu { display: none; }
    .gnb-wrap { position: static; transform: none; }
    .hamburger { display: block; }
    .nav-container { padding: 0 20px; height: 54px; }
    .logo-img { height: 28px; }
}

@media (max-width: 768px) {
    .breadcrumb-nav { padding: 85px 15px 0; }
    .breadcrumb-inner { font-size: 0.82rem; }
}
