/* 首頁入口卡片（年度註冊系統／成績查詢）— 只由 MasterPage/Site_0.master 載入；改版時一併調整 master 裡的 ?版號 */
.home-entry {
    padding: 3rem 1.5rem 1rem;
}

.home-entry-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .home-entry-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.home-entry .he-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    min-height: 320px;
    border-radius: 10px;
    background: #1b222c;
    color: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

    /* 背景照片 */
    .home-entry .he-bg {
        position: absolute;
        inset: 0;
        z-index: -2;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .6s ease;
    }

    /* 文字區遮罩：左深右淺，照片仍看得到 */
    .home-entry .he-card::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: linear-gradient(100deg, rgba(14, 19, 28, .93) 0%, rgba(14, 19, 28, .8) 45%, rgba(14, 19, 28, .3) 100%);
    }

    /* 上緣主色條 */
    .home-entry .he-card::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: #DD5000;
    }

    .home-entry .he-card:hover .he-bg,
    .home-entry .he-card:focus-within .he-bg {
        transform: scale(1.05);
    }

.home-entry .he-body {
    padding: 2.5rem 2.75rem;
    max-width: 580px;
}

.home-entry .he-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    margin-bottom: .5rem;
    color: #ff9d5c;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .18em;
}

.home-entry .he-title {
    margin: 0 0 .625rem;
    color: #fff;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.3;
}

.home-entry .he-desc {
    margin: 0 0 1.5rem;
    color: rgba(255, 255, 255, .9);
    font-size: 1.0625rem;
    line-height: 1.7;
}

.home-entry .he-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.home-entry a.he-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    min-height: 48px;
    padding: .625rem 1.625rem;
    border: 2px solid transparent;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.home-entry a.he-btn-primary {
    background: #C44700;
    border-color: #C44700;
    color: #fff;
}

    .home-entry a.he-btn-primary:hover,
    .home-entry a.he-btn-primary:focus {
        background: #A33B00;
        border-color: #A33B00;
        color: #fff;
    }

.home-entry a.he-btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, .85);
    color: #fff;
}

    .home-entry a.he-btn-ghost:hover,
    .home-entry a.he-btn-ghost:focus {
        background: #fff;
        border-color: #fff;
        color: #1b222c;
    }

.home-entry a.he-link {
    display: inline-block;
    margin-top: 1rem;
    color: #fff;
    font-size: .9375rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

    .home-entry a.he-link:hover,
    .home-entry a.he-link:focus {
        color: #ff9d5c;
    }

/* 整張卡片可點（只有一個主要動作的卡片使用） */
.home-entry a.he-stretch::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.home-entry a.he-btn:focus-visible,
.home-entry a.he-link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

@media (max-width: 575.98px) {
    .home-entry {
        padding: 2rem 1rem .5rem;
    }

    .home-entry .he-card {
        min-height: 0;
    }

        .home-entry .he-card::before {
            background: linear-gradient(180deg, rgba(14, 19, 28, .7) 0%, rgba(14, 19, 28, .9) 100%);
        }

    .home-entry .he-body {
        padding: 2rem 1.25rem 1.75rem;
    }

    .home-entry .he-title {
        font-size: 1.75rem;
    }

    .home-entry .he-desc {
        font-size: 1rem;
    }

    .home-entry a.he-btn {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-entry .he-bg {
        transition: none;
    }

    .home-entry .he-card:hover .he-bg,
    .home-entry .he-card:focus-within .he-bg {
        transform: none;
    }
}
