:root{
    --primary: #448899;
    --secondary: #666666;
    --bg: #ffffff;
    --fontfamily: 'Noto Sans TC', 'Noto Sans CJK TC', 'Source Han Sans TC', sans-serif;
    --max: 1200px;
    --shadow: 0 0 20px #AABBCC;
    --selected-cat: #EEEEEE;
}
html, body{
    min-height: 100dvh;
    color: var(--secondary);
    
}
body {
    display: flex;
    flex-direction: column;
}

/* ===== 首頁 -- Hero 區域 ===== */
    /* 背景圖 */
.hero {
    width: 100%;
    height: 320px;
    background-image: url('/static/img/welcome.png');
    background-size: cover;
    background-position: center top;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__content {
    width: 100%;
    max-width: 1200px;
    height: 149px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px;
}

    /* Slogan */
.hero__slogan {
    color: #ffffff;
    margin-bottom: 25px;
    font-weight: 700;
}

.hero__subtitle {
    font-size: 16px;
}

.search-box {
    position: relative;
}

    /* 搜尋框本體 */
.search-box__inner {
    display: flex;
    align-items: center;
    height: 46px;
    background-color: var(--bg);
    border-radius: 5px;
    max-width: 460px;
    box-shadow: var(--shadow);
    z-index: 6;
}

.category-dropdown__trigger {
    flex: none;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fontfamily);
    background-color: var(--selected-cat);
    height: 100%;
    border-radius: 5px 0 0 5px;
    width: 100px;
    font-weight: 500;
}


.search-box__input {
    width: 100%;
    max-width: calc(460px - 100px - 60px);
    height: 100%;
    border: none;
    outline: none;
    padding-inline: 15px;
    padding-top: 2px;
    font-size: 1rem;
    font-weight: bold;
}

.search-box__input::placeholder {
    font-size: 1rem;
    font-weight: bold;
}

.search-box__btn {
    display: flex;
    flex: none;
    justify-content: center;
    align-items: center;
    background-color: var(--primary);
    height: 100%;
    width: 60px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

    /* 類別展開 */
.category-dropdown__container {
    position: absolute;
    top: calc(100% + 5px); /* 位於搜尋框下方 5px */
    left: 0;
    z-index: 3;
    
    /* 動畫屬性：預設為透明、向上偏移、不可見 */
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    pointer-events: none; /* 隱藏時不可點擊 */
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.category-dropdown__container.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.category-dropdown__menu {
    width: 300px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background-color: var(--bg);
    justify-content: center;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

.category-dropdown__item {
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    justify-self: center;
    align-self: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 40px;
    border-radius: 5px;
    transition: ease 0.3s;
}

.category-dropdown__item:hover {
    background-color: var(--selected-cat);
}

/* ===== 首頁 -- 捷運站 List bar 區域 ===== */
.list-bar {
    margin-top: 40px;
    margin-bottom: 20px;
}

.carousel {
    color: var(--secondary);
    width: 100%;
    overflow-x: auto;
    height: 50px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    scroll-behavior: smooth;
    border-left: 10px solid var(--bg);
    border-right: 10px solid var(--bg);
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel__mrt {
    flex: 0 0 auto;
    font-size: 1rem;
    text-align: center;
    align-content: center;
    padding: 5px 15px;
    cursor: pointer;
}

.carousel__mrt:hover {
    color: rgba(0, 0, 0, 1);
}

.carousel__back-btn, .carousel__next-btn {
    cursor: pointer;
    border: none;
    background: url("/static/img/arrow_left.png") center / contain no-repeat;
    width: 32px;
    height: 32px;
}

.carousel__next-btn {
    background: url("/static/img/arrow_right.png") center / contain no-repeat;
}

.carousel__back-btn:hover {
    background-image: url("/static/img/Hovered_left.png");
}

.carousel__next-btn:hover {
    background-image: url("/static/img/Hovered_right.png");
}


/* ===== 首頁 -- attractions 區域 ===== */
.attractions__wrap {
    flex-grow: 1;
}

.attractions {
    width: 100%;
    margin-inline: auto;
    padding: 15px;
    display: grid;
    grid-auto-rows: 242px;
    gap: 30px;
}

@media (min-width:1200px){
    .attractions {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width:601px) and (max-width:1200px) {
    .attractions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:600px) {
    .attractions {
        grid-template-columns: repeat(1, 1fr);
    }
}

.attraction__card {
    display: block;
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid rgba(232, 232, 232, 1);
    overflow: hidden; /*沒設這個下邊框會不見(被子元素蓋掉)*/
    transition: all 0.3s ease;
}

/* 卡片懸停的效果 */
.attraction__card:hover {
    filter: 
        brightness(1.1) 
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transform: translateY(-4px);
}

.attraction__card__content {
    position: relative;
    height: 197px;
}

.attraction__card__pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attraction__card__name {
    position: absolute; bottom: 0; left: 0; right: 0;
    background:rgba(0, 0, 0, 0.6);
    height: 40px;
    color: var(--bg);
    font-size: 1rem;
    font-weight: 700;
    align-content: center;
    padding: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.attraction__card__detail {
    height: 45px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--secondary);
    background-color: var(--bg);
}

.attraction__no-result {
    flex-grow: 1;
    display: none;
}

.attraction__no-result.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/*! ======== 景點分頁 (attraction.html) ======== */
/* ======== 上半區域 ======== */
.attraction-page__top,
.attraction-page__bot {
    width: 100%;
}

.attraction-page__top-layout {
    padding-top: 40px;
    margin-inline: auto;
    width: min(var(--max), 100%);
    display: flex;
    /* gap: 20px; */
    justify-content: center;
    /* align-items: center; */
}

/* 照片轉盤 */
.attraction-page__carousel {
    height: clamp(350px, 55vw, 400px);
    width: min(540px, 100%);
    margin: 0 15px;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
}

.attraction-page__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: 200ms opacity ease-in-out;
    transition-delay: 200ms;
}

.attraction-page__slide[data-active]{
    opacity: 1;
    z-index: 1;
    transition-delay: 0ms;
}

.attraction-page__slide__photo{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.attraction-page__carousel-btn__prev,
.attraction-page__carousel-btn__next {
    cursor: pointer;
    border: none;
    background: url("/static/img/btn_leftArrow.png") center / contain no-repeat;
    width: 36px;
    height: 36px;
    position: absolute;
    z-index: 10;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.attraction-page__carousel-btn__prev {
    left: 10px;
}

.attraction-page__carousel-btn__next {
    background: url("/static/img/btn_rightArrow.png") center / contain no-repeat;
    right: 10px;
}

.attraction-page__carousel-btn__prev:hover, 
.attraction-page__carousel-btn__next:hover,
.attraction-page__carousel-btn__prev:focus,
.attraction-page__carousel-btn__next:focus {
    opacity: 0.7;
}

/* 照片轉盤進度指示器 */
.attraction-page__carousel__indicators {
    position: absolute; bottom: 0; left: 0; right: 0;
    z-index: 2;
    height: 5px;
    display: flex;
    gap: 0;
    opacity: 0.75;
}

.attraction-page__carousel__indicators button {
    flex: 1;
    height: 100%;
    border: none;
    background-color: rgba(255, 255, 255, 1);
    cursor: pointer;
    padding: 0;
    transition: all 0.5s ease;
    transform-origin: center;
}

.attraction-page__carousel__indicators button:hover {
    background-color: rgba(100, 100, 100, 0.7);
    transform: scale(1.15);;
}

.attraction-page__carousel__indicators button[aria-selected="true"] {
    background-color: rgba(0, 0, 0, 1);
}

/* ====== 預訂資訊 ====== */
.attraction-page__profile {
    flex-grow: 1;
    margin: 0 15px;
}

.attraction-page__name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.attraction-page__info{
    font-weight: 400;
    margin-bottom: 20px;
}

/* 預定表單 */
.attraction-page__booking-form{
    background-color: rgba(232, 232, 232, 1);
    border-radius: 5px;
    padding: 15px 20px;
    width: min(600px, 100%);
    height: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.attraction-page__booking-form > p {
    font-weight: 400;
}

.attraction-page__booking-date {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.attraction-page__selete {
    font-weight: 700;
    vertical-align: middle;
    flex-shrink: 0;
}

#select-date {
    flex:1 ;
    max-width: 193px;
    height: 35px;
    border: none;
    padding: 5px 10px;
}

.attraction-page__booking-time {
    display: flex;
    align-items: center;
    gap: 5px;
}


.attraction-page__booking-fee__total,
.attraction-page__booking-time label {
    font-weight: 400;
    
}

div.attraction-page__booking-time label {
    width: 87px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.attraction-page__booking-time input[type="radio"] {
    outline: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background-color: var(--bg);
    cursor: pointer;
    margin: 2px 4px 2px 2px;
    vertical-align: middle;
}

.attraction-page__booking-time input[type="radio"]:checked {
    background-color: rgba(68, 136, 153, 1);
}

.attraction-page__book-btn {
    margin-top: 10px;
    width: 154px;
    line-height: 16px;
    color: var(--bg);
    font-size: 19px;
    font-weight: 400;
    padding: 10px 20px;
    background-color: var(--primary);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.attraction-page__book-btn:hover {
    filter: brightness(0.9);
}

/* ======== 分割線 ======== */
.separator {
    margin: 40px auto;
    height: 1px;
    background-color: rgba(232, 232, 232, 1);
    width: min(1200px, calc(100vw - 20px));
}

/* ======== 下半區域 ======== */
.attraction-page__bot {
    display: flex;
    justify-content: center;
}

.attraction-page__bot-layout {
    margin-inline: 10px;
    padding: 10px;
    width: min(var(--max), 100%);
    justify-content: center;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 20px;    
}

.attraction-page__bot p {
    font-weight: 400;
}

.attraction-page__detail h4 {
    font-weight: 700;
    line-height: 2rem;
}


/* attraction page 的 RWD */
@media (max-width:800px) {
    .attraction-page__top-layout {
        flex-direction: column;
        align-items: center;
    }

    .attraction-page__profile {
        margin-inline: auto;
        width: min(calc(100% - 20px), 540px);
        display: flex;
        flex-direction: column;
    }

    .attraction-page__booking-form {
        align-self: center;
    }

    .attraction-page__name,
    .attraction-page__info {
        margin-left: 10px;
    }
}

@media (max-width:414px) {
    .attraction-page__top-layout {
        padding-top: 0;
    }

    .attraction-page__carousel {
        border-radius: 0px;
    }

    .attraction-page__booking-form {
        width: 100%;
    }
}

/* ===== Footer 區域 ===== */
.footer__copy-right{
    margin-top: 40px;
    text-align: center;
    align-content: center;
    background-color: var(--secondary);
    color: var(--bg);
    height: 104px;
}
