:root {
  --main-blue: #2563EB;
  --light-blue: #60A5FA;
  --bg-top: #EFF6FF;
  --bg-bottom: #FFFFFF;
  --brand-dark: #1F2937;
  --text-dark: #374151;
  --desc-gray: #6B7280;
  --input-border: #BFDBFE;
  --footer-bg: #F9FAFB;
  --success-color: #059669;
  --success-bg: #D1FAE5;
  --error-color: #DC2626;
  --error-bg: #FEE2E2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Noto Sans TC', Arial, sans-serif;
  margin: 0;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text-dark);
  line-height: 1.6;
}

/* 導航欄樣式 */
.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 1.2rem;
  margin-right: auto;
  gap: 0;
}

.nav-logo-img {
  width: 32px;
  margin-right: 0;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  position: relative;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--main-blue);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--main-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hero 區段樣式 */
.hero {
  background: transparent;
  color: var(--brand-dark);
  text-align: center;
  padding: 56px 16px 32px 16px;
}

.logo {
  width: 120px;
  margin-bottom: 8px;
}

.brand {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 2px;
  color: var(--brand-dark);
}

.subtitle {
  font-size: 1.1rem;
  letter-spacing: 3px;
  margin-bottom: 12px;
  color: var(--main-blue);
  font-weight: 600;
}

.tagline {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 12px;
  color: var(--main-blue);
}

/* 關於我們區段 */
.about {
  max-width: 700px;
  margin: 60px auto 0 auto;
  padding: 0 16px;
  text-align: center;
}

.about-zh {
  margin-bottom: 28px;
}

.about-title {
  font-size: 1.13rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 8px;
  white-space: nowrap;
}

.about-desc {
  font-size: 1rem;
  color: var(--text-dark);
  white-space: normal;
  text-align: center;
  max-width: 90%;
  margin: 0 auto 0 auto;
  line-height: 1.8;
}

.about-en {
  margin-bottom: 18px;
}

.about-title-en {
  font-size: 1rem;
  font-weight: 600;
  color: #1F2937;
  text-align: center;
  margin-bottom: 4px;
}

.about-desc-en {
  font-size: 0.94rem;
  color: var(--desc-gray);
  line-height: 1.7;
}

.mission {
  color: var(--main-blue);
  font-weight: 600;
  margin-top: 16px;
  font-size: 1.05rem;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(37, 99, 235, 0.2);
  display: inline-block;
}

.slogan {
  font-size: 1.05rem;
  color: #5A7FDB;
  border-bottom: 2px solid #E0E7FF;
  display: inline-block;
  padding-bottom: 2px;
  margin-top: 10px;
  margin-bottom: 0;
  font-weight: 500;
}

/* 區段標題 */
.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 32px;
  position: relative;
  padding-bottom: 12px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--main-blue);
}

/* 服務項目區段 */
.services {
  margin: 80px auto 0 auto;
  max-width: 1100px;
  padding: 0 16px 40px;
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -30%;
  width: 100%;
  height: 120%;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.7) 0%, rgba(239, 246, 255, 0) 100%);
  z-index: -1;
  border-radius: 100% 100% 0 0 / 20%;
  pointer-events: none;
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  perspective: 1000px; /* 添加3D透視效果 */
}

.card {
  background: linear-gradient(145deg, #FFFFFF, #F0F7FF);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(37,99,235,0.22), 0 5px 10px rgba(59, 130, 246, 0.1);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  padding: 28px 24px;
  cursor: pointer;
  min-width: 220px;
  max-width: 280px;
  flex: 1 1 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(219, 234, 254, 0.6);
  animation: cardAppear 0.6s backwards;
  /* 確保JS控制的變形不會被CSS覆蓋 */
  will-change: transform, box-shadow;
}

/* 卡片陸續出現的動畫 */
@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 為每張卡片設置不同的動畫延遲，讓它們陸續出現 */
.cards-container .card:nth-child(1) { animation-delay: 0.1s; }
.cards-container .card:nth-child(2) { animation-delay: 0.2s; }
.cards-container .card:nth-child(3) { animation-delay: 0.3s; }
.cards-container .card:nth-child(4) { animation-delay: 0.4s; }

/* 背景漸變效果 */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0), rgba(219, 234, 254, 0.5));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
  pointer-events: none;
}

.card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: scale(0.5);
  z-index: 0;
  pointer-events: none;
}

/* 添加滑鼠懸停時顯示的更多資訊提示 */
.card-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  color: var(--main-blue);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

/* 對於非JavaScript控制的效果，保留一些基本hover樣式 */
/* 這些樣式不會影響transform和box-shadow，這些由JS控制 */
.card:hover {
  border-color: rgba(37,99,235,0.45);
  background: linear-gradient(145deg, #FFFFFF, #E6F0FF);
}

.card:hover::before {
  opacity: 1;
}

.card:hover::after {
  opacity: 0.7;
  transform: scale(1);
}

/* 移動端裝置的更簡單效果 */
@media (hover: none) {
  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(37,99,235,0.2);
  }
}

.card-icon {
  margin-bottom: 16px;
  background-color: rgba(219, 234, 254, 0.7);
  padding: 14px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.5s ease;
  z-index: 1;
  box-shadow: 0 6px 12px rgba(37,99,235,0.15);
}

.card-icon svg {
  width: 40px;
  height: 40px;
  stroke: #1D4ED8;
  stroke-width: 2.2;
  transition: all 0.5s ease;
}

.card:hover .card-icon {
  background-color: rgba(37, 99, 235, 0.2);
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 8px 20px rgba(37,99,235,0.25);
}

.card:hover .card-icon svg {
  transform: rotate(-5deg);
  stroke: #1E40AF;
  stroke-width: 2.4;
}

.card-title-cn {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-top: 14px;
  transition: all 0.3s ease;
  z-index: 1;
  position: relative;
}

.card-title-en {
  font-size: 15px;
  color: #1E40AF;
  font-weight: 600;
  margin-top: 4px;
  transition: all 0.3s ease;
  z-index: 1;
  position: relative;
}

.card:hover .card-title-cn {
  color: #030712;
  transform: translateY(-2px);
}

.card:hover .card-title-en {
  color: #1a365d;
  transform: translateY(-2px);
}

.card-description {
  margin-top: 14px;
  font-size: 14px;
  color: #4B5563;
  line-height: 1.7;
  padding-top: 14px;
  border-top: 1px solid rgba(219, 234, 254, 0.7);
  max-width: 95%;
  transition: all 0.3s ease;
  z-index: 1;
  position: relative;
  font-weight: 500;
}

.card:hover .card-description {
  color: #374151;
  border-top-color: rgba(37,99,235,0.4);
}

/* 聯絡表單區段 */
.contact {
  max-width: 560px;
  margin: 64px auto 0 auto;
  padding: 32px 24px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(37,99,235,0.13);
  text-align: center;
}

.contact h2 {
  color: var(--main-blue);
  margin-bottom: 20px;
  font-size: 1.4rem;
  position: relative;
  display: inline-block;
}

.contact h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--main-blue);
  opacity: 0.3;
}

.form-messages {
  margin-bottom: 16px;
}

.success-message, .error-message {
  display: none;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  justify-content: center;
}

.success-message {
  background-color: var(--success-bg);
  color: var(--success-color);
}

.error-message {
  background-color: var(--error-bg);
  color: var(--error-color);
}

.message-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  fill: currentColor;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

input, textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: none;
  background: #fff;
  color: var(--text-dark);
  box-shadow: 0 1.5px 6px rgba(37,99,235,0.04);
  transition: all 0.2s ease;
}

textarea {
  min-height: 120px;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--main-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

button {
  background: var(--main-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 0;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(37,99,235,0.10);
  position: relative;
  overflow: hidden;
}

button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.18);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* 按鈕載入動畫 */
.button-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

button.loading .button-loader {
  display: inline-block;
}

button.loading span {
  visibility: hidden;
}

.contact-info {
  font-size: 0.98rem;
  color: var(--desc-gray);
  margin-top: 24px;
  line-height: 1.7;
}

.contact-info a {
  color: var(--main-blue);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-info a:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

/* 頁腳樣式 */
footer {
  background-color: var(--footer-bg);
  color: var(--desc-gray);
  padding: 40px 0 20px 0;
  margin-top: 80px;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0;
  font-weight: 600;
  color: var(--brand-dark);
  font-size: 1.2rem;
  justify-content: center;
  align-self: center;
  margin: 0 auto;
}

.footer-logo-img {
  width: 32px;
  margin-right: 0;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--desc-gray);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--main-blue);
}

.footer-copyright {
  margin-top: 16px;
  font-size: 0.92rem;
  text-align: center;
  color: var(--desc-gray);
}

/* RWD 響應式設計 */
@media (max-width: 1100px) {
  .cards-container {
    gap: 24px;
    padding: 0 12px;
  }

  .card {
    max-width: 260px;
    padding: 24px 18px;
  }
}

@media (max-width: 900px) {
  .cards-container {
    flex-wrap: wrap;
    gap: 24px;
  }

  .card {
    min-width: 220px;
    max-width: 280px;
  }

  .nav-links {
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 40px 16px 20px;
  }

  .logo {
    width: 80px;
  }

  .brand {
    font-size: 2.2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .about {
    margin-top: 40px;
  }

  .services {
    margin-top: 50px;
  }

  .cards-container {
    gap: 20px;
  }

  .card {
    min-width: 100%;
    padding: 22px 18px;
    max-width: none;
  }

  .card-icon {
    padding: 12px;
  }

  .card-icon svg {
    width: 32px;
    height: 32px;
  }

  .card-title-cn {
    font-size: 16px;
  }

  .card-title-en {
    font-size: 14px;
  }

  .contact {
    padding: 24px 16px;
    margin-top: 50px;
  }

  .about-title, .about-desc {
    max-width: 100%;
  }

  .nav-links {
    display: none;
  }

  .hamburger-menu {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    right: auto;
    top: auto;
    transform: none;
  }

  body.menu-open {
    overflow: hidden;
  }

  .nav-logo {
    margin: 0 auto 0 0;
  }

  .footer-content {
    text-align: center;
  }

  .footer-logo {
    margin: 0 auto;
    justify-content: center;
    align-self: center;
  }

  /* 對於行動裝置，減少過度的特效 */
  @media (hover: none) {
    .card:hover {
      transform: none;
      box-shadow: 0 6px 20px rgba(37,99,235,0.15);
    }

    .card:active {
      transform: translateY(-2px);
      box-shadow: 0 8px 16px rgba(37,99,235,0.2);
    }
  }
}

@media (min-width: 601px) and (max-width: 768px) {
  .card {
    min-width: calc(50% - 20px);
  }

  .nav-links {
    gap: 12px;
  }

  .nav-link {
    font-size: 0.9rem;
  }
}

@media (min-width: 769px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }

  .footer-copyright {
    margin-top: 0;
  }
}

/* 漢堡選單樣式 - 確保在小螢幕裝置上顯示 */
.hamburger-menu {
  display: none; /* 預設隱藏，只在小螢幕顯示 */
  cursor: pointer;
  z-index: 101;
  width: 28px;
  height: 20px;
  margin-left: 10px; /* 與導航連結保持距離 */
  position: relative; /* 使用相對定位 */
}

.hamburger-icon {
  width: 28px;
  height: 20px;
  position: relative;
  margin: 0;
  transform: rotate(0deg);
  transition: 0.5s ease-in-out;
  display: inline-block; /* 確保正確顯示 */
}

.hamburger-icon span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--main-blue);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.hamburger-icon span:nth-child(1) {
  top: 0px;
}

.hamburger-icon span:nth-child(2) {
  top: 8px;
}

.hamburger-icon span:nth-child(3) {
  top: 16px;
}

/* 漢堡選單點擊後的動畫 */
.hamburger-icon.open span:nth-child(1) {
  top: 8px;
  transform: rotate(135deg);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.hamburger-icon.open span:nth-child(3) {
  top: 8px;
  transform: rotate(-135deg);
}

/* 移動端選單樣式 */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 100;
  overflow-y: auto;
  padding-top: 70px;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-container {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.mobile-menu-link {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  transition: color 0.2s;
}

.mobile-menu-link:hover {
  color: var(--main-blue);
}

/* 背景遮罩 */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 99;
}

.menu-overlay.open {
  visibility: visible;
  opacity: 1;
}

/* 底部導航 */
.footer {
  background-color: #f8fafc;
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 0 auto;
  margin-bottom: 1rem;
  gap: 0;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  margin-right: 0;
}

.footer-logo span {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3b82f6;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .footer-logo {
    justify-content: center !important;
    align-self: center !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 640px) {
  .footer-logo {
    margin: 0 auto !important;
    justify-content: center !important;
    align-self: center !important;
  }
}

/* 卡片懸停效果 - JavaScript控制 */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-12px) scale(1.05);
  }
}

/* 卡片點擊效果 */
.card-clicked {
  animation: card-pulse 0.6s ease !important;
}

@keyframes card-pulse {
  0% {
    transform: scale(1.05) translateY(-12px);
  }
  50% {
    transform: scale(0.97) translateY(-8px);
    box-shadow: 0 5px 15px rgba(37,99,235,0.15), 0 3px 6px rgba(59, 130, 246, 0.1);
  }
  100% {
    transform: scale(1.05) translateY(-12px);
  }
}

/* 卡片點擊波紋效果 */
.card-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(29, 78, 216, 0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  opacity: 0.8;
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(40);
    opacity: 0;
  }
}

/* 確保行動裝置上的特效順暢 */
@media (max-width: 600px) {
  .card-ripple {
    animation-duration: 0.4s;
  }

  .card-clicked {
    animation-duration: 0.4s !important;
  }

  @keyframes card-pulse {
    0% {
      transform: scale(1.02) translateY(-5px);
    }
    50% {
      transform: scale(0.98) translateY(-3px);
    }
    100% {
      transform: scale(1.02) translateY(-5px);
    }
  }
}

/* 模態視窗樣式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 15px;
}

.modal.show {
  display: flex;
  animation: modalFadeIn 0.4s forwards;
}

.modal.fading-out {
  opacity: 0;
  transition: opacity 0.25s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 修復卡片閃爍問題 */
body.modal-open .card {
  transition: none !important;
  will-change: auto;
}

body.modal-open .card-icon,
body.modal-open .card-title-cn,
body.modal-open .card-title-en,
body.modal-open .card-description {
  transition: none !important;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 0;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  margin: auto;
}

.modal-inner {
  padding: 30px;
  overflow-y: auto;
  max-height: 80vh;
}

.modal-content.animate-in {
  animation: modalContentSlideIn 0.35s forwards cubic-bezier(0.23, 1, 0.32, 1);
  /* 確保關閉時不受 transform 影響 */
  transform: translateY(0) !important;
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  font-weight: 700;
  color: #9CA3AF;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
  z-index: 5;
}

.modal-close:hover {
  color: #1F2937;
}

.modal-icon {
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(219, 234, 254, 0.7);
}

.modal-icon svg {
  width: 45px;
  height: 45px;
  stroke: #1D4ED8;
  stroke-width: 2.2;
}

.modal-title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: #1F2937;
  margin: 10px 0 5px;
}

.modal-subtitle {
  text-align: center;
  color: #2563EB;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
}

.modal-description {
  color: #4B5563;
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.6;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(219, 234, 254, 0.7);
}

.modal-details {
  margin: 20px 0;
}

.modal-details-item {
  display: flex;
  margin-bottom: 15px;
  align-items: flex-start;
}

.detail-icon {
  flex-shrink: 0;
  margin-right: 12px;
  margin-top: 3px;
}

.detail-text {
  color: #4B5563;
  line-height: 1.5;
}

.modal-btn {
  background: var(--main-blue);
  color: white;
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
  transition: all 0.3s;
}

.modal-btn:hover {
  background: #1D4ED8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.18);
}

@media (max-width: 768px) {
  .modal {
    align-items: center;
    padding: 0;
    overflow-y: auto;
  }

  .modal-content {
    margin: 0;
    max-height: 90vh;
    overflow: hidden;
    width: 90%;
    border-radius: 15px;
  }

  .modal-inner {
    padding: 25px 20px;
    max-height: 70vh;
  }

  .modal-icon {
    width: 65px;
    height: 65px;
    margin-bottom: 12px;
  }

  .modal-icon svg {
    width: 35px;
    height: 35px;
  }

  .modal-title {
    font-size: 20px;
    margin: 10px 0 3px;
  }

  .modal-subtitle {
    font-size: 15px;
    margin-bottom: 15px;
  }

  .modal-description {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 18px;
    padding-bottom: 15px;
  }

  .modal-details {
    margin: 15px 0;
  }

  .modal-details-item {
    margin-bottom: 15px;
  }

  .detail-icon {
    margin-right: 10px;
    margin-top: 2px;
  }

  .detail-text {
    font-size: 14.5px;
    line-height: 1.4;
  }

  .modal-btn {
    padding: 12px 0;
    font-size: 15px;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    max-height: unset;
    margin: 0 auto;
  }

  .modal-inner {
    padding: 20px 15px;
    max-height: 75vh;
  }

  .modal-icon {
    width: 60px;
    height: 60px;
  }

  .modal-icon svg {
    width: 32px;
    height: 32px;
  }

  .modal-title {
    font-size: 19px;
    margin-top: 8px;
  }

  .modal-subtitle {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .modal-description {
    font-size: 14px;
    line-height: 1.4;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .modal-details-item {
    margin-bottom: 12px;
  }

  .detail-icon svg {
    width: 18px;
    height: 18px;
  }

  .detail-text {
    font-size: 14px;
    line-height: 1.35;
  }

  .modal-close {
    right: 15px;
    top: 12px;
    font-size: 22px;
  }

  .modal-btn {
    padding: 10px 0;
    font-size: 15px;
  }
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* 為模態視窗增加新的過渡效果 */
@keyframes modalContentSlideIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 在模態顯示時強制固定內容位置，避免關閉觸發縱向位移 */
.modal.show .modal-content {
  transform: translateY(0) !important;
}
.swal2-popup .modal-icon svg {
  width: 45px;
  height: 45px;
  stroke: #1D4ED8;
  stroke-width: 2.2;
}
.swal2-popup.serya-modal {
  border-radius: 18px;
  padding: 2.5em 2em 2em 2em;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  max-width: 100%;
}
.modal-description {
  margin-bottom:8px;
  border-bottom: 1px solid rgba(219, 234, 254, 0.7);
  padding-bottom: 20px;
  font-size: 16px;
}
.swal2-popup ul li {
  list-style: none;
  color: #4B5563;
  line-height: 2.5;
  font-size: 13px;
}
.swal2-title {
  margin-bottom: 0.5em;
}
button:where(.swal2-styled).swal2-confirm {
  width: 100%;
  background: var(--main-blue);
  color: white;
}