.hero-section {
  position: relative;
  padding: 100px 0;
  min-height: 680px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: url("/images/converted_image.webp") center center / cover no-repeat;
}

/* 主遮罩：不要太黑，改成左深右淺 */
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(22, 32, 48, 0.50) 0%,
    rgba(22, 32, 48, 0.34) 26%,
    rgba(22, 32, 48, 0.18) 48%,
    rgba(22, 32, 48, 0.08) 68%,
    rgba(22, 32, 48, 0.02) 100%
  );
  z-index: 1;
}

/* 左邊再加一層柔光，不是黑壓壓那種 */
.hero-section::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 46%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.04) 45%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* 關鍵：文字區自己有一層淡底，不會像直接壓在圖上 */
.hero-text-box {
  max-width: 640px;
  padding: 32px 34px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.hero-badge {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.hero-title {
  color: #ffffff;
  font-size: clamp(2.4rem, 4.2vw, 4.2rem);
  line-height: 1.18;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.hero-desc {
  color: rgba(255,255,255,0.92);
  font-size: 1.12rem;
  line-height: 1.85;
  margin-bottom: 1rem;
}

.hero-list {
  color: rgba(255,255,255,0.9);
  padding-left: 1.2rem;
  margin-bottom: 1.5rem;
}

.hero-list li {
  margin-bottom: 0.6rem;
  line-height: 1.75;
}

.hero-note {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
}

.hero-cta-btn {
  min-width: 170px;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 600;
}

.hero-form-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(217, 231, 242, 0.95);
  box-shadow: 0 18px 42px rgba(16, 48, 84, 0.16);
  overflow: hidden;
}

.hero-form-head {
  padding: 24px 24px 14px;
}

.hero-form-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #eaf4ff;
  color: #0f4c81;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.hero-form-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
  color: #122033;
}

.hero-form-head p {
  margin: 0.75rem 0 0;
  color: #5a6b7d;
  font-size: 0.95rem;
  line-height: 1.75;
}

.hero-form {
  padding: 0 24px 24px;
}

.hero-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.hero-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hero-field-full {
  grid-column: 1 / -1;
}

.hero-field label {
  color: #243447;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-field label span {
  color: #d64b3b;
}

.hero-field input,
.hero-field select,
.hero-field textarea {
  width: 100%;
  border: 1px solid #d0dde8;
  border-radius: 14px;
  background: #f9fcfe;
  color: #18212b;
  padding: 12px 14px;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hero-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #0f4c81 50%),
    linear-gradient(135deg, #0f4c81 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.hero-field textarea {
  min-height: 96px;
  resize: vertical;
}

.hero-field input:focus,
.hero-field select:focus,
.hero-field textarea:focus {
  outline: none;
  border-color: #5aa4e6;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(90, 164, 230, 0.14);
}

.hero-form-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: #f3f8fc;
  color: #44515e;
  font-size: 0.9rem;
  line-height: 1.65;
}

.hero-form-agree input {
  margin-top: 0.18rem;
  flex: 0 0 auto;
}

.hero-form-agree a {
  color: #0d6efd;
  font-weight: 700;
  text-decoration: none;
}

.hero-form-agree a:hover {
  text-decoration: underline;
}

.hero-form-actions {
  margin-top: 1rem;
}

.hero-submit-btn {
  min-width: 180px;
  min-height: 50px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(13, 110, 253, 0.18);
}

.hero-consult-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}

.hero-consult-modal.is-open {
  display: block;
}

.hero-consult-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 28, 44, 0.56);
  backdrop-filter: blur(3px);
}

.hero-consult-dialog {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: auto;
  border-radius: 24px;
}

.hero-consult-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 76, 129, 0.08);
  color: #0f4c81;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 2;
}

body.modal-open {
  overflow: hidden;
}

/* 手機版 Hero */
@media (max-width: 991.98px) {
  .hero-section {
    min-height: auto;
    padding: 72px 0;
    background-position: center;
  }

  .hero-section::before {
    background: linear-gradient(
      180deg,
      rgba(22, 32, 48, 0.52) 0%,
      rgba(22, 32, 48, 0.34) 45%,
      rgba(22, 32, 48, 0.18) 100%
    );
  }

  .hero-section::after {
    display: none;
  }

  .hero-text-box {
    max-width: 100%;
    padding: 22px 18px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.18);
  }

  .hero-form-head {
    padding: 20px 18px 12px;
  }

  .hero-form {
    padding: 0 18px 18px;
  }

  .hero-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 1rem;
    line-height: 1.75;
  }

  .hero-list li {
    line-height: 1.7;
  }

  .hero-cta-btn {
    min-width: 100%;
  }

  .hero-submit-btn {
    width: 100%;
  }

  .hero-consult-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    margin: 10px auto;
  }
}

.section-padding {
  padding-top: 72px;
  padding-bottom: 72px;
}

.section-title {
  position: relative;
  margin-bottom: 1.75rem;
  padding-left: 1rem;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 4px;
  height: calc(100% - 0.5rem);
  border-radius: 999px;
  background: linear-gradient(180deg, #0d6efd 0%, #37b4c9 100%);
}

.section-title h2 {
  font-size: clamp(1.45rem, 2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #16283a;
  margin-bottom: 0.35rem;
}

.section-title small {
  display: block;
  max-width: 720px;
  color: #667788;
  font-size: 0.96rem;
  line-height: 1.75;
}

.section-title .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0 0.15rem;
  color: #0f4c81;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(15, 76, 129, 0.15);
}

.section-title .btn-link:hover {
  color: #0d6efd;
  border-bottom-color: rgba(13, 110, 253, 0.35);
}

.card-trim,
.activity-card,
.article-card {
  border-radius: 1rem;
  overflow: hidden;
}

.card-trim .card-img-top,
.activity-card .card-img-top {
  height: 190px;
  object-fit: cover;
}

.card-trim .card-body,
.activity-card .card-body,
.article-card .card-body {
  padding: 1rem 1.1rem 1.1rem;
}

.card-trim .card-title,
.article-card .card-title {
  font-size: 1rem;
}

.card-trim .card-title,
.activity-card .card-title,
.article-card .card-title,
.video-card h6 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.45;
  min-height: calc(1.45em * 2);
}

.card-trim .badge,
.activity-card .badge {
  font-size: 0.75rem;
}

.card-clickable,
.video-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.card-clickable:hover,
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.12) !important;
}

.card-link-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}

.card-clickable .card-body,
.video-card .card-body,
.video-card .video-thumbnail {
  position: relative;
  z-index: 2;
}

.card-link-text {
  color: var(--bs-primary);
  font-weight: 500;
}

.card-clickable .btn.card-link-text {
  pointer-events: none;
}

.badge-reading {
  background-color: #ff9800;
  color: #fff;
}

.badge-science {
  background-color: #4caf50;
  color: #fff;
}

.badge-coding {
  background-color: #00bcd4;
  color: #fff;
}

.card-meta {
  font-size: 0.8rem;
  color: #6c757d;
}

.card-trim .card-text,
.activity-card .card-text,
.article-card .small.text-muted,
.video-card .small.text-muted {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.7;
  min-height: calc(1.7em * 3);
}

.video-thumbnail {
  position: relative;
  overflow: hidden;
  border-radius: 0.9rem;
}

.video-thumbnail img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.video-thumbnail::after {
  content: "▶";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(0,0,0,.45);
}

.floating-contact {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1080;
}

.floating-contact .btn {
  display: block;
  margin-bottom: 8px;
}

.trust-logos img {
  max-height: 40px;
  margin: 0 12px 12px 0;
}

/* 手機水平滑動卡片列（營隊 / 課程用） */
.scroll-row {
  overflow-x: auto;
  flex-wrap: nowrap;
  scroll-snap-type: x mandatory;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.scroll-card {
  scroll-snap-align: start;
}

@media (max-width: 767.98px) {
  .scroll-card {
    flex: 0 0 80%;
    max-width: 80%;
  }
}

.location-section {
  background: #f8f9fb;
}

.location-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #eef1f4;
}

.location-content {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.location-badge {
  display: inline-block;
  align-self: flex-start;
  background: #eaf3ff;
  color: #0d6efd;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.location-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #212529;
}

.location-address {
  font-size: 17px;
  line-height: 1.7;
  color: #495057;
}

.location-info-box {
  background: #f8f9fb;
  border: 1px solid #edf0f3;
  border-radius: 16px;
  padding: 16px 18px;
}

.location-info-label {
  font-size: 14px;
  font-weight: 700;
  color: #0d6efd;
  margin-bottom: 6px;
}

.location-info-text {
  font-size: 15px;
  color: #495057;
  line-height: 1.7;
}

.location-map-wrap {
  min-height: 420px;
  background: #e9ecef;
}

.location-map {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

@media (max-width: 991.98px) {
  .location-content {
    padding: 28px 20px;
  }

  .location-title {
    font-size: 24px;
  }

  .location-map-wrap,
  .location-map {
    min-height: 320px;
  }
}

.about-section {
  padding: 80px 0;
  background: #f8f9fb;
}

/* 左側 */
.about-badge {
  display: inline-block;
  background: #eaf3ff;
  color: #0d6efd;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.about-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

.about-subtitle {
  color: #6c757d;
  margin-bottom: 20px;
}

.about-text {
  color: #495057;
  line-height: 1.8;
  margin-bottom: 12px;
}

/* 右側圖片 */
.about-image-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

/* 微微做一點設計感（不是花俏） */
.about-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.15),
    rgba(0,0,0,0)
  );
}

/* 圖片 */
.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* RWD */
@media (max-width: 991.98px) {
  .about-image-wrap {
    margin-top: 20px;
  }

  .about-title {
    font-size: 26px;
  }
}

@media (max-width: 767.98px) {
  .section-title {
    padding-left: 0.85rem;
    margin-bottom: 1.35rem;
  }

  .section-title h2 {
    font-size: 1.35rem;
  }

  .section-title small {
    font-size: 0.92rem;
    line-height: 1.65;
  }

  .section-title .btn-link {
    font-size: 0.9rem;
    margin-top: 0.4rem;
  }
}
