.error {
  color: red;
}

.card-img-top {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
  padding-top: 3px;
  padding-left: 3px;
  padding-right: 3px;
  border-top-left-radius: 30px !important;
  border-top-right-radius: 30px !important;
}

.keyword-search {
  background: #fff !important;
  border: 2px solid #db5f79 !important;
  color: #db5f79 !important;
  height: 40px !important;
  border-radius: 15px !important;
}

.keyword-search::placeholder {
  color: #db5f79 !important;
  opacity: 1;
}

/* Logo styling */
.site-logo {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.marquee-announcement {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.header-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0px 10px;
}

.logo-title-container {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
  width: 100%;
  max-width: 1200px;
}

.logo-container {
  flex: 0 0 auto;
  margin-right: 5px;
  min-width: 150px;
}

.title-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.marquee-title {
  color: #a62642;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 5px;
  text-align: left;
}

.marquee-subtitle {
  color: #a62642;
  font-size: 1.2rem;
  text-align: left;
  display: flex;
  align-items: center;
  height: 100%;
}

.marquee-container {
  display: flex;
  align-items: center;
  border-radius: 5px;
  width: 100%;
  margin-top: -10px;
}

.logo-container {
  flex: 0 0 auto;
  margin-left: 15px;
}

.marquee-logo {
  max-width: 150px;
  height: auto;
}

.announcement-container {
  flex: 1;
  display: flex;
  align-items: center;
}

/* Larger screens can have fixed dimensions if desired */
@media (min-width: 768px) {
  .card-img-top {
    height: 300px;
  }
}

@media (min-width: 992px) {
  .card-img-top {
    height: 400px;
  }
}

.col {
  perspective: 1000px;
}

.card {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 30px !important;
}

.card:hover:not(.flipped) {
  transform: translateY(-5px);
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-img-top,
.card-body,
.card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-body {
  padding: 3px !important;
}

.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  transform: rotateY(180deg);
  padding: 0;
  border-radius: 0.375rem;
  overflow: hidden;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.card-list {
  overflow-y: auto;
  max-height: 300px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  text-align: left;
}

.back-image-placeholder {
  height: 200px;
  background-color: #f8f9fa;
  background-image: linear-gradient(
    45deg,
    #e9ecef 25%,
    transparent 25%,
    transparent 50%,
    #e9ecef 50%,
    #e9ecef 75%,
    transparent 75%,
    transparent
  );
  background-size: 20px 20px;
}

.header-main {
  position: relative;
  width: 100vw;
  height: 500px;
  background: url("/images/bg/header.png") center center repeat;
  background-size: auto;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.header-img {
  display: none;
}

.header-img {
  display: none;
}

.header-text {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 2;
}

.content {
  background: url("./images/bg/bg_main.jpg") center center no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

.card-condition {
  width: 100%;
  margin: 20px;
}

.card-col {
  min-height: auto;
}

.card-item {
  margin: 20px;
  width: 400px;
  height: 700px;
  transform-style: preserve-3d;
  transition: 0.5s all ease;
  box-shadow: 0px 0px 10px rgba(10, 10, 0.8);
}

.card-front {
  width: 400px;
  height: 500px;
  position: absolute;
  backface-visibility: hidden;
}

.card-front img {
  width: 280px;
  height: 350px;
}

.card-do {
  transform: rotateY(179deg);
}

.cardimg img {
  display: block;
  margin: 5px auto;
}

.cardimg button {
  display: block;
  margin: 0px auto;
}

.right-side {
  position: fixed;
  right: 10px;
  z-index: 3;
}

.right-side img {
  width: 100px;
  z-index: 3;
}

.btn-condition {
  color: #7fb5d7;
  border-color: #7fb5d7;
}

.btn-detail {
  background: url("/images/bg/btn_detail.png");
  height: 51px;
  width: 195px;
}

.card-title {
  font-size: 26px;
  font-weight: bold;
  line-height: 35px;
  width: 100%;
  background-color: #db5f79;
  border-radius: 5px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  color: #fff;
  min-height: 35px;
}

.card-list {
  font-size: 22px;
  line-height: 39px;
  overflow-y: auto;
  height: 200px;

  display: block;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar;
}

.info {
  font-size: 20px;
  line-height: 39px;
}

.cbody {
  height: 276px;
}

.c-footer {
  height: 76px;
}

.condition-label {
  font-size: 20px;
}

.area-btn-title {
  font-size: 20px;
  font-weight: bold;
  color: #db5f79;
  text-align: center;
}

.area-btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 20px; /* 行間距、列間距 */
  margin-bottom: 1rem;
}

.area-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px !important;
  margin: 0;
  width: 250px;
  height: 50px;
  font-size: 16px;
  font-weight: bold;
  transition: box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #db5f79;
  color: #db5f79;
  text-align: center;
  text-decoration: none;
}

.area-btn.active,
.area-btn:active,
.area-btn:focus,
input[type="radio"].btn-check:checked + .area-btn {
  background: #db5f79;
  color: #fff;
  border-color: #db5f79;
}

@media (min-width: 576px) {
  .area-btn {
    flex: 1 0 18%; /* 一行約5個，根據容器寬度自動調整 */
    max-width: 19%;
  }
}

@media (max-width: 575.98px) {
  .area-btn {
    flex: 1 0 40%;
    max-width: 48%;
    font-size: 1rem;
    padding: 0.4rem 0.7rem;
  }

  .area-btn-group {
    gap: 10px 8px;
  }
}

/* 水平捲動容器 */
.scroll-container {
  overflow-x: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding: 0.5rem 0;
}

.scroll-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.area-cards {
  gap: 1rem;
  padding: 0.5rem 1rem;
}

.card-scroll-item {
  flex: 0 0 auto;
  width: 260px;
  padding: 3px;
  transition: transform 0.3s;
}

/* 水平滾動設定 - 強制所有裝置可滾動 */
.scroll-container {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.scroll-container:active {
  cursor: grabbing;
}

/* 確保卡片水平排列 */
.area-cards {
  display: flex;
  flex-wrap: nowrap !important;
}

body {
  font-family: "DFHeiStd-W7", "繁黑體", "Microsoft JhengHei", "PingFang TC",
    "Heiti TC", "Apple LiGothic Medium", "sans-serif";
  background: 
    url('/images/bg/bg.png') repeat,
    linear-gradient(to bottom, #dab1d5, #f27581, #c7c7e2, #ebd6d6);
  background-size: auto, 100%;
  background-repeat: repeat, no-repeat;
  background-attachment: scroll, fixed;
  background-color: #ebd6d6;
}

@media (min-width: 992px) {
  .card-scroll-item {
    width: calc(25% - 1rem); /* 一行顯示4個卡片，扣除間距 */
  }

  .area-cards {
    flex-wrap: nowrap; /* 不換行，保持水平排列 */
  }

  .scroll-container {
    overflow-x: auto; /* 允許水平捲動 */
  }
}

@media (max-width: 991.98px) {
  .scroll-arrow {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .header-main {
    height: auto;
    background: none !important;
  }

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

  .header-main {
    height: auto;
    background: none !important;
  }

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

  .card-scroll-item {
    width: 200px;
  }

  .card-title {
    font-size: 18px;
  }

  .header-main {
    position: relative;
    background: url(/images/bg/header.png) top center no-repeat;
    background-size: 100% auto;
    height: auto;
    min-height: 300px;
    width: 100vw;
  }

  .area-btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 0; /* 行距10px，列距0 */
  }

  .area-btn {
    height: 45px;
    font-size: 14px;
    flex: 0 0 33%;
    max-width: 33%;
    margin-right: 1px;
    justify-content: center;
  }
}

@media (min-width: 576px) {
  .card-col {
    min-height: 600px;
  }
}

@media (min-width: 768px) {
  .card-col {
    min-height: 700px;
  }
}

@media (max-width: 767px) {
  .header-container {
    padding: 0px 5px;
  }
  .logo-title-container {
    width: 100%;
    flex-direction: row; /* Keep horizontal layout */
    align-items: flex-start;
  }
  .logo-container {
    margin-right: 10px;
    min-width: 100px; /* Smaller minimum width on mobile */
  }
  .title-container {
    flex: 1;
    padding-top: 0;
  }
  .marquee-title {
    font-size: 1.5rem;
    text-align: left;
    margin-bottom: 2px;
  }
  .marquee-logo {
    max-width: 100px; /* Smaller logo on mobile */
  }
  .marquee-subtitle {
    font-size: 0.7rem;
    text-align: left;
    margin-top: 2px;
    margin-bottom: 2px;
  }
  .marquee-container {
    width: 100%;
    margin-top: 5px;
    font-size: 1.3rem;
  }

  body {
    background-size: 100% auto;
  }

}


/* Tablet devices */
@media (min-width: 768px) and (max-width: 991px) {
  .header-container {
    padding: 8px;
  }
  .logo-title-container {
    width: 100%;
  }
  .logo-container {
    min-width: 150px;
  }
  .marquee-title {
    font-size: 2.5rem;
  }
  .marquee-subtitle {
    font-size: 1rem;
  }
}

/* 左右捲動箭頭 */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.scroll-left {
  left: 0;
}

.scroll-right {
  right: 0;
}

.card-link {
  text-decoration: none;
}

.card-link:hover {
  text-decoration: none;
}

.bg-guest-count {
  background: #db5f79;
}

.title {
  background: #db5f79;
  color: #fff;
  width: 100%;
  border-radius: 24px;
  padding: 1px 10px;
  box-sizing: border-box;
  display: flex; align-items: center;
}

.title h1 {
  padding-left: 30px;
  padding-top: 5px;
  color: #fff;
}

.card-text {
  color: #db5f79;
}

.card-text-label {
  color: #000;
  font-weight: bold;
}

.btn-outline-secondary {
  color: #db5f79;
  border-color: #db5f79;
}

.btn-outline-secondary:hover {
  color: #fff;
  background: #db5f79;
  border-color: #db5f79;
}

.marquee-announcement {
  overflow: hidden;
  white-space: nowrap;
  border-radius: 8px;
  padding: 1px 0;
  font-size: 2rem;
  font-weight: bold;
  color: #db5f79;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.btn-callme {
  background: #fff;
  font-size: 16px;
  border: 2px solid #db5f79;
  color: #db5f79;
  padding: 5px ;
  margin: 3px 0px;
}

.btn-callme:hover {
  background: #db5f79;
  border: 1px solid #fff;
  color: #fff;
}

.btn-right {
  margin-left: auto;
}