/* ==========================================================================
   경로: /theme/basic/css/autopay.css 
   기능: 오토페이 전체 레이아웃 및 GNB 서브메뉴 최적화 (통합본)
   ========================================================================== */

/* 1. 웹 폰트 및 아이콘 로드 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,1,0');

/* 2. 초기화 및 레이아웃 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans KR', sans-serif; background: #f8fafd; color: #333; overflow-x: hidden; }
ul, li { list-style: none; }
a { text-decoration: none; color: inherit; transition: 0.2s; }

#wrapper { width: 100%; min-width: 1300px; padding-left: 100px; position: relative; }
#container { width: 100%; }

/* 3. 좌측 고정 사이드바 */
.dh-side-nav { 
    position: fixed; left: 0; top: 0; width: 100px; height: 100vh; 
    background: #0b1120; z-index: 1100; display: flex; flex-direction: column; 
    align-items: center; padding-top: 30px; border-right: 1px solid rgba(255,255,255,0.1); 
}
.side-item { width: 100%; padding: 25px 0; text-align: center; color: #fff; cursor: pointer; display: block; }
.side-item i { font-size: 32px; display: block; margin-bottom: 8px; color: rgba(255,255,255,0.3); font-style: normal; }
.side-item span { font-size: 13px; color: rgba(255,255,255,0.5); font-weight: 500; }
.side-item.active i, .side-item:hover i { color: #2555e0; }
.side-item.active span, .side-item:hover span { color: #fff; }

/* 4. 상단 헤더 및 GNB */
.dh-header-wrap { width: 100%; background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 1000; }
.dh-header-inner { 
    max-width: 1440px; /* 기존 1200px에서 확장 */
    width: 100%; 
    margin: 0 auto; 
    height: 80px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0 32px; 
}

.dh-logo { display: flex; align-items: center; color: #000; font-size: 24px; font-weight: 700; }
.dh-logo i { background: #2555e0; color: #fff; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 10px; margin-right: 12px; font-style: normal; }
.dh-logo span { color: #2555e0; margin-left: 6px; }

/* GNB 영역 */
.dh-gnb { 
    display: flex; 
    gap: 48px; /* 메뉴 간 간격 확대 */
    height: 80px; 
    align-items: center;
}
.menu-item { position: relative; height: 80px; display: flex; align-items: center; padding: 0 6px; }
.menu-item > a { 
    color: #444; 
    font-weight: 600; 
    font-size: 16px; 
    padding: 18px 6px;
    white-space: nowrap;
    display: inline-block;
}

/* 서브메뉴(드롭다운) 설정 */
.sub-menu { 
    position: absolute; top: 80px; left: 50%; transform: translateX(-50%); 
    background: #fff; 
    min-width: 220px; /* 폭 확보 */
    border: 1px solid #eee; border-radius: 0 0 15px 15px; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
    display: none; padding: 12px 0; z-index: 1001;
}

.sub-menu li a { 
    display: block; 
    padding: 12px 20px; 
    font-size: 14px; 
    line-height: 1.4;
    color: #444; 
    text-decoration: none; transition: 0.2s; 
}

/* 특정 상태 클래스 */
.sub-menu li a.txt-gray { color: #bbbbbb !important; font-weight: 400; }

/* 공통 호버 효과 */
.menu-item:hover .sub-menu { display: block; }
.menu-item:hover > a { color: #2555e0; }
.sub-menu li a:hover { background: #f4f7ff; color: #2555e0 !important; font-weight: 600; }

/* 5. 사용자 액션 및 티커 */
.dh-user-actions { display: flex; align-items: center; gap: 15px; }
.dh-btn-charge { background: #2555e0 !important; color: #fff !important; padding: 10px 22px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 4px 10px rgba(37, 85, 224, 0.2); }

.ticker-wrap { width: 100%; background: #2555e0; height: 45px; overflow: hidden; display: flex; align-items: center; border-top: 1px solid rgba(255,255,255,0.1); }
.ticker-content { display: flex; white-space: nowrap; animation: ticker-scroll 35s linear infinite; color: #fff; font-size: 14px; }
.ticker-item { padding: 0 50px; display: flex; align-items: center; }
.ticker-item b { color: #ffcc00; margin-left: 5px; }

@keyframes ticker-scroll {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* 6. 본문 콘텐츠 레이아웃 */
.dh-main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 50px 20px; }

.hero-banner { 
    background: #0b1120; 
    border-radius: 35px; 
    padding: 75px 60px; 
    color: #fff; 
    position: relative; 
    overflow: hidden; 
    margin-bottom: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' opacity='0.05'%3E%3Cpath d='M13 2L3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right -50px center; 
    background-size: 550px; 
}

.hero-banner h1, .hero-banner p, .hero-banner .hero-btns { position: relative; z-index: 5; }
.hero-banner h1 { font-size: 48px; font-weight: 700; line-height: 1.2; margin: 0; }
.hero-banner p { margin-top: 25px; font-size: 17px; color: rgba(255,255,255,0.7); line-height: 1.7; }

.hero-btns { display: flex; gap: 15px; margin-top: 45px; }
.btn-p { background: #2555e0; color: #fff; padding: 18px 35px; border-radius: 15px; font-weight: 600; font-size: 16px; box-shadow: 0 10px 20px rgba(37, 85, 224, 0.3); }
.btn-s { background: rgba(255,255,255,0.05); color: #fff; padding: 18px 35px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.2); font-weight: 600; font-size: 16px; }

.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.service-card { background: #fff; border-radius: 25px; padding: 45px 25px; text-align: center; border: 1px solid #eee; transition: 0.4s; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.service-card:hover { transform: translateY(-12px); border-color: #2555e0; box-shadow: 0 15px 35px rgba(0,0,0,0.06); }
.service-card .icon-circle { width: 65px; height: 65px; background: #f0f4ff; border-radius: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 25px; }
.service-card h3 { font-size: 19px; font-weight: 700; color: #111; margin-bottom: 12px; }
.service-card p { color: #888; font-size: 14px; line-height: 1.4; }

/* 7. 하단 그리드 및 계산기 */
.bottom-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px; }
.ai-box { background: #fff; border-radius: 35px; padding: 50px; border: 1px solid #eee; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.ai-box h2 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.ai-input-wrap { display: flex; background: #f4f6f8; border-radius: 20px; padding: 10px; align-items: center; margin-top: 35px; border: 1px solid #eee; }
.ai-input-wrap input { flex: 1; border: none; background: transparent; padding: 15px; outline: none; font-size: 16px; }
.ai-btn { background: #0b1120; color: #fff; border: none; padding: 12px 30px; border-radius: 12px; cursor: pointer; font-weight: 600; }

.calc-box { background: #0b1120; border-radius: 35px; padding: 50px; color: #fff; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.calc-box h2 { font-size: 24px; font-weight: 700; margin-bottom: 35px; display: flex; align-items: center; }
.calc-row { display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 20px; font-size: 16px; }
.calc-row span { color: rgba(255,255,255,0.5); }
.calc-row strong { font-size: 22px; color: #fff; font-weight: 600; }
.calc-row.total { border-top: 1px solid rgba(255,255,255,0.2); border-bottom: none; padding-top: 25px; margin-top: 10px; }
.calc-row.total strong { font-size: 32px; color: #fff; }

/* 8. 푸터 */
#ft { clear: both; width: 100%; display: flex; justify-content: center; background: #0b1120; margin-top: 50px; }
.dh-footer { width: 1200px; color: #fff; padding: 80px 20px 60px; font-family: 'Noto Sans KR', sans-serif; }
.footer-top { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 50px; margin-bottom: 50px; }
.footer-info { width: 350px; }
.footer-logo { font-size: 26px; font-weight: 700; margin-bottom: 25px; color:#fff; display: flex; align-items: center; }
.footer-logo i { background: #2555e0; color: #fff; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 8px; margin-right: 12px; font-style: normal; font-size: 18px; }
.footer-info p { opacity: 0.5; font-size: 14px; line-height: 1.8; }
.footer-links { display: flex; gap: 80px; }
.link-group h4 { color: rgba(255,255,255,0.4); font-size: 14px; margin-bottom: 25px; font-weight: 500; }
.link-group ul li a { color: #fff; opacity: 0.7; font-size: 15px; display: block; margin-bottom: 12px; }
.link-group ul li a:hover { opacity: 1; text-decoration: underline; }
.customer-center h2 { font-size: 34px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.customer-center p { opacity: 0.5; font-size: 14px; }
.footer-bottom { font-size: 13px; color: rgba(255,255,255,0.3); display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.cert-box { display: flex; gap: 15px; }
.cert-item { border: 1px solid rgba(255,255,255,0.15); padding: 6px 12px; border-radius: 6px; font-size: 11px; color: rgba(255,255,255,0.5); }

/* 9. 기타 요소 */
#top_btn { position: fixed; bottom: 20px; right: 20px; width: 45px; height: 45px; background: #2555e0; color: #fff; border: none; border-radius: 50%; cursor: pointer; z-index: 1000; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
#ft_copy, #ft_company, .sound_only { display: none !important; }


/* ==========================================================================
   10. 반응형 (Responsive)
   ========================================================================== */

/* 태블릿 & 소형 노트북 (GNB 모바일 전환 시점) */
@media (max-width: 1024px) {
    #wrapper { padding-left: 0; min-width: auto; }
    .dh-side-nav { display: none; }
    
    /* 헤더 레이아웃 */
    .dh-header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 16px 20px;
        gap: 16px;
    }

    /* GNB를 세로 메뉴로 전환 */
    .dh-gnb {
        width: 100%;
        flex-direction: column;
        gap: 0;
        height: auto;
        align-items: stretch;
        background: #fff;
        border-top: 1px solid #eee;
    }

    /* 1차 메뉴 터치 영역 확보 */
    .dh-gnb > .menu-item {
        height: auto;
        display: block;
        padding: 0;
    }
    .dh-gnb > .menu-item > a {
        padding: 16px 20px;
        font-size: 15px;
        display: block;
        border-bottom: 1px solid #f1f1f1;
    }

    /* 모바일 서브메뉴 항상 블록형 */
    .sub-menu {
        position: static;
        display: block;
        transform: none;
        min-width: 100%;
        background: #fafafa;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }

    .sub-menu li a {
        padding: 14px 32px;
        font-size: 14px;
        border-bottom: 1px dashed #e5e5e5;
    }

    .dh-main, .dh-footer { width: 100%; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .bottom-grid { grid-template-columns: 1fr; }
}

/* 모바일 소형 (스마트폰) */
@media (max-width: 480px) {
    .hero-banner { padding: 40px 20px; }
    .hero-banner h1 { font-size: 28px; }
    
    .dh-gnb > .menu-item > a {
        font-size: 14px;
        padding: 18px 16px;
    }

    .sub-menu li a {
        padding: 16px 28px;
        font-size: 13px;
    }
    
    .service-grid { grid-template-columns: 1fr; }
}