/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Basic Setup */
html,
body {
    height: 100%;
    scroll-behavior: smooth;
}

/* ==================== 基本區塊樣式 ==================== */

/* Section Styling (Mobile First) */
.section-bg {
    width: 100%;
    height: 100vh; /* Default height for mobile (full viewport) */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section-bg > picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Ensure it's behind content */
}

.section-bg > picture > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom; /* Maintain bottom alignment */
}

/* Section 1 Content Styling (Mobile First) */
.logo-container {
    width: 80%;
    margin-top: 70%;
    /* No specific margin-left/right needed with justify-content-between */
}

.bird-container {
    width: 30%;
    margin-top: 30%;
    margin-right: 10%;
    /* No specific margin-left/right needed with justify-content-between */
}

.slogan-container {
    width: 35%;
    margin-top: 15%;
    margin-left: 5%; /* Keep specific placement */
    align-self: flex-start; /* Keep alignment */
}

/* section 4 mobile 樣式 */ 
#section4 .text-container { 
    width: 80%;
    margin-top: 150px;    
}

/* section 5 mobile 樣式 */
#section5 .text-container {
    width: 90%;
    margin-top: 50px;    
}

/* section 6 mobile 樣式 */
#section6 {
    overflow: visible;
}

#section6 .house-image-container {    
    position: absolute;
    bottom: -20%;
    right: 0;
    z-index: 100;
    width: 33.33%;
}

#section6 .house-image-container img {
    width: 100%;
    height: auto;
}

/* section7 樣式，確保不會蓋住房子圖片 */
#section7 {
    overflow: visible;
}

/* 添加頂部間距，避免導航欄遮擋內容 */
section:target {
    scroll-margin-top: 90px;
}

/* ==================== 導航列樣式 ==================== */

/* 桌面版導航列樣式 */
.navbar {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 6px 0;
    transition: all 0.3s ease;
    height: 75px;
}

.navbar .navbar-brand {
    padding: 0;
}

.navbar .logo-nav {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.navbar .navbar-brand:hover .logo-nav {
    filter: drop-shadow(0 3px 6px rgba(212, 175, 55, 0.3));
}

.navbar .nav-link {
    position: relative;
    transition: transform 0.3s ease;
    opacity: 0.92;
    padding: 0;
    margin: 0 8px;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #d4af37, #b8860b);
    transform: translateX(-50%);
    transition: width 0.3s ease;
    opacity: 0;
}

.navbar .nav-link:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.navbar .nav-link:hover::after {
    width: 65%;
    opacity: 1;
}

.navbar .icon-nav {
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
}

.navbar .nav-link:hover .icon-nav {
    filter: drop-shadow(0 3px 5px rgba(212, 175, 55, 0.4));
}

/* 當頁面滾動時，使導航欄更緊湊 */
.navbar.scrolled {
    height: 65px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.98);
}

/* ==================== 輪播樣式 ==================== */

/* 輪播淡入淡出效果 */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

.carousel-fade .carousel-item-next:not(.carousel-item-start),
.carousel-fade .carousel-item-prev:not(.carousel-item-end) {
    opacity: 0;
}

.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

/* 控制按鈕樣式 */
.carousel-control-prev,
.carousel-control-next {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    height: 60px;
    width: 20px;
    border-radius: 4px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.85;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.carousel-control-prev {
    left: 15px;
}

.carousel-control-next {
    right: 15px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 0.95;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5));
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 18px;
    height: 18px;
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(200%) contrast(150%) drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
}

/* 手機版按鈕樣式 */
@media (max-width: 767px) {
    .carousel-control-prev,
    .carousel-control-next {
        height: 40px;
        width: 12px;
        border-width: 1px;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 12px;
        height: 12px;
    }
    
    .carousel-control-prev {
        left: 8px;
    }
    
    .carousel-control-next {
        right: 8px;
    }
}

/* ==================== 表單樣式 ==================== */

/* 表單樣式 */
.contact-form {
    backdrop-filter: blur(15px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(252, 248, 240, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        inset 0 -4px 8px rgba(255, 252, 240, 0.4),
        inset 0 2px 4px rgba(255, 250, 235, 0.8);
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 248, 220, 0.15) 0%, rgba(255, 248, 220, 0) 70%);
    transform: rotate(45deg);
    pointer-events: none;
    z-index: 1;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    background: rgba(255, 252, 245, 0.75) !important;
    border: 1px solid rgba(205, 165, 88, 0.15) !important;
    border-radius: 18px !important;
    padding: 15px 25px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.02),
        0 2px 4px rgba(255, 255, 255, 0.5);
    color: #725423 !important;
    font-weight: 500;
}

.contact-form input::placeholder,
.contact-form select::placeholder,
.contact-form textarea::placeholder {
    color: #9c7b45;
    opacity: 0.9;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    transform: translateY(-3px) scale(1.01);
    background: rgba(255, 252, 245, 0.95) !important;
    box-shadow:
        0 8px 20px rgba(205, 165, 88, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
    border-color: rgba(205, 165, 88, 0.3) !important;
    color: #5e421c !important;
}

.form-title {
    background: linear-gradient(135deg, #d4af37 30%, #b8860b 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

/* 按鈕樣式 */
.form-submit-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    padding: 20px 45px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ffffff;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    border: none;
    border-radius: 50px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 20px rgba(184, 134, 11, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        0 0 0 0 rgba(184, 134, 11, 0.5);
    outline: 3px solid rgba(212, 175, 55, 0.1);
    outline-offset: 3px;
}

.form-submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0));
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-submit-button::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    border-radius: 52px;
    z-index: -1;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    filter: blur(5px);
}

.form-submit-button:hover {
    transform: translateY(-3px) scale(1.02);
    color: #ffffff;
    box-shadow: 
        0 15px 30px rgba(184, 134, 11, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        0 0 0 20px rgba(184, 134, 11, 0.1);
    outline-color: rgba(212, 175, 55, 0.2);
    outline-offset: 5px;
}

.form-submit-button:hover::before {
    transform: translateX(100%);
}

.form-submit-button:hover::after {
    opacity: 0.8;
}

.form-submit-button:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 8px 20px rgba(184, 134, 11, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.form-submit-button span {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==================== Footer 樣式 ==================== */

/* Footer 樣式 */
.footer {
    position: relative;
    width: 100%;
    height: 40px;
    background-image: url('../../images/footer/body.webp');
    background-position: center 65%;
    background-size: 100% auto;
    background-repeat: no-repeat;
    overflow: hidden;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(1px);
}

.footer-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 2;
}

.copyright {
    margin: 0;
    font-size: 0.8rem;
    color: #725423;
    letter-spacing: 0.6px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.gold-text {
    color: #b8860b;
    font-weight: 500;
}

/* ==================== 響應式樣式 ==================== */

/* 移動端調整 */
@media (max-width: 767px) {
    section:target {
        scroll-margin-top: 20px;
    }      
}

/* 表單響應式樣式 */
@media (max-width: 768px) {
    .contact-form {
        margin: 15px;
        padding: 30px !important;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .form-submit-button {
        padding: 15px 40px !important;
        min-width: 180px;
        font-size: 1rem;
    }
}


/* Tablet and Desktop Overrides (min-width: 768px, matches Bootstrap 'md' breakpoint) */
@media (min-width: 768px) {
    .section-bg {
        height: 54.17vw;
        /*height: 54.17vw; */
        /* Aspect ratio height for desktop */
    }

    /* ==================== 各區塊桌面版內容位置調整 ==================== */
    
    /* Section 1 - 首頁內容調整 */
    .logo-container {
        width: 21%;
        margin-top: 17%;
        margin-left: 12%; /* Desktop specific margin */
    }

    .bird-container {
        width: 8%;
        margin-top: 4%;
        margin-right: 59%; /* Desktop specific margin to push it left */
    }

    .slogan-container {
        width: 10%;
        margin-top: 3%;
        margin-left: 12%; /* Desktop specific margin */
    }
    
    /* Section 2 - 背景圖+文字圖片+YT影片 調整 */
    #section2 .text-container {
        width: 17%;
        padding-left: 2%;
        position: relative;
        margin-top: 5%;
    }
    
    #section2 .youtube-container {
        padding-right: 2%;
    }
    
    #section2 .ratio {
        max-width: 95%;
        margin-left: auto;
    }
   
    
    /* Section 4 - 生活機能 調整 */
    /* 使用 Bootstrap 的 col-md-3 和 col-md-9 控制左右比例 1:3 */
    #section4 .text-container {
        width: 18%;
        margin-top: -10%;
        padding-left: 2%;
        position: relative;
    }
    
    #section4 .function-image-container {
        padding-left: 5%;
    }
    
    /* 蝴蝶圖片位置微調 */
    #section4 .text-container img.d-none.d-md-block {
        position: absolute;
        top: -20%;
        right: 0%;
        width: 35%;
        z-index: 100;
    }
    
    /* Section 5 - 外觀渲染圖 調整 */
    /* 使用 Bootstrap 的 col-md-9 和 col-md-3 控制左右比例 3:1 */
    #section5 .carousel-container {       
        padding-right: 2%;
    }
    
    #section5 .text-container {
        width: 17%;
        padding-left: 2%;
        position: relative;
    }
    
    /* 輪播圖片尺寸微調 */
    #section5 .carousel {
        max-width: 95%;
        margin-left: auto;
    }
    
    /* Section 6 - 平面配置圖 調整 */
    /* 輪播圖寬度調整 */
    #section6 .carousel-container {
        width: 90%;
        margin: 0 auto;
    }
    
    /* Section 7 - 室內渲染圖 調整 */
    /* 使用 Bootstrap 的 col-md-3 和 col-md-9 控制左右比例 1:3 */
    #section7 .text-container {
        width: 17%;
        padding-left: 2%;
        position: relative;
    }
    
    #section7 .carousel-container {
        padding-right: 2%;
    }
    
    /* 輪播圖片尺寸微調 */
    #section7 .carousel {
        max-width: 95%;
        margin-left: auto;
    }
    
    /* Section 8 - MAP+文字圖片 調整 */
    /* 使用 Bootstrap 的 col-md-9 和 col-md-3 控制左右比例 3:1 */
    #section8 .map-container {
        padding-left: 2%;
    }
    
    #section8 .text-container {
        padding-right: 2%;
    }
    
    /* MAP 容器內邊距微調 */
    #section8 .ratio {
        max-width: 95%;
    }
    
    /* Section 9 - 預約賞屋表單 調整 */
    /* 表單尺寸與位置微調 */
    #section9 .form-container {
        max-width: 550px;
        margin: 0 auto;
    }

    /* 懸浮按鈕 - 僅在桌面版顯示 */
    .floating-container {
        position: fixed;        
        bottom: 20px;
        right: 20px;
        z-index: 9999;
    }
    .floating-container img {
        width: 60px;
    }
    
    /* 頁腳調整 */
    .footer {
        height: 50px;
        background-position: center 40%;
        background-size: 100% auto;
    }
    
    .copyright {
        font-size: 0.85rem;
    }

    /* Section 2 layout is handled by Bootstrap grid, no custom widths/margins needed here */
    /* .text2-container {} */
    /* .youtube-container {} */
}

/* Large Desktop Override (Optional: Adjust breakpoint if needed) */
@media (min-width: 1920px) {
    .section-bg {
        height: 1040px; 
        /*height: 1080px; */
        /* Fixed height for very large screens */
        min-height: 1040px; 
        /* min-height: 1080px;  */
        /* Ensure it doesn't get smaller if viewport is shorter but wide */
    }
}


/*
    基本區塊樣式 - 包含 section 和基本佈局元素
    導航列樣式 - 所有與頂部導航相關的樣式
    輪播樣式 - 所有輪播相關特效和控制按鈕
    表單樣式 - 表單元素和按鈕的樣式定義
    Footer 樣式 - 頁腳相關樣式
    響應式樣式 - 所有媒體查詢集中在一起
*/