body {
    font-family: Arial, sans-serif;
    margin: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

header {
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 1rem 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    padding: 2rem;
}

header, main {
    position: relative;
    z-index: 1;
}


.home-section, .post-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.image-container {
    flex: 1;
    max-width: 400px;
}

.image-container img {
    width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.text-container {
    width: 500px;
    flex: 2;
    background: white;
    padding: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.text-container h2 {
    margin-top: 0;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: white;
    background-color: #007BFF;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 20px; /* 增加圓角 */
}

.post-date {
    font-size: 0.9rem;
    color: gray;
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.post-date svg {
    width: 10px;
    height: 10px;
    margin-right: 5px;
}

.post-section .banner {
    background-color: #f5f5f5;
    padding: 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.meta-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.category {
    font-weight: bold;
    margin-right: 1rem;
}

.tags {
    color: #007BFF;
}


/* 手機版本樣式 */
@media (max-width: 768px) {
    
    .home-section, .post-content {
        flex-direction: column;
        padding: 0;
        gap: 1rem;
    }

    .content-wrapper {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
        padding: 0;
        width: 100%;
    }

    .image-container {
        text-align: center;
        max-width: 100%;
    }

    .text-container {
        padding: 2rem;
        margin: 0;
        width: 80%;
    }

    .read-more {
        font-size: 0.8rem; /* 字體稍微變小 */
        padding: 0.4rem 0.8rem; /* 減小內部填充，讓按鈕更小 */
        width: auto; /* 讓寬度自適應 */
        max-width: none; /* 移除最大寬度限制 */
        border-radius: 20px; /* 增加圓角 */
        display: block; /* 確保按鈕是塊級元素 */
        margin: 1rem auto 0 auto; /* 讓按鈕置中顯示 */
        text-align: center; /* 確保文字在按鈕內置中 */
    }

    .post-date {
        font-size: 0.8rem;
    }

    main {
        padding: 1rem;
    }
}

/* 针对 iPhone 14 Pro（横向） - 844px */
@media (max-width: 844px) {
    .text-container {
        padding: 2rem;
        margin: 0;
        width: 80%;
    }
}

