* {
    padding:0;
    margin:0;
}

/* Basic styles */
h1, h2, h3, h4, h5, h6, p {
    margin-top: 0;
}
h1 {
    font-size: 2.5em; /* 40px/16=2.5em */
}
h2 {
    font-size: 1.875em; /* 30px/16=1.875em */
}
h3 {
    font-size: 1.56em; /* 25px/16=1.56em */
}
h4 {
    font-size: 1.25em; /* 20px/16=1.25em */
}
h5 {
    font-size: 1.6em;
    color: #096A26; /* 18px/16=1.25em */
}   
a {
    color: #2244EE;
    text-decoration: none;
}
a:hover, a:active, a:focus {
    text-decoration: underline;
}

body {
    background-color: white;
}
header {
    background-color: rgba(249, 247, 246, 0.999);
    height: 80px;
    width: 100%;
    position: fixed;    
}

.slogan {
    background-color: #485652;
    color: white;
    width: 100%;
    height: 450px;
    display: flex;
    font-size: 15px;
    line-height: 1.3em;  
    padding: 50px 50px 0px 50px;
    margin-inline: auto;
    align-items: center;
}
a:link, a:visited, a:hover, a:active {
    color: #000000;
    text-decoration: none;
}

/* 響應式設計語法 */
@media screen and (max-width: 768px) {
    header ul {
        display: none;
    }
    header h1 {
        left: 50%;
        transform: translateX(-50%);
    }
    .news h2 {
        font-size: 40px;
    }
    .menu {
        display: block;
        background-color: transparent;
        color: white;
        font-size: 35px;
        position: absolute;
        top: 15px;
        left: 10px;
        border: none;
        cursor: pointer;
    }
    .shop {
        flex-direction: column;
    }
    .shop img {
        width: 100%;
    }
    .info {
        width: 100%;
        padding: 20px 0;
    }
    .info h2 {
        font-size: 30px;
    }
    .product {
        flex-direction: column;
        padding: 20px 0;
    }
    .product div {
        margin-bottom: 20px;
    }
}

#submit {
    background: #F4A6F0;
} 

.my-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}

.my-button:hover {
    background-color: #45a049;
}

-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;

/* Content containers */
#content1, #aside, #freeleft, #freeright, #free {
    margin: 10px;
    padding: 2px;
    font-size: medium;
}
#content1 {
    float: left;
}
.linklisthead {
    font-weight: bold;
    display: block;
    border-bottom: 1px solid #888;
}
.linklist {
    margin-bottom: 20px;
}
#yearSearch, #publishinfo {
    color: #004C7A;
    font-weight: bold;
}
#publishinfo {
    margin: 0;
    padding: 0;
    margin-top: -2em;
}

.carousel-item img {
    max-width: 100%;
    max-height: 100%;
}

.pic {
    text-align: center;
    margin-bottom: 1.2em;
}

.picture {
    max-width: 100%;
    height: auto;
}

.caption {
    font-size: 12pt;
    color: rebeccapurple;
    font-family: 'STKaiti', serif;
    display: inline-block;
    margin-top: 0.5em;
    max-width: 576px;
    text-align: left;
}

.caption > span {
    display: block;
    text-align: center;
}

/* 翻譯按鍵樣式 */
.language-btn {
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    background-color: #a3d9c9; /* 淡綠色背景，符合吉卜力風格 */
    border: 2px solid #6b9c8e;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background-color: #8cc7b5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.language-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


/* 搜尋框樣式 */
.gcse-searchbox-only input[type="text"] {
  width: 300px !important;
  height: 40px !important;
  border: 1px solid #ced4da !important;
  border-radius: 20px !important;
  padding: 0 15px !important;
  font-size: 16px !important;
  transition: box-shadow 0.3s !important;
}

.gcse-searchbox-only input[type="text"]:focus {
  outline: none !important;
  border-color: #4CAF50 !important;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.5) !important;
}

.gcse-searchbox-only button {
  height: 40px !important;
  margin-left: 10px !important;
  padding: 0 20px !important;
  background-color: #4CAF50 !important;
  color: white !important;
  border: none !important;
  border-radius: 20px !important;
  font-size: 16px !important;
  cursor: pointer !important;
  transition: background-color 0.3s !important;
}

/* 強制移除所有鏈接的底線 */
a {
    text-decoration: none !important;
}

/* 針對特定區域的鏈接（本週推介） */
.list-group .list-group-item a {
    text-decoration: none !important;
}

/* 滑鼠懸停時的效果 */
.list-group .list-group-item a:hover {
    text-decoration: underline !important;
}

.left-align {
            text-align: left;
        }
        a {
            display: inline-block;
            transition: transform 0.3s;
        }
        a:hover {
            transform: scale(1.1);
        }
        .language-select {
            margin: 10px;
            padding: 5px;
            border-radius: 5px;
            border: 1px solid #ced4da;
            background-color: #f8f9fa;
            font-size: 16px;
        }
        .title-container {
            margin-top: 100px;
        }

.navbar-nav {
    flex-grow: 1; /* 將導航列撐開 */
}
.ms-auto {
    margin-left: auto !important; /* 將內容推到右邊 */
}
.d-flex {
    display: flex !important;
}
.align-items-center {
    align-items: center !important; /* 垂直置中 */
}
.search-group {
    display: flex;
    align-items: center; /* 垂直置中 */
    gap: 10px; /* 控制兩個元素之間的間距 */
}

.translate-container {
    display: flex;
    align-items: center; /* 確保翻譯按鈕和文字垂直對齊 */
    gap: 5px; /* 控制文字與按鈕的間距 */
}

.search-container {
    display: flex;
    align-items: center;
}

/* 修改簡體中文按鈕的文字顏色為深灰色，底色為灰色 */
.translate-container .btn {
    color: #4a4a4a; /* 深灰色文字顏色 */
    background-color: #e0e0e0; /* 淺灰色背景 */
    border-color: #d6d6d6; /* 邊框顏色 */
}

/* 按鈕在懸停時的樣式 */
.translate-container .btn:hover {
    background-color: #d6d6d6; /* 懸停時更深的灰色背景 */
    color: #333333; /* 更深的文字顏色 */
    border-color: #c0c0c0; /* 更深的邊框顏色 */
}

/* 按鈕在點擊時的樣式 */
.translate-container .btn:active {
    background-color: #c0c0c0; /* 點擊時的背景顏色 */
    border-color: #a9a9a9; /* 點擊時的邊框顏色 */
    color: #292929; /* 點擊時的文字顏色 */
}

.text-start {
    text-align: left !important;
}

/* 自定義按鈕樣式 */
.btn-custom {
  display: block; /* 按鈕以 block 顯示 */
  width: 40%; /* 按鈕寬度佔 40% */
  padding: 10px;
  font-size: 1.25rem;
  color: gray;
  text-align: center;
  border: 1px solid gray;
  border-radius: 5px;
  text-decoration: none;
  background-color: transparent;
  margin: 0 auto 20px auto; /* 增加底部間距為 20px 並保持水平居中 */
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-custom:hover {
  background-color: #f8f9fa;
  color: black;
}

.btn-custom:hover {
  background-color: #f8f9fa;
  color: black;
}

/* 調整新聞細字體 */
.smaller-text {
  font-size: 0.9rem; /* 字體設定為稍小 */
  line-height: 1.4;  /* 調整行距以保持可讀性 */
}

/* 導航欄文字樣式 */
.navbar-nav .nav-link {
  font-family: "Arial", "Helvetica", sans-serif; /* 更改字體 */
  font-size: 1rem; /* 調整字體大小 */
  color: #4a4a4a; /* 設置深灰色 */
  font-weight: 400; /* 加強字體粗細 */
  text-transform: capitalize; /* 首字母大寫 */
  transition: color 0.3s ease; /* 添加平滑的顏色過渡效果 */
}

.navbar-nav .nav-link:hover {
  color: #2a2a2a; /* 滑過時變為更深的灰色 */
  text-decoration: underline; /* 滑過時加下劃線 */
}

/* 字體調整按鈕樣式 */
.font-adjust-btn {
  font-weight: bold;
  line-height: 1;
  font-family: Arial, sans-serif;
  border: 1px solid #ccc; /* 按鈕邊框 */
  border-radius: 5px; /* 圓角 */
  padding: 5px 10px;
  background-color: #f8f9fa; /* 按鈕背景 */
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.font-adjust-btn:hover {
  background-color: #e9ecef; /* 滑鼠懸停的背景色 */
  border-color: #bbb; /* 滑鼠懸停的邊框顏色 */
}

.font-adjust-btn span {
  font-weight: bold;
}

/* 主頁要聞框內加左右距離 */
/* 全局盒模型設置 */
* {
  box-sizing: border-box;
}

/* 段落樣式 */
.paragraph-padding {
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* Safari 專屬樣式 */
@supports (-webkit-touch-callout: none) {
  .paragraph-padding {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

.button-row {
  margin-top: 10px; /* 與上一部分的距離 */
  text-align: left; /* 將按鈕組靠左對齊 */
}

.font-adjust-btn {
  display: inline-block;
  padding: 5px 10px;
  font-size: 1rem;
  border: 1px solid gray;
  border-radius: 5px;
  background-color: transparent;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.font-adjust-btn:hover {
  background-color: #f0f0f0;
  color: #333;
}

.fs-6 {
  display: flex; /* 使用 flexbox */
  align-items: center; /* 垂直居中 */
  gap: 10px; /* 圖標與按鈕之間的間距 */
  flex-wrap: nowrap; /* 禁止換行 */
}

.fs-6 a {
  margin-right: 10px; /* 圖標之間的間距 */
  text-decoration: none;
  color: inherit; /* 保持文字顏色一致 */
}

.font-adjust-buttons {
  display: flex; /* 按鈕組內也使用 flexbox */
  align-items: center; /* 按鈕垂直居中 */
  gap: 10px; /* 按鈕之間的間距 */
}

.font-adjust-btn {
  padding: 5px 10px;
  font-size: 1rem;
  border: 1px solid gray;
  border-radius: 5px;
  background-color: transparent;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.font-adjust-btn:hover {
  background-color: #f0f0f0;
  color: #333;
}


/* 底線樣式 */
.section-divider {
  margin-top: 15px; /* 與字體調整按鈕的間距 */
  margin-bottom: 20px; /* 與段落的間距 */
  border: 0;
  border-top: 1px solid #ccc; /* 輕微的灰色底線 */
}

/* 段落樣式 */
.content-paragraph {
  margin-top: 30px; /* 與底線的距離 */
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

/* 分享文字樣式 */
.share-link {
  font-size: 0.75rem; /* 縮小為 12px (12/16 = 0.75) */
  color: inherit; /* 保持文字顏色與周圍的樣式一致 */
  text-decoration: none; /* 移除下劃線 */
}

.share-link:hover {
  text-decoration: underline; /* 滑鼠懸停時加下劃線 */
}