:root {
  --brand-primary: #C58C6D;
  --brand-primary-hover: #a57259;
  --brand-secondary: #6B705C;
  --brand-accent: #E8D5C4;
  --brand-light: #FAF6F1;
  --brand-bg: #FAF6F1;
  --text-color: #3d3d35;
  --text-muted: #7a7a70;
  --card-text-muted: #5a5a50;
  --plan-line: rgba(0, 0, 0, 0.1);
  --border-radius: 1rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover {
  color: var(--brand-primary-hover);
  text-decoration: underline;
}

/* --- Accessibility: Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(197, 140, 109, 0.25);
}

.nav-link:focus-visible {
  background-color: rgba(197, 140, 109, 0.1);
  border-radius: 0.5rem;
}

/* --- Earth Tone Theme (Global) --- */
body {
  font-family: "Noto Sans TC", "Microsoft JhengHei UI", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--brand-bg);
  color: var(--text-color);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.bg-light {
  background-color: #E8D5C4 !important;
  /* Lighter Sand for sections */
}

.text-muted {
  color: var(--text-muted) !important;
}

.card {
  border-color: #D8D8CC;
  /* Very Light Sage border */
}

.section-title {
  font-weight: 700;
  margin-bottom: 2.5rem;
  position: relative;
  text-align: center;
  color: var(--text-color);
  letter-spacing: 0.05em;
}

.navbar {
  background-color: rgba(250, 246, 241, 0.95);
  /* Lighter Off-White #FAF6F1 */
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1020;
  transition: all 0.3s ease;
}

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

.navbar-brand:hover {
  color: var(--brand-primary) !important;
}

.logo-img {
  height: 48px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-img {
  transform: rotate(-5deg);
}

.nav-link {
  font-weight: 500;
  color: var(--brand-secondary);
  padding: 0.75rem 1rem !important;
  /* Larger touch target */
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-primary);
}

.dropdown-menu {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  /* Larger touch target */
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: rgba(197, 140, 109, 0.1);
  color: var(--brand-primary);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--brand-primary);
  color: #fff;
}

/* --- Hero Section --- */
.hero {
  background: url('../img/hero/banner-1.jpg') center/cover no-repeat;
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: #fff;
  position: relative;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

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

.btn {
  border-radius: 50px;
  /* Pill shape for all buttons */
  padding: 0.6rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

.promo-badge {
  background-color: var(--brand-accent);
  color: #000;
}

/* --- Page Hero (Inner Pages) --- */
.page-hero {
  position: relative;
  padding: 3rem 0;
  background: linear-gradient(135deg, #f7f1e7 0%, #f3fbfc 45%, #fff6e6 100%);
  border-bottom: 1px solid #dee2e6;
  overflow: hidden;
}

.page-hero::after,
.page-hero::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.page-hero::after {
  width: 220px;
  height: 220px;
  top: -70px;
  right: -60px;
  background: rgba(45, 127, 145, 0.18);
}

.page-hero::before {
  width: 160px;
  height: 160px;
  bottom: -60px;
  left: -40px;
  background: rgba(212, 106, 58, 0.15);
}

.page-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(45, 127, 145, 0.12);
  color: #2d7f91;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.page-hero-badge:hover {
  background: rgba(45, 127, 145, 0.2);
  transform: translateY(-1px);
}

/* --- Hero Carousel --- */
.carousel-caption {
  bottom: 10%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent) !important;
  padding: 3rem 1.5rem !important;
  left: 0;
  right: 0;
  width: 100%;
  border-radius: 0 !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 3rem;
  height: 3rem;
}

/* --- Hover Effects --- */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover) !important;
}

/* --- General Content --- */
.section-title:after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: var(--brand-primary);
  margin: 1rem auto 0;
  border-radius: 10px;
  opacity: 0.8;
}

.card {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-md);
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  /* Ensure images don't overflow rounded corners */
}

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

.card-img-top {
  /* border-top-left-radius: var(--border-radius); */
  /* border-top-right-radius: var(--border-radius); */
  /* Remove manual radius as overflow:hidden on card handles it */
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-top {
  transform: scale(1.03);
  /* Subtle zoom effect */
}

/* Card description text - darker for better contrast */
.card .card-text.text-muted,
.card figcaption.text-muted,
.card .card-body.text-muted {
  color: var(--card-text-muted) !important;
}

.notice-box,
.p-4.border.rounded {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: none !important;
}

/* --- Earth Tone Cards -> Azure Cards --- */
.card-earth {
  border: 1px solid #D8D8CC;
  background-color: #fff;
}

.card-earth .card-header {
  background-color: #E8D5C4;
  /* Lighter Sand */
  color: #3d3d35;
  /* Dark Olive */
  border-bottom: 1px solid #D8D8CC;
  font-weight: 600;
}

.card-earth-accent {
  border: 1px solid #D8D8CC;
}

.card-earth-accent .card-header {
  background-color: #6B705C;
  /* Olive Green */
  color: #fff;
  border-bottom: 1px solid #B7B7A4;
  font-weight: 600;
}

/* --- Footer --- */
.footer {
  background-color: #6B705C;
  /* Olive Green */
  color: #ffffff;
  /* Pure white text */
  padding: 4rem 0;
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer a {
  color: #ffffff;
  /* Pure white links */
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  color: var(--brand-accent);
  border-bottom-color: var(--brand-accent);
  text-decoration: none;
}

.footer .text-white-50,
.footer .text-white-50 a {
  color: rgba(255, 255, 255, 0.8) !important;
  /* Brighter secondary text */
}

.footer h5 {
  color: #ffffff;
  font-weight: 600;
}

/* --- Specific Page Styles --- */
/* About Page */
#owner-heading,
#media-heading,
#fans-heading {
  text-align: center;
}

#owner-heading:after,
#media-heading:after,
#fans-heading:after {
  margin-left: auto;
  margin-right: auto;
}

/* 修正卡片圖片在手機版的圓角與高度 */
aside .sticky-top {
  padding: 1rem;
  background-color: #fff;
  border-radius: var(--border-radius);
  border: 1px solid #e9ecef;
}

aside h4 {
  color: var(--brand-primary);
}

/* Booking Page Accordion */
.accordion-button:not(.collapsed) {
  color: #fff;
  background-color: var(--brand-primary);
}

/* Share Buttons (already good, minor tweaks) */
.share-inline {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.share-btn {
  border-radius: 50px;
  /* pill shape */
  font-weight: 500;
  padding: .5rem 1rem;
}

.share-btn.fb:hover {
  background-color: #1877f2;
  color: #fff;
}

.share-btn.line:hover {
  background-color: #06C755;
  color: #fff;
}

.share-btn.copy:hover {
  background-color: #6B705C;
  color: #fff;
}

/* Room Gallery */
dialog.room-gallery-dialog {
  border-radius: var(--border-radius);
  max-width: 90vw;
  max-height: 90vh;
  padding: 1.5rem;
  border: none;
  box-shadow: var(--shadow-hover);
}

.gallery-inner {
  max-width: 100%;
}

/* Gallery Image - 確保圖片完整顯示 */
#galleryImage {
  max-width: 100%;
  max-height: 65vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* PC 端圖片瀏覽優化 */
@media (min-width: 768px) {
  dialog.room-gallery-dialog {
    max-width: 900px;
    max-height: 85vh;
  }

  #galleryImage {
    max-height: 55vh;
    max-width: 800px;
  }

  .gallery-inner {
    max-width: 850px;
    margin: 0 auto;
  }
}

.gallery-thumbs {
  display: flex;
  gap: 0.75rem;
  /* Larger gap */
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

.gallery-thumbs button {
  padding: 0;
  border: 3px solid transparent;
  /* Prepare for active state */
  border-radius: 0.5rem;
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  opacity: 0.7;
}

.gallery-thumbs button img {
  display: block;
  width: 80px;
  height: 60px;
  object-fit: cover;
}

.gallery-thumbs button:hover {
  border-color: rgba(197, 140, 109, 0.5);
  opacity: 1;
  transform: scale(1.05);
}

.gallery-thumbs button.active {
  border-color: var(--brand-primary);
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(197, 140, 109, 0.2);
}

/* Island Page Tabs */
#islandTabs {
  border-bottom: 2px solid var(--plan-line);
  gap: 8px;
}

#islandTabs .nav-item {
  margin-bottom: -2px;
}

#islandTabs .nav-link {
  border: 2px solid transparent;
  border-radius: 10px 10px 0 0;
  color: var(--text-muted);
  font-weight: 500;
  padding: 12px 20px;
  transition: all 0.3s ease;
  background-color: rgba(0, 0, 0, 0.02);
}

#islandTabs .nav-link:hover:not(.active) {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: transparent;
  color: var(--brand-primary);
}

#islandTabs .nav-link.active {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(197, 140, 109, 0.3);
}

#islandTabs .nav-link i {
  transition: transform 0.3s ease;
}

#islandTabs .nav-link.active i {
  transform: scale(1.1);
}

/* Rooms Pricing Table */
.price-card {
  border-radius: 1.5rem;
  /* Extra rounded */
  border: none;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.price-card-header {
  position: relative;
  background: linear-gradient(135deg, #E8D5C4 0%, #FAF6F1 100%);
  color: #3d3d35;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.price-card-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 55%);
  opacity: 0.7;
}

.price-card-header>* {
  position: relative;
  z-index: 1;
}

.price-table-wrap {
  background: #fbf8f2;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.price-table {
  border-collapse: separate;
  border-spacing: 0;
  --price-table-base: #FAF6F1;
  --price-head-bg: #E8D5C4;
  --price-room-bg: #FAF6F1;
  --price-weekday-bg: #FAF6F1;
  --price-weekend-bg: #FAF6F1;
  background-color: var(--price-table-base);
}

.price-table th,
.price-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  vertical-align: middle;
}

.price-table thead tr:first-child th {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.price-table thead th {
  background-color: var(--price-head-bg);
}

.price-table thead tr:last-child th:first-child {
  background-color: var(--price-room-bg);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.price-table thead tr:last-child th:nth-child(2) {
  background-color: var(--price-weekday-bg);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.price-table thead tr:last-child th:nth-child(3) {
  background-color: var(--price-weekend-bg);
}

.price-table tbody tr:last-child td {
  border-bottom: none;
}

.price-table tbody td:first-child {
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.price-table tbody td:nth-child(2) {
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.price-table tbody td {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.price-table tbody td:first-child {
  background-color: var(--price-room-bg);
}

.price-table tbody td:nth-child(2) {
  background-color: var(--price-weekday-bg);
  color: var(--brand-secondary);
}

.price-table tbody td:nth-child(3) {
  background-color: var(--price-weekend-bg);
  color: var(--brand-primary);
}

.price-note {
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  background-color: var(--price-head-bg);
}

.price-note p {
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 響應式調整：減少手機版動畫 */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
  }

  .hero-content {
    padding: 0 1rem;
  }

  /* Navbar 手機版優化 */
  .navbar {
    padding: 0.5rem 0;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .navbar-brand span {
    font-size: 0.95rem;
  }

  .logo-img {
    height: 36px;
  }

  /* Header 手機版 */
  header.py-5 {
    padding: 2rem 0 !important;
  }

  header h1 {
    font-size: 1.5rem !important;
  }

  header .lead {
    font-size: 0.95rem !important;
  }

  /* Room Gallery Dialog 手機版優化 */
  dialog.room-gallery-dialog {
    max-width: 95vw;
    max-height: 95vh;
    padding: 1rem;
  }

  .gallery-inner {
    padding: 0;
  }

  #galleryImage {
    max-height: 50vh;
    object-fit: contain;
  }

  .gallery-thumbs {
    gap: 0.25rem;
    margin-top: 0.5rem;
  }

  .gallery-thumbs button img {
    width: 60px;
    height: 45px;
  }

  .room-gallery-dialog .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
  }

  /* Room Cards 手機版優化 */
  .room-card {
    padding: 1rem !important;
  }

  .room-card h3 {
    font-size: 1.1rem !important;
  }

  .room-gallery-hint {
    font-size: 0.8rem !important;
  }

  /* 價格表手機版優化 */
  .price-card-header h3 {
    font-size: 1.5rem;
  }

  .price-card-header p {
    font-size: 1.1rem;
  }

  .price-table th,
  .price-table td {
    padding: 0.7rem 0.5rem;
  }

  .price-table tbody td.fs-4 {
    font-size: 1.2rem !important;
  }

  /* 分享按鈕手機版 */
  .share-inline {
    text-align: center;
  }

  .share-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
  }

  /* 卡片標題手機版 */
  .section-title {
    font-size: 1.5rem;
  }

  .card-header h3 {
    font-size: 0.95rem !important;
  }

  /* 動畫優化：手機版減少動畫時間 */
  #islandTabsContent .card {
    animation-duration: 0.4s;
  }

  #islandTabsContent .col:nth-child(n) .card {
    animation-delay: 0.05s;
  }
}

@media (max-width: 576px) {

  /* 超小螢幕額外優化 */
  .navbar-brand {
    font-size: 0.9rem;
  }

  .navbar-brand span {
    font-size: 0.85rem;
  }

  .logo-img {
    height: 32px;
  }

  header h1 {
    font-size: 1.3rem !important;
  }

  .gallery-thumbs button img {
    width: 50px;
    height: 38px;
  }

  .d-grid .btn-lg {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  /* 設備卡片手機版 */
  .card-body ul li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem !important;
  }
}

/* --- 回到頂部按鈕 --- */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  z-index: 1050;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: var(--brand-primary);
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--brand-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 56px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
}

/* --- 手機版固定 CTA --- */
.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  display: none;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  padding: 6px 12px;
  gap: 8px;
}

@media (max-width: 768px) {
  .mobile-cta-bar {
    display: flex;
  }

  /* 為 footer 加底部間距避免遮擋 */
  .footer {
    padding-bottom: 56px !important;
  }
}

.mobile-cta-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.mobile-cta-btn.cta-phone:hover {
  background-color: var(--brand-primary-hover);
}

.mobile-cta-btn.cta-line {
  background-color: #06C755;
  color: #fff;
}

.mobile-cta-btn.cta-line:hover {
  background-color: #05a948;
}
html { scroll-behavior: smooth; }

html { scroll-behavior: smooth; }

