@charset "UTF-8";

body {
    line-height: 1.8;
}

main {
    max-width: 1000px;
    margin-top: 100px;
    padding: 2rem 1.5rem;
    align-items: flex-start;
    position: relative;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.2rem;
    color: #222;
}

h1 span {
    font-size: .8rem;
    padding-left: .5rem;
}

img {
    width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
}

h2 {
    border-left: 4px solid #222;
    padding-left: 1.2rem;
    margin: 4rem 0 1rem;
    font-size: 1.5rem;
    color: #111;
    font-weight: 600;
}

h3 {
    font-size: 1.25rem;
    color: #222;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

h4 {
    font-size: 1.15rem;
    color: #222;
    margin: 2rem 0 .5rem;
    font-weight: 500;
}

h5 {
    font-size: 1.05rem;
    color: #222;
    margin: 1.5rem 0 .5rem;
    font-weight: 500;
}

p,
li {
    font-size: 1rem;
    color: #333;
    line-height: 2;
    margin-top: 0.6rem;
    letter-spacing: .2px;
}

ul {
    padding-left: 1.5rem;
}

figcaption {
    letter-spacing: .2px;
    font-size: .8rem;
}

a:hover {
    color: #0070f3;
}

.meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1.5rem;
}

.categories span {
    background: #f1f1f1;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    margin-right: 0.3rem;
    font-size: 0.85rem;
    color: #555;
}

.scroll-m-t {
    scroll-margin-top: 120px;
}

.tien-icon {
    display: inline-block;
    background-image: url(../images/tien-icon.svg);
    background-size: contain;
    background-repeat: no-repeat;
    width: 22px;
    height: 30px;
    margin-right: 0.5rem;
}

/**** 關鍵字標籤 ****/
.tags {
    margin-top: 3rem;
    font-size: 0.9rem;
}

.tags span {
    margin-right: 0.5rem;
    color: #666;
}



/**** 圖片列表 ****/
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.image-gallery img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
}


/**** 段落按鈕 ****/
.toc {
    position: fixed;
    top: 150px;
    right: 5%;
    align-self: flex-start;
    width: 200px;
    padding: 1rem;
    background: #fafafa;
    border-left: 3px solid #ddd;
    font-size: 0.95rem;
    height: fit-content;
}

.toc h4 {
    margin-top: 0;
    font-size: 1rem;
    color: #222;
}

.toc a {
    display: block;
    padding: 0.3rem 0;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.toc a:hover {
    color: #0070f3;
}


/**** 表格區塊 ****/
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

th,
td {
    border: 1px solid #ddd;
    padding: 0.8rem;
    text-align: left;
    font-size: .85rem;
}

th {
    background: #f5f5f5;
    font-weight: 600;
}

tr:nth-child(even) {
    background: #fafafa;
}

.spacing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    font-size: 0.8rem;
    letter-spacing: .2px;
}

.spacing-table th,
.spacing-table td {
    border: 1px solid #ddd;
    padding: 0.8rem 1rem;
    text-align: left;
    vertical-align: top;
}

.spacing-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.spacing-table tr:nth-child(even) {
    background-color: #fafafa;
}

.spacing-table td[rowspan] {
    font-weight: 600;
    color: #222;
    background: #fcfcfc;
}

/**** 列表區塊 ****/
.step-list-2 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-list-3 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-list-4 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-item {
    border: 2px solid #ccc;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.step-num {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.3rem;
}

.step-item h3 {
    margin: 0.2rem 0 0.6rem;
    font-size: 1.1rem;
    color: #111;
}

.step-item hr {
    width: 60%;
    margin: 0.5rem auto 1rem;
    border: none;
    border-top: 2px solid #ccc;
}

.step-item ul {
    text-align: left;
    padding-left: 1.2rem;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
}



/**** 回上頁按鈕 ****/
.nav-links {
    margin-top: 3rem;
    text-align: center;
}

.nav-links a {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: #222;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

.nav-links a:hover {
    background: #444;
}