.main-header {
  margin: 1em 1em 0 1em;
  border-radius: 1em 1em 0 0;
  border-width: 0.25em 0.25em 0 0.25em !important;
  width: 66% !important;
}

.main-mid {
  border-width: 0 0.25em 0 0.25em !important;
  width: 66% !important;
}

.main-footer {
  border-radius: 0 0 1em 1em;
  border-width: 0 0.25em 0.25em 0.25em !important;
  border: solid;
  border-color: #4467f2;
  background-color: #4467f2;
}

nav {
  width: 100% !important;
}

nav > li {
  list-style-type: none;
}

.logo {
  width: 15rem !important;
  height: auto;
}

.bg-white-section {
  background-color: #ffffff;
}

.bg-gray-section {
  background-color: #ebebeb; /* Bootstrap 的 light gray */
  /* 或者使用你想要的灰色 */
  /* background-color: rgb(164, 162, 161); */
}

.content-container {
  margin: 0 auto; /* 水平置中 */
}

.news-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.news-card a:hover .card-title {
  color: rgb(96, 76, 63) !important;
}

.in-context {
  padding: 2em 0;
}

.main-footer-index3 {
  background-color: #4467f2;
}

.icon-img {
  width: 2.5em;
  height: 2.5em;
  object-fit: contain; /* 保持圖片比例 */
}

.fold-aria {
  background-color: #4467f2;
  color: #ffffff;
  border-radius: 1em;
}

.fold-aria-inside {
  background-color: rgba(129, 199, 246, 0.9);
  color: rgb(96, 76, 63);
  border-radius: 0.5em;
}

body {
  font-size: 1.1em;
}

a {
  font-size: 1.1em !important;
}

/* 圖片容器樣式 */
.image-container {
  width: 40px;
  height: 40px;
  background-color: white;
  border: 1px solid #eee;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.icon-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* 連結項目樣式 */
.link-item {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.link-item:last-child {
  border-bottom: none;
}

/* 按鈕樣式調整 */
.btn {
  text-align: left;
  padding: 6px 10px;
  transition: background-color 0.2s;
}

/* 行動裝置適應 */
@media (max-width: 768px) {
  .in-context {
    padding: 1em 0;
  }
  body {
    font-size: 1em !important;
  }

  a {
    font-size: 1em !important;
  }
  .main-header {
    width: 100% !important;
    margin: 0;
  }
  .main-mid {
    width: 100% !important;
  }
  .main-footer {
    width: 100% !important;
  }
}

/* 超小螢幕適應 */
@media (max-width: 480px) {
  .in-context {
    padding: 0.5em 0;
  }
  body {
    font-size: 0.9em !important;
  }

  a {
    font-size: 0.9em !important;
  }
  .main-header {
    width: 100% !important;
    margin: 0;
  }
  .main-mid {
    width: 100% !important;
  }
  .main-footer {
    width: 100% !important;
  }
}

/* 導航列 Logo 與選單水平排列樣式 */
.navbar-brand img {
  transition: transform 0.2s ease-in-out;
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

/* 桌面*/
@media (min-width: 992px) {
  .offcanvas-body {
    margin-left: auto !important;
    float: right !important;
  }
  .navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .navbar-brand {
    margin-right: 2rem;
    flex-shrink: 0;
  }

  .nav-item {
    margin-right: 0.5rem;
  }

  .navbar-collapse {
    flex-grow: 1;
    justify-content: flex-start;
  }

  .navbar-nav {
    align-items: center;
    margin-left: 0;
  }

  .nav-link {
    white-space: nowrap;
    font-size: 0.95rem !important;
    padding: 0.5rem 0.8rem !important;
  }
  .dropdown-menu .dropdown-toggle::after {
    transform: rotate(-90deg);
    margin-left: 0.25rem;
  }

  .dropdown-menu li:hover > .dropdown-menu {
    display: block;
  }

  .dropdown-menu li > .dropdown-menu {
    display: none;
    min-width: 12rem;
    top: 0;
    position: absolute;
    left: 100%;
  }

  .dropdown-menu li {
    position: relative;
  }

  .dropdown-menu li:hover > .dropdown-menu.leftward {
    left: auto;
    right: 100%;
  }
}

/* 調整下拉選單樣式 */
.dropdown-menu {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background-color: rgba(68, 103, 242, 0.1);
  color: rgb(68, 103, 242);
}

/* 手機版調整 */
@media (max-width: 991.98px) {
  .navbar-brand {
    margin-bottom: 0;
  }

  .offcanvas {
    max-width: 300px;
  }
  .offcanvas-body .navbar-nav {
    flex-direction: column !important;
  }

  .nav-item {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
  }
}

/* 如果選單項目太多，可以調整字體大小 */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .nav-link {
    font-size: 0.85rem !important;
    padding: 0.5rem 0.6rem !important;
  }
}

/* 大螢幕優化 */
@media (min-width: 1800px) {
  .navbar-brand {
    margin-right: 3rem;
  }

  .nav-link {
    font-size: 1.25rem !important;
    padding: 0.5rem 1rem !important;
  }

  body {
    font-size: 1.25em;
  }

  a {
    font-size: 1.25em !important;
  }
}

/*ckeditor*/
.ck-content .text-tiny {
  font-size: 0.7em;
}
.ck-content .text-small {
  font-size: 0.85em;
}
.ck-content .text-big {
  font-size: 1.4em;
}
.ck-content .text-huge {
  font-size: 1.8em;
}
