/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Klee+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kiwi+Maru&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Kiwi Maru", serif;
}

a {
    text-decoration: none;
    color: #fff;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 10px auto;
    padding: 0 20px;
}

.guide {
    align-self: flex-start;
    margin: 130px 0 50px;
}

/* Content Styles */
.content-header,
.content-title {
    width: 100%;
    padding: 20px;
    color: #fff;
    border-radius: 8px;
    margin-bottom: 40px; /* Increased from 15px to 40px */
}

.content-header h2,
.content-title h2 {
    font-family: "Klee One", cursive;
    font-size: 32px;
    text-align: center;
    margin-bottom: 20px; /* Added margin to separate title from paragraph */
}

.content-header h4,
.content-title h4 {
    font-family: "Klee One", cursive;
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px; /* Added margin to separate title from paragraph */
}

.content-header p,
.content-title p {
    margin-top: 15px;
    text-align: center;
}

.content-title h2 {
    font-size: 35px;
}

.content-title p {
    font-size: 25px;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 40px;
}

.text-only,
.text-image {
    width: 100%;
    padding: 20px;
    color: #fff;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 30px; /* Added margin to separate content blocks */
}

.text-only h3,
.text-image h3 {
    font-family: "Klee One", cursive;
    font-size: 24px;
    margin: 0 0 20px 40px; /* Increased bottom margin from 15px to 20px */
}

.text-only p,
.text-image p {
    line-height: 1.6;
    margin-left: 75px;
}

table {
    margin-left: 60px; /* 調整這裡的值以改變縮排 */
}

.text-image {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap; /* 新增這行以確保內容在小螢幕上換行 */
}

.text-image .text {
    flex: 1 1 100%; /* 調整這行以確保文字區塊在小螢幕上佔滿寬度 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.text-image .image {
    flex: 1 1 100%; /* 調整這行以確保圖片區塊在小螢幕上佔滿寬度 */
    max-width: 100%; /* 確保圖片不會超出容器寬度 */
}

.text-image .image img {
    width: 100%;
    border-radius: 8px;
}

.item {
    display: inline-block; /* 讓項目能夠使用margin來間隔 */
    margin-right: 50px; /* 根據需要調整間距 */
}

.section {
    margin-bottom: 20px; /* 每個區塊之間的間距 */
}

.title-item {
    font-weight: bold; /* 標題項目加粗 */
    display: block; /* 標題項目顯示為塊級元素 */
    margin-bottom: 5px; /* 標題與內文之間的間距 */
}

.content-item {
    display: inline-block; /* 內文項目顯示為行內塊元素 */
    margin-right: 20px; /* 內文項目之間的間距 */
}

.practice-button {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    margin: 0 auto;
    justify-content: center;
}

.practice-button:hover {
    background-color:  rgba(255, 255, 255, 0);
}

.practice-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.practice-answer.expanded {
    max-height: 1000px;
}

.practice-answer img {
    max-width: 100%;
    height: auto;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .content-header h2,
    .content-title h2 {
        font-size: 28px;
    }

    .content-header h4,
    .content-title h4 {
        font-size: 26px;
    }

    .content-title p {
        font-size: 22px;
    }

    .text-only h3,
    .text-image h3 {
        font-size: 22px;
        margin-left: 20px;
    }

    .text-only p,
    .text-image p {
        margin-left: 40px;
    }
}

@media screen and (max-width: 768px) {
    .guide {
        margin: 80px 0 30px;
    }

    .content-header,
    .content-title {
        margin-bottom: 30px;
    }

    .content-header h2,
    .content-title h2 {
        font-size: 26px;
    }

    .content-header h4,
    .content-title h4 {
        font-size: 24px;
    }

    .content-title p {
        font-size: 20px;
    }

    .text-only h3,
    .text-image h3 {
        font-size: 20px;
        margin-left: 10px;
    }

    .text-only p,
    .text-image p {
        margin-left: 20px;
    }

    .text-image {
        flex-direction: column;
        align-items: center;
    }

    .text-image .text,
    .text-image .image {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .text-image .text {
        align-items: flex-start;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .guide {
        margin: 60px 0 20px;
    }

    .content-header,
    .content-title,
    .text-only,
    .text-image {
        padding: 15px;
    }

    .content-header h2,
    .content-title h2 {
        font-size: 24px;
    }

    .content-header h4,
    .content-title h4 {
        font-size: 22px;
    }

    .content-title p {
        font-size: 18px;
    }

    .text-only h3,
    .text-image h3 {
        font-size: 18px;
        margin-left: 0;
    }

    .text-only p,
    .text-image p {
        margin-left: 0;
        font-size: 14px;
    }
}