/* Private MD Studio Theme - Refined Luxury */
:root {
  /* Master Palette: Warm Stone, Deep Charcoal, Champagne Gold */
  --bg: #F9F8F6;
  /* Warm Stone - Richer than white */
  --bg-2: #FFFFFF;
  /* Pure White for cards/panels */
  --text: #1C1C1E;
  /* Deep Charcoal - Softer than black */
  --text-light: #5E5E60;
  /* Muted Grey for body text */
  --brand: #1C1C1E;
  /* Primary Brand Color */

  --accent: #D4AF37;
  /* Champagne Gold - Metallic & Premium */
  --accent-light: #F2EFE9;
  /* Very pale stone/gold mix for backgrounds */

  --border: #E5E5E5;
  /* Subtle border */
  --panel: #FFFFFF;

  --shadow: 0 4px 20px rgba(28, 28, 30, 0.05);
  --shadow-hover: 0 12px 40px rgba(28, 28, 30, 0.08);

  /* Typography - Editorial Feel */
  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;

  /* Spacing */
  --container: 1200px;
  --radius: 0px;
  /* Sharp, editorial corners */
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  /* Increased for elegance */
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  /* Lighter weight for elegance */
  color: var(--brand);
  margin: 0 0 1.5rem 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

h3 {
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 1.5rem 0;
  color: var(--text-light);
  font-weight: 300;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 16px 32px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 0;
  /* Sharp corners for luxury */
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

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

.btn.small {
  padding: 10px 20px;
  font-size: 0.75rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: rgba(253, 252, 251, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  z-index: 100;
  padding: 20px 0;
  transition: padding 0.3s ease;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--brand);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 48px;
  /* Optimized for consistency */
  width: auto;
  display: block;
}

/* Font Consistency for Chinese */
:root[lang="zh"] body {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root[lang="zh"] h1,
:root[lang="zh"] h2,
:root[lang="zh"] h3 {
  font-family: "Playfair Display", "Songti SC", "SimSun", serif;
  font-weight: 600;
  /* Slightly bolder for Chinese headings */
}

.navlinks {
  display: flex;
  gap: 40px;
  align-items: center;
}

.navlinks a,
.dropdown-btn {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  cursor: pointer;
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.navlinks a::after,
.dropdown-btn::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.navlinks a:hover::after,
.dropdown-btn:hover::after {
  width: 100%;
}

.menu {
  display: none;
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--brand);
}

/* Ensure dropdown container doesn't break layout */
.dropdown {
  display: flex;
  align-items: center;
}

/* Hero */
.hero {
  padding: 160px 0 120px;
  background: radial-gradient(circle at 50% 50%, #FFFFFF 0%, var(--bg) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjEiIGZpbGw9InJnYmEoMCwwLDAsMC4wMykiLz48L3N2Zz4=');
  opacity: 0.4;
  pointer-events: none;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero .sub {
  font-size: 1.3rem;
  max-width: 680px;
  margin: 0 auto 3rem auto;
  color: var(--text-light);
  line-height: 1.6;
}

.cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 2.5rem;
}

/* Sections */
.section {
  padding: 120px 0;
}

.section.alt {
  background: #FFFFFF;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 24px;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: var(--accent);
}

/* Cards (Services) */
.grid {
  display: grid;
  gap: 40px;
}

.grid.cards {
  grid-template-columns: repeat(3, 1fr);
}

.grid.features {
  grid-template-columns: repeat(4, 1fr);
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--panel);
  padding: 48px 36px;
  border: none;
  /* Removed border for cleaner look */
  box-shadow: var(--shadow);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-8px);
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  color: var(--brand);
}

.card ul {
  padding-left: 20px;
  margin: 0 0 2rem 0;
  color: var(--text-light);
}

.card li {
  margin-bottom: 0.8rem;
}

.card .muted {
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.booking-actions {
  margin-top: auto;
  display: flex;
  gap: 16px;
}

/* Features */
.feature {
  text-align: center;
  padding: 32px;
}

.feature h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.feature p {
  font-size: 0.95rem;
}

/* Reviews */
.reviews blockquote {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text);
  background: transparent;
  padding: 40px;
  border: none;
  margin: 0;
  text-align: center;
  position: relative;
}

.reviews blockquote::before {
  content: '“';
  font-size: 4rem;
  color: var(--accent-light);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: serif;
}

/* Footer */
.footer {
  background: var(--brand);
  color: #fff;
  padding: 80px 0;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s;
}

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

.footer small {
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-bottom: 10px;
}

.footer strong {
  color: #fff;
  display: block;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Utilities */
.muted {
  color: var(--text-light);
}

.small {
  font-size: 0.85rem;
}

.tiny {
  font-size: 0.75rem;
}

.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 900px) {

  .grid.cards,
  .grid.features,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .navlinks {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow);
    gap: 20px;
  }

  .navlinks.open {
    display: flex;
  }

  .menu {
    display: block;
  }

  .hero {
    padding: 100px 0;
  }

  .footer-inner {
    flex-direction: column;
  }

  h1 {
    font-size: 2.5rem;
  }
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: none;
  min-width: 260px;
  box-shadow: var(--shadow-hover);
  padding: 12px 0;
  display: none;
  z-index: 200;
  border-radius: 2px;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.show {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 12px 24px;
  color: var(--text);
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
}

.dropdown-menu a:hover {
  background: var(--bg);
  color: var(--brand);
}

.dropdown-menu a::after {
  display: none;
}

/* Accessibility Button */
.btn-floating-accessibility {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--bg);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-floating-accessibility:hover {
  transform: scale(1.05);
  background: var(--text);
}

.btn-floating-accessibility svg {
  width: 24px;
  height: 24px;
}

/* Accessibility Panel */
.access-panel {
  position: fixed;
  bottom: 80px;
  left: 20px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  padding: 24px;
  border-radius: 8px;
  width: 300px;
  z-index: 1000;
  display: none;
  /* Hidden by default */
}

.access-panel:not([hidden]) {
  display: block;
  animation: fadeIn 0.2s ease;
}

.access-panel header {
  margin-bottom: 16px;
}

.access-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--brand);
}

.access-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.access-option input {
  margin-top: 4px;
}

.access-option label {
  font-size: 0.9rem;
  cursor: pointer;
}

.access-option small {
  display: block;
  color: var(--text-light);
  font-size: 0.8rem;
  margin-top: 2px;
}

.access-actions {
  margin-top: 20px;
  text-align: right;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Accessibility Modes */
body.pref-contrast {
  --bg: #000 !important;
  --text: #fff !important;
  --text-light: #ddd !important;
  --brand: #fff !important;
  --panel: #222 !important;
  --border: #444 !important;
}

body.pref-contrast img {
  filter: grayscale(100%) contrast(120%);
}

body.pref-text {
  font-size: 120% !important;
}

body.pref-motion *,
body.pref-motion-system * {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}

/* Client Portal Link */
.client-portal-link {
  margin-right: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

.client-portal-link:hover {
  color: var(--primary);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

.modal-content {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .modal-content {
    flex-direction: row;
  }
}

.modal-col {
  padding: 2rem;
  flex: 1;
}

.qr-col {
  background: #f9f9f9;
  border-right: 1px solid #eee;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-wrapper {
  margin: 1.5rem 0;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.qr-code {
  width: 150px;
  height: 150px;
  object-fit: contain;
}

.wechat-id {
  font-family: monospace;
  background: #eee;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.copy-btn {
  font-size: 0.8rem;
  margin-left: 0.5rem;
  cursor: pointer;
  border: 1px solid #ccc;
  background: white;
  border-radius: 4px;
  padding: 2px 6px;
}

.form-col h3 {
  margin-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: var(--text-light);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-group.half {
  flex: 1;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  padding: 0.5rem;
  border-radius: 4px;
}

.slot {
  padding: 0.4rem;
  text-align: center;
  background: #f4f4f5;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.slot:hover {
  background: var(--accent-light);
  color: var(--brand);
  border: 1px solid var(--accent);
}

.slot.selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.slot.loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-light);
  cursor: default;
  background: none;
  border: none;
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 2rem 0;
  animation: fadeIn 0.5s ease;
}

.success-icon {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.success-message h3 {
  font-family: var(--font-heading);
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.success-message p {
  color: var(--text-light);
  font-size: 0.9rem;
}