/* 解除 main-container overflow，否則 sticky 無法相對視窗固定 */
.main-container {
    overflow: visible;
}

/* 相關政策佈局-start */
.items-policy-section {
    position: relative;
    display: block;
    align-items: stretch;
    padding: 60px 0 120px;
    background:
        radial-gradient(ellipse 60% 40% at 0% 0%, rgba(30, 140, 230, 0.08), transparent 55%),
        radial-gradient(ellipse 50% 35% at 100% 20%, rgba(248, 188, 36, 0.08), transparent 50%),
        #f7f9fc;
    min-height: calc(100vh - 160px);
    overflow: visible;

    .my-container,
    .items-layout {
        overflow: visible;
    }

    .items-layout {
        display: grid;
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 40px;
        align-items: start;
    }

    .items-nav {
        position: sticky;
        top: 120px;
        z-index: 2;
        align-self: start;
        padding-top: 20px;
    }

    .items-nav__panel {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 28px;
        padding: 32px 24px;
        border-radius: 24px;
        background: var(--white-color);
        box-shadow: 0 6px 48px rgba(30, 140, 230, 0.16);
        overflow: hidden;

        &::before {
            content: "";
            position: absolute;
            inset: 0;
            background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
            background-size: 18px 18px;
            opacity: 0.35;
            pointer-events: none;
        }

        &::after {
            content: "";
            position: absolute;
            right: -48px;
            bottom: -48px;
            width: 160px;
            height: 160px;
            border-radius: 50%;
            background: rgba(248, 188, 36, 0.22);
            pointer-events: none;
        }
    }

    .items-nav__head,
    .items-nav__list {
        position: relative;
        z-index: 1;
    }

    .items-nav__head {
        padding: 0 4px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    }

    .items-nav__label {
        display: inline-block;
        margin-bottom: 10px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--yellow-color);
    }

    .items-nav__title {
        margin: 0 0 8px;
        font-size: 28px;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: -0.02em;
        color: var(--main-color);
    }

    .items-nav__desc {
        margin: 0;
        font-size: 14px;
        line-height: 1.6;
        color: var(--black-color);
    }

    .items-nav__list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .items-nav__link {
        position: relative;
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        padding: 14px 16px;
        border: 1px solid transparent;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
        color: var(--black-color);
        text-align: left;
        cursor: pointer;
        transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;

        &:hover {
            background: rgba(255, 255, 255, 0.14);
            transform: translateX(2px);
        }

        &.is-active {
            background: var(--white-color);
            border-color: rgba(255, 255, 255, 0.9);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
            color: var(--main-color);
            transform: translateX(2px);

            .items-nav__text {
                color: var(--main-color);
            }
        }
    }

    .items-nav__index {
        flex: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 500;
        letter-spacing: 0.04em;
        background: rgba(30, 140, 230, 0.12);
        color: var(--main-color);
        transition: background 0.25s ease, color 0.25s ease;
    }

    .items-nav__text {
        font-size: 15px;
        font-weight: 500;
        line-height: 1.4;
        letter-spacing: 0.02em;
        color: inherit;
    }

    .items-content {
        min-height: 520px;
        margin-top: 20px;
        padding: 40px 44px 48px;
        border-radius: 24px;
        background: var(--white-color);
        border: 1px solid rgba(24, 24, 24, 0.06);
        box-shadow: 0 12px 40px rgba(24, 24, 24, 0.04);
    }

    .items-policy {
        display: none;

        &.is-active {
            display: block;
            animation: items-policy-in 0.35s ease;
        }
    }

    .items-policy__meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px 16px;
        margin-bottom: 14px;
    }

    .items-policy__label {
        font-size: 13px;
        font-weight: 500;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--main-color);
    }

    .items-policy__updated {
        font-size: 13px;
        color: rgba(24, 24, 24, 0.45);
    }

    .items-policy__title {
        margin: 0 0 28px;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(24, 24, 24, 0.08);
        font-size: 34px;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: -0.02em;
        color: var(--black-color);
    }

    .items-policy__body {
        font-size: 16px;
        line-height: 1.85;
        letter-spacing: 0.01em;
        color: rgba(24, 24, 24, 0.72);

        h3 {
            margin: 32px 0 12px;
            font-size: 18px;
            font-weight: 500;
            line-height: 1.4;
            color: var(--black-color);
        }

        p {
            margin: 0 0 16px;

            &:last-child {
                margin-bottom: 0;
            }
        }

        ul {
            margin: 0 0 18px;
            padding: 0 0 0 1.15em;

            li {
                margin-bottom: 8px;

                &:last-child {
                    margin-bottom: 0;
                }
            }
        }

        a {
            color: var(--main-color);
            text-decoration: underline;
            text-underline-offset: 3px;

            &:hover {
                color: var(--yellow-color);
            }
        }
    }
}

@keyframes items-policy-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 相關政策佈局-end */