/* 워드프레스 Astra 차일드 - 헤더/푸터/퀵메뉴 전용 CSS */
/* index.css에서 헤더/푸터/퀵메뉴 관련 스타일만 추출 */

/* Astra 기본 헤더/푸터 숨김 */
.ast-above-header-wrap,
.ast-below-header-wrap,
.ast-main-header-wrap,
.site-header,
.ast-footer-overlay,
.site-footer { display: none !important; }

/* 본문 상단 여백 (고정 헤더) */
body { padding-top: 80px; }
@media (min-width: 1200px) { body { padding-top: 4.1667vw; } }

/* 모바일 하단 퀵메뉴 공간 확보 */
@media (max-width: 991px) { body { padding-bottom: 70px; } }

/* ===== 헤더 공통 ===== */
.demo-header {
    box-shadow: 0 0.1042vw 0.4167vw rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 9999;
}
.header-container {
    height: 4.1667vw;
    min-height: 60px;
}
.logo {
    font-weight: 700;
    color: var(--main-color);
    min-width: 175px;
}

/* ===== 데스크톱 메뉴 ===== */
.header-flyout .menu {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 62.5vw;
}
.header-flyout .menu > li {
    position: relative;
    padding: 0.5208vw 0;
}
.header-flyout .menu > li > a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.2083vw;
    transition: color 0.3s;
    white-space: nowrap;
    justify-content: center;
}
.header-flyout .menu > li > a:hover {
    color: var(--sub-color) !important;
}
.header-flyout .submenu {
    position: absolute;
    top: 150%;
    left: 0;
    box-shadow: 0 0.4167vw 1.25vw rgba(0, 0, 0, 0.12);
    list-style: none;
    padding: 0.625vw 0;
    margin: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.header-flyout .menu > li:hover .submenu {
    opacity: 1;
    visibility: visible;
}
.header-flyout .submenu li {
    background-color: transparent;
    border-radius: 4px;
    transition: all 0.5s;
}
.header-flyout .submenu li:hover {
    background-color: #fff;
}
.header-flyout .submenu li a {
    display: block;
    padding: 0.625vw 1.0417vw;
    color: var(--white);
    text-decoration: none;
    transition: all 0.5s;
}
.header-flyout .submenu li:hover a {
    color: var(--sub-color);
    padding-left: 1.25vw;
}
.nav {
    justify-content: space-between;
}

/* ===== 프로모 슬라이더 ===== */
.promo-slider {
    width: max-content;
    height: 2.5vw;
    border-radius: 0.625vw;
    overflow: hidden;
    max-width: 300px;
}
.promo-content {
    animation: slideUp 10s infinite;
}
.promo-item {
    height: 2.5vw;
    padding: 0 1.0417vw;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
@media screen and (max-width: 1550px) {
    .promo-slider { display: none; }
    .nav { justify-content: start; }
}
@keyframes slideUp {
    0%, 16% { transform: translateY(0); }
    20%, 36% { transform: translateY(-2.5vw); }
    40%, 56% { transform: translateY(-5vw); }
    60%, 76% { transform: translateY(-7.5vw); }
    80%, 96% { transform: translateY(-10vw); }
    100% { transform: translateY(0); }
}

/* ===== 모바일 헤더 ===== */
#mobileMenu5 { width: 80% !important; }
.mobile-header .logo { font-size: 1.25rem; }
.hamburger-btn {
    background: none;
    border: none;
    color: var(--t-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
}

/* ===== 푸터 ===== */
#footer02 .wrap_controllers { display: none; }
#footer02 .cont { display: none; }

/* ===== 퀵메뉴 (데스크톱) ===== */
#quick_menu_pill {
    position: fixed;
    bottom: 1.1667vw;
    right: 0.125vw;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.quick_menu_pill-container { margin-bottom: 0.8854vw; }
.quick_menu_pill-items {
    width: 7.8125vw;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.6771vw;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    transition: opacity 0.3s ease, max-height 0.3s ease, visibility 0.3s;
}
.quick_menu_pill-items.active {
    opacity: 1;
    visibility: visible;
    max-height: 26.0417vw;
    height: 100%;
    padding-top: 2.6042vw;
}
.quick_menu_pill-items a {
    background-color: #fff;
    width: 100%;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.2604vw;
    flex-direction: row;
    padding: 0.625vw 0.8333vw;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
    max-height: 42px;
}
.quick_menu_pill-items a:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.2083vw 0.625vw rgba(0, 0, 0, 0.1);
    background-color: var(--sub-color);
}
.quick_menu_pill-items a:hover img,
.quick_menu_pill-items a:hover p { filter: brightness(10); }
.quick_menu_pill-items a div {
    font-weight: 500;
    font-size: 0.7292vw;
    letter-spacing: -0.025em;
    line-height: 1.4;
    color: #333;
}
.qm-pill-toggle {
    width: 3.6458vw;
    height: 3.6458vw;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.4167vw auto;
    position: relative;
    overflow: hidden;
    margin-top: 0.8854vw;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 50px;
    min-height: 50px;
}
.qm-pill-toggle.active svg { transform: rotate(45deg); }
#scrollTop {
    width: 3.6458vw;
    height: 3.6458vw;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.4167vw auto;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-width: 50px;
    min-height: 50px;
}

/* ===== 퀵메뉴 (모바일 하단) ===== */
#quick_menu_mobile { border-top: 1px solid #EBEBEB; }
#quick_menu_mobile ul li:nth-of-type(1),
#quick_menu_mobile ul li:nth-of-type(2),
#quick_menu_mobile ul li:nth-of-type(3),
#quick_menu_mobile ul li:nth-of-type(4) { border-right: 1px solid #EBEBEB; }

/* ===== 반응형 ===== */
@media screen and (max-width: 992px) {
    #quick_menu_pill { right: 5vw; bottom: 8vw; }
    .qm-pill-toggle { width: 8vw; height: 8vw; }
    #scrollTop { width: 8vw !important; height: 8vw !important; }
    .quick_menu_pill-items { width: 15vw; max-height: 30vw; }
    .quick_menu_pill-items.active { max-height: 30vw; }
}
@media screen and (max-width: 640px) {
    .header-container { height: 100%; }
    .qm-pill-toggle { width: 13vw; height: 13vw; }
    #scrollTop { width: 13vw !important; height: 13vw !important; }
    .quick_menu_pill-items {
        width: 30vw;
        position: absolute;
        right: 0vw;
        top: -48vw;
    }
    .quick_menu_pill-items a { padding: 1.5vw 3vw; gap: 2vw; }
    #quick_menu_pill { right: 7vw; bottom: 1vw; }
    .quick_menu_pill-items.active {
        max-height: 100vh;
        position: absolute;
        right: 0vw;
        top: -63vw;
        padding-top: 0;
    }
}

/* 토스트 메시지 */
.toast-message {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: #fff;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast-message.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-message.success { background: var(--sub-color); }
.toast-message.error { background: #ef4444; }
.toast-message.warning { background: #f59e0b; }

/* 헤더/푸터 내 img 기본 보호 */
.demo-header img,
#quick_menu_pill img,
#quick_menu_mobile img,
#footer02 img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}
.demo-header .logo img {
    height: 40px !important;
    width: auto !important;
    display: block !important;
}
@media (max-width: 1199px) {
    .demo-header .logo img {
        height: 36px !important;
    }
}
.qm-pill-toggle img {
    width: 60% !important;
    height: auto !important;
    display: block !important;
}
.qm-bar-fixed-item img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
#quick_menu_mobile img {
    width: 24px;
    height: 24px;
}
#footer02 .u-mb-40-sm img {
    width: auto;
    height: auto;
    max-width: 180px;
}

/* 워드프레스 커스텀 로고 보정 */
.custom-logo-link img {
    max-height: 40px;
    max-width: 200px;
    width: auto;
    height: auto;
}
@media (max-width: 1199px) {
    .custom-logo-link img {
        max-height: 50px;
    }
}
