/**
 * ITF Korea — PC 메가메뉴
 * 헤더 fixed 유지 · .in 균등 열 · ≥1025
 */

.itf-mega {
    display: none;
}

@media screen and (min-width: 1025px) {
    /* overflow만 — position/transform 덮어쓰면 스크롤 숨김 깨짐 */
    .itf-site .header {
        overflow: visible;
    }

    .itf-mega {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 190;
        background: #fff;
        border-top: 1px solid #ebebeb;
        border-bottom: 1px solid #ebebeb;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-4px);
        transition:
            opacity 0.18s ease,
            transform 0.18s ease,
            visibility 0s linear 0.18s;
    }

    /* 헤더↔패널 사이 서브픽셀 갭에서 leave 튀는 것 방지 */
    .itf-mega.is-open::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: -12px;
        height: 12px;
        pointer-events: auto;
    }

    .itf-mega.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0s linear 0s;
    }

    .itf-mega[hidden] {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .itf-mega__inner {
        display: grid;
        grid-template-columns: repeat(var(--itf-mega-cols, 6), minmax(0, 1fr));
        width: min(var(--in), 100%);
        max-width: 100%;
        margin: 0 auto;
        padding: 0 var(--inPd);
        box-sizing: border-box;
    }

    .itf-mega__col {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 0;
        padding: 36px 28px 40px;
        border-left: 1px solid #ebebeb;
        background: #fff;
        transition: background-color 0.2s ease;
        box-sizing: border-box;
        text-align: center;
    }

    .itf-mega__col:last-child {
        border-right: 1px solid #ebebeb;
    }

    .itf-mega__top {
        display: inline-block;
        max-width: 100%;
        font-size: 2rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        line-height: var(--titLine, 1.3);
        color: var(--txtBlack1);
        text-decoration: none;
        text-align: center;
        word-break: keep-all;
        transition: color 0.2s ease;
    }

    .itf-mega__divider {
        width: 100%;
        height: 1px;
        margin: 20px 0;
        background: #ebebeb;
    }

    .itf-mega__list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

    .itf-mega__list li {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .itf-mega__list a {
        display: inline-block;
        max-width: 100%;
        font-size: 1.7rem;
        font-weight: 500;
        letter-spacing: -0.02em;
        line-height: var(--txtLine, 1.5);
        color: var(--txtBlack1);
        text-decoration: none;
        text-decoration-thickness: 1px;
        text-underline-offset: 0.2em;
        text-align: center;
        word-break: keep-all;
        transition: text-decoration-color 0.16s ease;
    }

    .itf-mega__col:hover,
    .itf-mega__col:focus-within {
        background: #fafafa;
    }

    @media (hover: hover) {
        .itf-mega__top:hover {
            color: var(--primary);
        }

        .itf-mega__list a:hover {
            color: var(--txtBlack1);
            text-decoration: underline;
            text-decoration-color: currentColor;
        }
    }

    /* 헤더 스크롤 숨김 중엔 패널도 클릭/호버 차단 */
    .itf-site .header.is-hidden .itf-mega {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* 도장/클럽 일시 폐쇄 */
    .itf-mega a.is-disabled {
        cursor: default;
        pointer-events: none;
        opacity: 0.45;
    }

    @media (hover: hover) {
        .itf-mega a.is-disabled:hover {
            color: inherit;
            text-decoration: none;
        }
    }
}

@media screen and (max-width: 1024px) {
    .itf-mega {
        display: none !important;
    }
}
