/* ============================================
   麗妍醫美中心 - Radiant Beauty Clinic
   Design: Clean, restrained, professional
   Framework: Bootstrap 5.3 + Custom CSS
   Font: Noto Sans TC
   Palette: Off-white + Dusty Rose accent + Near-black text
   ============================================ */

:root {
  --bg: #FAFAFB;
  --surface: #FFFFFF;
  --accent: #B88A7E;
  --accent-hover: #A67A6F;
  --accent-light: rgba(184, 138, 126, 0.08);
  --accent-medium: rgba(184, 138, 126, 0.15);
  --text: #1A1A1A;
  --text-secondary: #7B7B7B;
  --text-muted: #A0A0A0;
  --border: #E8E5E3;
  --border-light: #F0EDEB;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 350ms ease;
  --font: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  animation: pageFadeIn 400ms ease forwards;
}

@keyframes pageFadeIn {
  to { opacity: 1; }
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.display-4, .display-5 {
  font-weight: 600;
  letter-spacing: -0.015em;
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

/* ---- Navbar ---- */
.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 0;
  min-height: 64px;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text) !important;
  letter-spacing: 0.02em;
}

.navbar .nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary) !important;
  padding: 0.5rem 1rem !important;
  transition: color var(--transition-fast);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent) !important;
}

.btn-primary-custom {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  white-space: nowrap;
}

.btn-primary-custom:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-outline-custom {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-outline-custom:hover {
  background: var(--accent-light);
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ---- Cards ---- */
.card-custom {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.card-custom:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-medium);
}

/* ---- Service Cards ---- */
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-medium);
}

.service-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 400ms ease;
}

.service-card:hover .service-card-img {
  transform: scale(1.04);
}

.service-card-body {
  padding: 1.25rem;
}

.service-card-body h5 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.service-card-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ---- Blog Cards ---- */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-medium);
}

.blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 400ms ease;
}

.blog-card:hover .blog-card-img {
  transform: scale(1.04);
}

.blog-card-body {
  padding: 1.25rem;
}

.blog-card-body .blog-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.blog-card-body h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  line-height: 1.4;
}

.blog-card-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Sections ---- */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
}

/* ---- Hero ---- */
.hero {
  padding: 7rem 0 5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-top: 0.75rem;
}

.hero-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---- Stats ---- */
.stat-item {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ---- Profile Cards ---- */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.profile-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-medium);
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.profile-card h5 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.profile-card .profile-title {
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.profile-card .profile-bio {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Pricing ---- */
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.pricing-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-medium);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.pricing-card h5 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.pricing-card .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.pricing-card .price small {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.pricing-card ul li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.pricing-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- Partner Slider ---- */
.partner-slider {
  display: flex;
  gap: 3rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.partner-logo {
  height: 32px;
  opacity: 0.45;
  transition: opacity var(--transition-fast);
  filter: grayscale(100%);
}

.partner-logo:hover {
  opacity: 0.75;
}

/* ---- Contact Form ---- */
.form-control-custom {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control-custom:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-label-custom {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--text);
}

/* ---- Footer ---- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer h6 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid var(--border-light);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ---- Scroll Reveal ---- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Stagger Delays ---- */
.delay-1 { transition-delay: 0ms; }
.delay-2 { transition-delay: 80ms; }
.delay-3 { transition-delay: 160ms; }
.delay-4 { transition-delay: 240ms; }
.delay-5 { transition-delay: 320ms; }
.delay-6 { transition-delay: 400ms; }

/* ---- Hero Typography Stagger ---- */
.hero-stagger {
  opacity: 0;
  transform: translateY(12px);
  animation: heroFadeUp 500ms ease forwards;
}

.hero-stagger:nth-child(1) { animation-delay: 100ms; }
.hero-stagger:nth-child(2) { animation-delay: 200ms; }
.hero-stagger:nth-child(3) { animation-delay: 300ms; }
.hero-stagger:nth-child(4) { animation-delay: 400ms; }

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Border Highlight ---- */
.border-highlight {
  transition: border-color var(--transition-base);
}

.border-highlight:hover {
  border-color: var(--accent);
}

/* ---- Gallery Zoom ---- */
.gallery-zoom {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.gallery-zoom img {
  transition: transform 500ms ease;
}

.gallery-zoom:hover img {
  transform: scale(1.06);
}

/* ---- Map Placeholder ---- */
.map-placeholder {
  width: 100%;
  height: 320px;
  background: var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
  border: 1px solid var(--border);
}

/* ---- Page Header (internal pages) ---- */
.page-header {
  padding: 5rem 0 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 600;
}

.page-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
}

/* ---- Breadcrumb ---- */
.breadcrumb-custom {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb-custom a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-custom a:hover {
  color: var(--accent);
}

/* ---- Section Divider ---- */
.section-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
  .hero {
    padding: 5rem 0 3rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .page-header {
    padding: 4rem 0 1rem;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
    opacity: 1;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-stagger {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .service-card:hover .service-card-img,
  .blog-card:hover .blog-card-img,
  .gallery-zoom:hover img {
    transform: none;
  }
}
