/* ════════════════════════════════════════════════════════════
   KT 상품 메가메뉴 — nav.php 의 KT 상품 1차 메뉴 전용 (영업 강화)
   - 다른 1차 메뉴(`.isys_sub-menu`)와 충돌하지 않도록 별도 클래스 사용
   - 데스크탑: 3 컬럼 + 하단 CTA 영역 / 모바일: 단일 컬럼 stack
   - 모든 색상은 isystem_new 의 KT Blue 토큰과 정합
   ════════════════════════════════════════════════════════════ */

/* position: static → 메가메뉴가 li가 아닌 fixed header 기준으로 위치 */
.isys_main-menu > li.has-mega { position: static; }

/* 화살표는 인라인 SVG 로 별도 처리 — ::after 는 isys_main_style.css 의 underline 효과 보존 위해 사용하지 않음 */

.isys_mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    min-width: unset;
    max-width: none;
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    border: none;
    border-top: 1px solid rgba(0, 102, 204, 0.12);
    border-bottom: 1px solid rgba(0, 102, 204, 0.12);
    border-radius: 0;
    box-shadow: 0 18px 48px rgba(15, 31, 61, 0.14);
    /* 투명 상단 여백으로 nav 링크와 패널 사이 hover 브릿지 확보 */
    padding: 0 0 16px;
    margin-top: 0;
    display: none;
    opacity: 0;
    z-index: 100;
    color: #1f2a44;
    transition: opacity 0.2s ease;
}

.isys_main-menu > li.has-mega:hover .isys_mega-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 내용 최대 너비 제한 — 중앙 정렬 */
.isys_mega-menu__grid,
.isys_mega-menu__cta {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.isys_mega-menu__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 22px;
    margin-top: 22px;
}

.isys_mega-col__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 10px;
    margin: 0 0 8px;
    border-bottom: 1px solid rgba(0, 102, 204, 0.16);
}
.isys_mega-col__head i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0066cc, #003d99);
    color: #fff;
    border-radius: 7px;
    font-size: 13px;
    flex-shrink: 0;
}
.isys_mega-col__head h4 {
    font-size: 14px;
    font-weight: 800;
    color: #0f1f3d;
    letter-spacing: 0;
    margin: 0;
}
.isys_mega-col__head .isys_mega-col__sub {
    margin-left: auto;
    font-size: 11px;
    color: #4a5568;
    font-weight: 600;
}

.isys_mega-col ul { list-style: none; padding: 0; margin: 0; }

.isys_mega-col li a {
    display: block;
    padding: 9px 10px;
    border-radius: 7px;
    text-decoration: none;
    color: #1f2a44;
    transition: all 0.18s;
    border: 1px solid transparent;
}
.isys_mega-col li a:hover {
    background: rgba(0, 102, 204, 0.06);
    border-color: rgba(0, 102, 204, 0.18);
    transform: translateY(-1px);
}

.isys_mega-item__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f1f3d;
    letter-spacing: 0;
    line-height: 1.3;
}
.isys_mega-item__main .isys_mega-badge {
    margin-left: auto;
    flex-shrink: 0;
}
.isys_mega-item__sub {
    display: block;
    margin-top: 3px;
    font-size: 11.5px;
    color: #3f4b63;
    font-weight: 500;
    line-height: 1.4;
}

.isys_mega-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    line-height: 1.1;
}
.isys_mega-badge--best { background: #ED1C24; color: #fff; }
.isys_mega-badge--new  { background: #16a34a; color: #fff; }
.isys_mega-badge--hot  { background: #d97706; color: #fff; }   /* WCAG AA 대비 ↑ */
.isys_mega-badge--ai   { background: #1E2D7C; color: #fff; }
.isys_mega-badge--save { background: #0066cc; color: #fff; }

.isys_mega-menu__cta {
    margin-top: 14px;
    padding: 12px 16px;
    background: linear-gradient(95deg, #0f1f3d 0%, #003d99 100%);
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}
.isys_mega-menu__cta i {
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    flex-shrink: 0;
}
.isys_mega-menu__cta-text {
    flex: 1;
    line-height: 1.35;
    color: #ffffff;  /* 부모 .isys_mega-menu (#1f2a44) 상속 차단 */
}
.isys_mega-menu__cta-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    color: #ffffff;  /* 외부 CSS specificity 충돌 방지 — 흰글자 강제 */
}
.isys_mega-menu__cta-text span {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.92);
}
.isys_mega-menu__cta-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #ED1C24;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0;
    transition: background 0.18s;
}
.isys_mega-menu__cta-phone:hover { background: #C8102E; color: #fff; }

/* ── 모바일 (1200px 이하 — 햄버거 메뉴 전환 기준) ────────────── */
@media (max-width: 1200px) {
    .isys_mega-menu {
        position: static;
        transform: none;
        min-width: 0;
        max-width: 100%;
        background: #f8fafc;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid #e5e7eb;
        box-shadow: none;
        padding: 8px 0 12px;
        margin-top: 0;
        color: #1f2a44;
    }
    .isys_main-menu > li.has-mega:hover .isys_mega-menu { transform: none; }

    .isys_mega-menu__grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    /* 카테고리 헤더 — 시각 구분 강화 */
    .isys_mega-col__head {
        padding: 10px 18px 8px;
        margin: 0;
        border-bottom: 1px solid #e2e8f0;
        background: #eef4fa;
    }
    .isys_mega-col__head i {
        width: 22px;
        height: 22px;
        font-size: 11px;
        border-radius: 5px;
    }
    .isys_mega-col__head h4 {
        font-size: 12.5px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #0066cc;
    }
    .isys_mega-col__head .isys_mega-col__sub {
        display: none;
    }

    .isys_mega-col ul { padding: 4px 0; }

    /* 항목 padding — 모바일 터치 타겟 ≥44px */
    .isys_mega-col li a {
        padding: 11px 18px 11px 36px;
        position: relative;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #f1f5f9;
        transform: none !important;
    }
    .isys_mega-col li:last-child a { border-bottom: none; }
    .isys_mega-col li a::before {
        content: '';
        position: absolute;
        left: 22px;
        top: 50%;
        width: 4px;
        height: 4px;
        margin-top: -2px;
        border-radius: 50%;
        background-color: #cbd5e1;
        transition: background-color 0.2s;
    }
    .isys_mega-col li a:hover,
    .isys_mega-col li a:active {
        background: #eff6ff;
        border-color: transparent;
    }
    .isys_mega-col li a:hover::before,
    .isys_mega-col li a:active::before { background-color: #0066cc; }

    .isys_mega-item__main { font-size: 14px; gap: 5px; }
    .isys_mega-item__sub { display: none; }

    /* 배지 모바일에서 약간 작게 — 글자 옆에 자연스럽게 */
    .isys_mega-badge {
        font-size: 9px;
        padding: 2px 5px;
    }

    /* CTA 영역 — 모바일에서 숨김 */
    .isys_mega-menu__cta { display: none; }
}

/* ── 480px 이하 — 작은 화면 폰트 조정 ──────────────────────── */
@media (max-width: 480px) {
    .isys_mega-col__head { padding: 9px 16px 7px; }
    .isys_mega-col li a { padding: 11px 16px 11px 32px; }
    .isys_mega-col li a::before { left: 18px; }
    .isys_mega-item__main { font-size: 13.5px; }
}
