/* --- 基礎設定 --- */
body {
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- 網格容器 (Grid) --- */
.links-grid {
    display: grid;
    /* 自動填滿：最小寬度 240px，最大 1fr (均分) -> 實現 RWD */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

/* --- 卡片本體 --- */
.link-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden; /* 讓圖片圓角不跑出去 */
    text-decoration: none; /* 去除連結底線 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* 輕微陰影 */
    transition: all 0.3s ease; /* 動畫過渡 */
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: relative;
}

    /* 滑鼠懸停效果 (Movable) */
    .link-card:hover {
        transform: translateY(-5px); /* 向上浮動 */
        box-shadow: 0 8px 15px rgba(0,0,0,0.15); /* 加深陰影 */
    }

/* --- 模擬圖片區域 (實際使用時請換成 img) --- */
.card-img {
    height: 100px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 如果您要放真圖片，使用這個 class */
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- 文字內容區域 --- */
.card-content {
    padding: 15px;
    flex-grow: 1; /* 讓文字區填滿剩餘空間 */
    display: flex;
    align-items: center;
    justify-content: space-between; /* 文字靠左，箭頭靠右 */
}

.card-text {
    color: #333;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;
    width: 100%;
    padding-right: 15px; /* 留位置給箭頭 */
}

/* --- 右下角箭頭 --- */
.arrow-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: rotate(-45deg);
    transition: border-color 0.3s;
}

/* Hover 時箭頭變色 */
.link-card:hover .arrow-icon {
    border-color: #1a4073;
}
