/* ==========================================================================
   永誠資訊股份有限公司 (YONGSOFT) 官方網站設計系統
   支援桌機、平板、手機 RWD，無需外部框架即可獨立部署
   所有圖片路徑皆統一指向 /images/
   ========================================================================== */
:root {
  --navy-950: #07111f;
  --navy-900: #0b192c;
  --navy-800: #132845;
  --blue-600: #0284c7;
  --blue-500: #0ea5e9;
  --blue-100: #e0f2fe;
  --blue-50: #f0f9ff;
  --gold-600: #d97706;
  --gold-500: #f59e0b;
  --gold-100: #fef3c7;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  /* i預約 專屬柔粉金美業主題色 */
  --rose-700: #9f4f5c;
  --rose-600: #b76e79;
  --rose-500: #c9848e;
  --rose-100: #faeef0;
  --rose-50: #fdf8f6;
  --rose-dark: #42252a;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
  --max-w: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "Inter", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--slate-700);
  background: var(--white);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue-600);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--blue-500);
}

h1, h2, h3, h4 {
  color: var(--slate-900);
  line-height: 1.3;
  margin-top: 0;
  font-weight: 700;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy-900);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--blue-600);
}

.brand-logo {
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate-700);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
}

.nav-link:hover {
  background: var(--slate-100);
  color: var(--navy-900);
}

.nav-link.active {
  background: var(--blue-50);
  color: var(--blue-600);
}

.nav-link.nav-ibooks.active {
  background: var(--rose-100);
  color: var(--rose-700);
}

.badge-new {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose-600), #d48c95);
  color: var(--white);
  line-height: 1.2;
}

.menu-toggle {
  display: none;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--navy-900);
  font-weight: 600;
  font-size: 0.9rem;
  align-items: center;
  gap: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), #0369a1);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover {
  color: var(--white);
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.36);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.26);
}

.btn-gold:hover {
  color: var(--white);
}

.btn-rose {
  background: linear-gradient(135deg, var(--rose-700), var(--rose-600));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(183, 110, 121, 0.3);
}

.btn-rose:hover {
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border-color: var(--slate-200);
  color: var(--slate-900);
}

.btn-outline:hover {
  border-color: var(--blue-600);
  color: var(--blue-600);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

/* Hero Sections */
.hero {
  position: relative;
  padding: 88px 0 80px;
  color: var(--white);
  background: var(--navy-900);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(7, 17, 31, 0.92) 0%, rgba(11, 25, 44, 0.78) 55%, rgba(2, 132, 199, 0.35) 100%);
}

.hero-rose .hero-overlay {
  background: linear-gradient(120deg, rgba(66, 37, 42, 0.9) 0%, rgba(110, 56, 66, 0.72) 55%, rgba(183, 110, 121, 0.38) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

/* Dedicated Page Logo Badge */
.page-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  margin-bottom: 20px;
}

.page-logo-badge img {
  height: 44px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.page-logo-badge span {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: 0.04em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  margin-bottom: 18px;
  backdrop-filter: blur(6px);
}

.eyebrow-light {
  background: var(--blue-50);
  color: var(--blue-600);
}

.eyebrow-rose {
  background: var(--rose-100);
  color: var(--rose-700);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.hero p {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 28px;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.page-banner {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 60%, #0e3a5c 100%);
  color: var(--white);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}

.page-banner h1 {
  color: var(--white);
  font-size: clamp(1.85rem, 3.6vw, 2.7rem);
  margin-bottom: 12px;
}

.page-banner p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 700px;
  margin-bottom: 0;
  font-size: 1.04rem;
}

/* Sections & Grids */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--slate-50);
}

.section-rose {
  background: var(--rose-50);
}

.section-dark {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.86);
}

.section-dark h2, .section-dark h3 {
  color: var(--white);
}

.section-head {
  max-width: 740px;
  margin-bottom: 40px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}

.section-head p {
  color: var(--slate-600);
  margin: 0;
  font-size: 1.02rem;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

/* Our Story Two-Piece Layout + Visual */
.story-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

.story-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.story-media img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

/* Standalone Editorial Slogan Band */
.slogan-band {
  margin-top: 40px;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy-900) 0%, #102a4a 100%);
  color: var(--white);
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
}

.slogan-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.65;
  color: var(--white);
  max-width: 920px;
  margin: 0 auto;
}

.slogan-quote {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1;
  color: var(--gold-500);
  flex-shrink: 0;
}

.slogan-author {
  margin-top: 16px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #7dd3fc;
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.card-content {
  position: relative;
  z-index: 2;
}

/* Semi-transparent background icon for Core Services */
.service-bg-icon {
  position: absolute;
  right: 16px;
  bottom: 12px;
  width: 112px;
  height: 112px;
  opacity: 0.085;
  color: var(--navy-900);
  pointer-events: none;
  z-index: 1;
}

/* Semi-transparent Seal / Stamp Logo for Flagship Platforms */
.platform-seal {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 132px;
  height: 132px;
  object-fit: contain;
  opacity: 0.13;
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 1;
  filter: saturate(0.85);
}

.card-rose {
  border-color: #eedbe0;
}

.card-rose:hover {
  border-color: var(--rose-500);
}

.card-dark {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
}

.card-dark h3 {
  color: var(--white);
}

/* Leader Endorsement Card */
.leader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.leader-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  margin: 10px 0 12px;
}

.leader-role {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: #93c5fd;
  font-weight: 600;
}

.leader-quote {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.84);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 12px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.card-icon.gold {
  background: var(--gold-100);
  color: var(--gold-600);
}

.card-icon.rose {
  background: var(--rose-100);
  color: var(--rose-700);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--slate-100);
  color: var(--slate-700);
  margin-bottom: 10px;
}

.tag-blue {
  background: var(--blue-100);
  color: #0369a1;
}

.tag-gold {
  background: var(--gold-100);
  color: #b45309;
}

.tag-rose {
  background: var(--rose-100);
  color: var(--rose-700);
}

/* Stat Strip */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 20px;
  backdrop-filter: blur(8px);
}

.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 4px;
}

/* Filter & Tab Pills */
.pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.pill-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-700);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.pill-btn:hover {
  border-color: var(--blue-500);
  color: var(--blue-600);
}

.pill-btn.active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}

.pill-btn.rose.active {
  background: var(--rose-700);
  border-color: var(--rose-700);
  color: var(--white);
}

/* Tables & Comparison */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--slate-200);
}

th {
  background: var(--slate-100);
  color: var(--slate-900);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

/* Interactive Calculator Box */
.calc-panel {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.range-slider {
  width: 100%;
  accent-color: var(--blue-600);
  cursor: pointer;
  height: 8px;
}

/* Lists */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 26px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue-600);
  font-weight: 800;
}

.check-list.rose li::before {
  color: var(--rose-700);
}

/* Forms */
.form-grid {
  display: grid;
  gap: 16px;
}

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

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--slate-900);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Callout / Notice Box */
.notice-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--gold-600);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  color: #78350f;
}

.notice-box.rose {
  background: var(--rose-100);
  border-color: #e9c9cf;
  border-left-color: var(--rose-700);
  color: var(--rose-dark);
}

/* Footer */
.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.78);
  padding: 60px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-company-wrap {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.footer-logo {
  width: 68px;
  height: auto;
  max-height: 76px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
}

.site-footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Toast Notification */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2000;
  background: var(--navy-900);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 0.94rem;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 380px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Preview Mode Banner */
.preview-bar {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  padding: 7px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.preview-bar strong {
  color: #38bdf8;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 1080px) {
  .nav-list {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-md);
    gap: 6px;
  }
  .nav-list.open {
    display: flex;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .grid-4, .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .form-row-2 {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 64px 0 56px;
  }
  .section {
    padding: 52px 0;
  }
  .slogan-text {
    gap: 8px;
  }
}

@media (max-width: 540px) {
  .grid-4, .stats-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-company-wrap {
    flex-direction: column;
  }
}
