/* 共用css - navbar、footer... */
/* 基本樣式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Noto Sans TC', sans-serif;
  color: #333;
  background: #fff;
}
/* 導覽列 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.3s, box-shadow 0.3s;
  z-index: 1000;
}
.nav-links {
  display: flex;
  flex-direction: row;
  position: static;
  box-shadow: none;
  background: transparent;
  padding: 0;
  gap: 24px;
  margin-left: auto; 
  margin-right: 30px;
}
.nav-links li a {
  color: #fff;
  font-size: 16px;
  padding: 8px 12px;         /* ✅ 固定 padding */
  border-radius: 8px;
  box-sizing: border-box;   /* ✅ 不因 padding 變大 */
  display: inline-block;
  transition: background 0.3s, color 0.3s;
  text-decoration: none;
}
.nav-links li a:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* 捲動後變化 */
.navbar.scrolled {
  background:rgb(255, 255, 255);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.navbar.scrolled ul.nav-links li a {
  color: #333; 
}
#navbar-logo {
  height: 50px;
  width: auto;
}

.nav-links,
.nav-links li {
  list-style: none;
}

.login-mobile {
  display: none;
}

/* ✅ 手機 menu 按鈕 */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #30619F;
  background: none;
  border: none;
}
/* ✅ 隱藏子選單 */
.dropdown-menu {
  display: none;
  position: absolute;
  background: white;
  padding: 10px 0;
  border-radius: 8px;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1001;
  min-width: 160px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.dropdown-menu li {
  padding: 8px 20px;
}
.dropdown-menu li a {
  color: #333 !important;
  white-space: nowrap;
}
.dropdown-menu li a:hover {
  color: #ec9940;
  background: rgba(0,0,0,0.05);
}

/* ✅ 顯示子選單 */
.dropdown .dropdown-menu {
  display: none;
}
.dropdown.open .dropdown-menu {
  display: block;
}

/* 確保 dropdown 正常對齊 */
.nav-links li.dropdown {
  position: relative;
}
/* 用 ::after 擴展 hover 感應區域 */
.nav-links li.dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 24px; /* ✅ hover 緩衝距離 */
}

/* 彈窗 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-content {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
}
.modal-content h3 {
  color: #30619F;
  margin-bottom: 20px;
}
.modal-content button {
  background: #FF88A2;
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 20px;
  cursor: pointer;
}

/* 左側按鈕 */
.fixed-buttons {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 每顆按鈕樣式 */
.fixed-buttons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 60px;
  color: white;
  text-decoration: none;
  border-radius: 0 10px 10px 0;
  font-size: 16px;
  font-weight: bold;
  padding: 5px;
}

.fixed-buttons .btn-trial {
  background-color: #ff87b0;
  flex-direction: column;
  height: 100px;
}

.fixed-buttons .btn-line {
  background-color: #00c300;
}

.fixed-buttons .btn-messenger {
  background-color: #0078ff;
}

.login-entry {
  margin-left: 20px;
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1002;
}
.login-entry a {
  display: flex;
  align-items: center;
  background: white;
  color: #333;
  font-weight: bold;
  padding: 3px 20px 3px 44px;
  border-radius: 999px;
  font-size: 16px;
  text-decoration: none;
  position: relative;
  overflow: visible;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  height: 50px;
  width: 150px;
  /* 新增對齊 */
  justify-content: flex-end;
}
.login-entry span {
  margin-left: auto;
}

.navbar.scrolled .login-entry a {
  background: transparent;
  color: #ec9940;
  border: 1.5px solid #ec9940;
}
.navbar.scrolled .login-entry a:hover {
  background: #ec9940;
  color: white;
}
.login-entry .login-icon {
  position: absolute;
  left: 10px;
  top: -7px;
  width: 65px;
  height: auto;
  z-index: 1;
}

/* 手機版顯示在選單中，桌機不顯示中間登入 */
.nav-links li.login-mobile {
  display: none;
}

/* 三大特色 */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 20px 20px 20px;
  background: #F9FCFF;
}
.feature-wrapper {
  padding: 40px 20px 60px;
  max-width: 1100px;
  margin: 40px auto 0;
  text-align: center;
}

.feature {
  width: 280px;
  background: #fff;
  border-radius: 20px;
  padding: 30px 20px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s;
}
.feature:hover {
  transform: translateY(-5px);
}
.feature img {
  height: 100px;
  margin-bottom: 15px;
}
.feature h3 {
  color: #3061A0;
  margin-bottom: 10px;
}
.feature p {
  text-align: left;
}
/* youtube */
.youtube-video{
    /* background:#fcfbf7; */
    padding:40px 20px
}

.youtube-videos{
    /* background:#313131; */
    padding:7px 38px 24px 38px;
    box-sizing:border-box;
    max-width:800px;
    margin:0 auto;
    position:relative
}

.youtube-videos-title{
    text-align:center;
    font-size:23px;
    color:#030303;
    font-family:"NotoSansTcBold";
    margin-bottom:15px;
    letter-spacing:2.3px
}

.youtube-videos video,.youtube-videos iframe{
    /* background:#313131; */
    width:100%;
    height:540px;
    border-radius:30px
}

.youtube-videos .youtube-img{
    width:100%;
    border-radius:30px
}
.play{
    position:absolute;
    left:50%;
    margin-top:-36px;
    margin-left:-36px;
    top:50%
}
/* 課程總覽框架 */
.course-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.course-card {
  background: var(--card-color, #fff);
  border-radius: 24px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transition: transform 0.3s;
}
.course-card:hover {
  transform: translateY(-5px);
}
.course-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
}
.course-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #3061A0;
}
.course-card p {
  font-size: 15px;
  color: #444;
  min-height: 60px;
}
.course-card a {
  display: inline-block;
  margin-top: 20px;
  font-weight: bold;
  color: #00A5D5;
  text-decoration: none;
  font-size: 15px;
}
.course-card a::after {
  content: ' →';
  font-weight: normal;
}

.course-card-modern {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s;
}
.course-card-modern:hover {
  transform: translateY(-5px);
}

.card-img {
  position: relative;
}
.card-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.card-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  padding: 10px 16px;
  width: 100%;
  box-sizing: border-box;
}

.card-body {
  padding: 20px;
  text-align: left;
  min-height: 120px;
  padding-bottom: 50px;
}
.card-body p {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 10px;
}
.card-body a {
  position: absolute;
  right: 16px;
  bottom: 16px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  color: #00A5D5;
}

/* 服務專線 */
.contact-section {
  margin-top: 40px;
  padding: 40px 20px;
  background-color: #114d8c; /* 可自行更換 */
  background-image: url('/ver2/images/footer/footer-background-pc.png'); /* 如需點陣背景 */
  background-repeat: repeat;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 預設電腦版為3欄 */
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.contact-card {
  background: white;
  padding: 30px 20px;
  border-radius: 30px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}
.contact-card:hover {
  transform: translateY(-5px);
}
.contact-icon {
  width: 60px;
  height: auto;
  margin-bottom: 10px;
}
.contact-title {
  font-size: 16px;
  color: #888;
  margin-bottom: 8px;
}
.contact-number {
  font-size: 20px;
  font-weight: bold;
}

/* 顏色分類 */
.contact-card.pink .contact-number { color: #f26a8d; }
.contact-card.blue .contact-number { color: #00bcd4; }
.contact-card.green .contact-number { color: #66bb6a; }

/* 友站連結 */
.footer-link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 電腦版4欄 */
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.footer-link-card h4 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #ffffff;
}

.footer-link-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-link-card ul li {
  margin-bottom: 6px;
}

.footer-link-card ul li a {
  color: white;
  font-size: 16px;
  text-decoration: none;
}
.footer-link-card ul li a:hover {
  color: #ec9940;
}

/* footer */
.footer-bottom {
  background-color: #222;
  color: white;
  padding: 15px 20px;
  font-size: 16px;
}

.footer-bottom-inner {
  display: flex;
  justify-content: center; 
  align-items: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
  text-align: center;
}

.footer-icons {
  display: inline-flex;
  align-items: flex-end; /* ✅ 對齊底部 */
  gap: 10px;
}

.footer-icons a {
  position: relative;
  display: inline-block;
}

.footer-icons img {
  height: 20px;    /* ✅ 高度統一，高度控制整齊；你也可改成 24px、32px 等 */
  width: auto;     /* ✅ 宽度自動依比例 */
  vertical-align: bottom;
}

.footer-icons .image-after {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-icons .image-before {
  transition: opacity 0.3s ease;
}

.footer-icons a:hover .image-before {
  opacity: 0;
}

.footer-icons a:hover .image-after {
  opacity: 1;
}

.footer-info,
.footer-copy {
  white-space: nowrap;
}
/* 左側按鈕置底消失 */
.fixed-buttons.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* 免費試讀填單 */
.index-form-title {
    text-align: center;
    font-family: "NotoSansTcBold";
    color: #ff88a2;
    font-size: 32px;
    padding: 40px 0;
    letter-spacing: 2.3px;
}

.experience-form {
  max-width: 800px;
  margin: 0px auto 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-split {
  display: flex;
  gap: 10px;
}

.form-split .form-control {
  flex: 1;
}

.form-control {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

.form-check {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.form-check input[type="checkbox"] {
  margin-right: 8px;
}

.form-submit {
  background-color: #b0cd64;
  border: none;
  padding: 12px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  width: 100%;
}

.form-submit:hover {
  background-color: #a1be55;
}

/* 機器人 */
#recaptchaBox {
  display: none;
  margin-top: 10px;
}

/* loading */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-text {
  font-size: 18px;
  font-weight: bold;
  color: #444;
}

/* 標題樣版v1 */
.common-section {
  background: #f0f8ff;
}

.common-wrapper {
  padding: 0px 20px 30px;
  max-width: 1200px;
  margin: 0px auto 0;
}

.common-header {
  text-align: center;
  padding: 30px 20px 20px;
}

.common-header img {
  height: 80px;
  margin-bottom: 10px;
}

.common-header h2 {
  font-size: 28px;
  font-weight: bold;
  color: #1c95b4;
  margin: 0;
}

/* 標題樣版v2 - 框線版 */
.common-section-v2 {
  /* background: #f0f8ff; */
  margin: 30px auto ;
  max-width: 1500px;

}

.common-wrapper-v2 {
  background: url('/ver2/images/dot-grid.jpg') repeat;
  border: 3px solid #eb801b; 
  border-radius: 30px;
  padding: 0px 20px 30px;
  max-width: 1400px;
  margin: 0px auto 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: center;

}

.common-header-v2 {
  text-align: center;
  padding: 30px 20px 20px;
}

.common-header-v2 img {
  height: 80px;
  margin-bottom: 10px;
}

.common-header-v2 h2 {
  font-size: 28px;
  font-weight: bold;
  color: #1c95b4;
  margin: 0;
}



/* RWD 平版、手機版 */
@media(max-width:1079px) and (min-width:768px){
    .youtube-video{
        padding:0
    }

    .youtube-videos{
        padding:60px 104px
    }

    .youtube-videos-title{
        font-size:18px;
        letter-spacing:.09px
    }

    .youtube-videos video,.youtube-videos iframe{
        height:315px
    }
}


@media (max-width: 991px) {
  /* 課程總覽 */
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-link-grid {
    grid-template-columns: repeat(2, 1fr);
  }  
  /* footer */
  .footer-bottom-inner {
    flex-direction: column;
    align-items: center;
  }
  .footer-icons {
    order: 1;
  }
  .footer-info {
    order: 2;
  }
  .footer-copy {
    order: 3;
  }
}

@media (max-width: 768px) {
  .login-entry {
    display: none;
  }
  .nav-links li.login-mobile {
    display: block;
  }
  .login-mobile {
    display: block;
  }
  .menu-toggle {
    display: block;
  }

  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 60px;
    right: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    z-index: 999;
  }

  .nav-links li a {
    color: rgb(61, 61, 61);
    font-size: 16px;
    padding: 8px 12px;         /* ✅ 固定 padding */
    border-radius: 8px;
    box-sizing: border-box;   /* ✅ 不因 padding 變大 */
    display: inline-block;
    transition: background 0.3s, color 0.3s;
    text-decoration: none;
  }
  .nav-links li a:hover {
    background: rgba(0, 0, 0, 0.1);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    margin: 10px 0;
    list-style: none;
  }

  /* 下方按鈕 */
  .fixed-buttons {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
    width: 100%;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    z-index: 999;
  }

  .fixed-buttons a {
    display: flex;
    flex-direction: row; /* ✅ 改為橫向 */
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 60px;
    border-radius: 15px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    line-height: 1.2;
  }

  .fixed-buttons a img {
    width: 26px;
    height: 26px;
    margin-right: 8px;  /* ✅ 讓圖片與文字間有間距 */
    margin-bottom: 0;   /* ✅ 不需向下間距 */
  }

  .fixed-buttons .btn-trial {
    background-color: #ff87b0;
    flex-direction: row;         /* ✅ 改為橫向 */
    justify-content: flex-start; /* ✅ 讓圖示靠左、文字緊接著 */
    height: 60px;
    padding-left: 10px;
  }

  .fixed-buttons .btn-line,
  .fixed-buttons .btn-messenger {
    flex-direction: row;
    height: 60px;
  }

  /* 服務專線 */
  .contact-grid {
    grid-template-columns: 1fr;
  }
  /* 友站連結 */
  .footer-link-grid {
    grid-template-columns: 1fr;
  }
  /* footer */
  .footer-info,
  .footer-copy {
    white-space: normal;
  }
  /* youtube */
    .youtube-videos video,.youtube-videos iframe{
        height:180px;
        border-radius:10px
    }

    .youtube-video{
        padding:0
    }

    .youtube-videos{
        padding:50px 28px
    }

    .youtube-videos-title{
        font-size:28px;
        margin-bottom:30px;
        letter-spacing:2.8px
    }

    .youtube-videos h2{
      font-size: 20px;
    }

  /* 免費試讀填單 */
  .form-grid {
    grid-template-columns: 1fr;
  }

  /* 共用標題v1 */
  .common-header h2 {
    font-size: 20px;
    font-weight: bold;
    color: #1c95b4;
    margin: 0;
  }
  /* 共用標題v2 - 框線版 */
  .common-header-v2 h2 {
    font-size: 20px;
    font-weight: bold;
    color: #1c95b4;
    margin: 0;
  }  
}

@media (max-width: 576px) {
  /* 課程總覽 */
  .course-grid {
    grid-template-columns: 1fr;
  }
  /* footer */
  .footer-info,
  .footer-copy {
    white-space: normal;
  }
}

@media (min-width: 769px) {
  .nav-links .dropdown:hover .dropdown-menu {
    display: block !important;
  }

}