/* Mai.today Project Page Styles */
body {
    background: linear-gradient(135deg, #FBFAFF, #FEFAFF, #FAFDFF);
    background-attachment: fixed;
}

/* Fixed Home Icon */
.home-icon {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4169e1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.home-icon:hover {
    background-color: #FF7843;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(65, 105, 225, 0.3);
}

.home-icon.visible {
    opacity: 1;
    visibility: visible;
}

/* Project Header */
.project-header {
    padding: 100px 0 40px; /* 調整上下 padding */
    text-align: center;
}

.project-main-title {
    font-size: 46px;
    font-weight: 600;
    color: #111;
    margin-bottom: 15px;
}

.project-tagline {
    font-size: 20px;
    color: #555;
    max-width: 700px;
    margin: 20px auto 0;
}


.project-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.project-image-showcase {
    flex: 1;
    border-radius: 0; /* 移除圓角 */
    overflow: visible; /* 允許內容溢出 */
    box-shadow: none; /* 移除陰影 */
    background-color: transparent;
}

.main-project-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    transform: scale(1.2);
    transform-origin: center; /* 確保從中心放大 */
}
.gradient-to-white {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background-image: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.7) 50%, 
        rgba(255, 255, 255, 1) 100%);
    z-index: 1;
}

/* 確保 project-overview 有相對定位 */
.project-overview {
    padding: 50px 0 100px; /* 增加底部間距 */
    position: relative; /* 為漸層效果添加相對定位 */
}
/* NDA 信息區塊樣式 */
.nda-info {
    margin-top: 40px;
    padding: 25px;
    border-radius: 12px;
    position: relative;
    z-index: 2;
}

/* 毛玻璃效果 */
.glassmorphism {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.nda-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.nda-text {
    display: flex;
    align-items: center;
    color: #555;
    font-size: 15px;
    gap: 20px;
}

.nda-text i {
    color: #4169e1;
    font-size: 18px;
    flex-shrink: 0;
}

.nda-text p {
    margin: 0;
    padding: 0;
}

.contact-email {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #4169e1;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px;
    flex-shrink: 0;
    margin-left: 20px;
}

.contact-email:hover {
    background-color: #FF7843;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(65, 105, 225, 0.3);
}

.contact-email i {
    font-size: 16px;
}

.project-description-block {
    flex: 1;
}

.project-description-block h2 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.project-description-block p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.meta-item {
    flex: 1;
    min-width: 150px;
}

.meta-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: #4169e1;
    margin-bottom: 10px;
}

.meta-item p {
    font-size: 15px;
    color: #555;
    margin: 0;
}

/* Next Project */
/* 相關項目推薦 */
.related-projects {
    padding: 80px 0 60px;
    background-color: #ffffff;
    text-align: center;
}

.related-projects h3 {
    font-size: 24px;
    font-weight: 500;
    color: #333;
    margin-bottom: 40px;
}

/* 輪播容器 */
.project-carousel-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    padding: 0 20px;
}

/* 輪播項目容器 */
.project-carousel {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 30px 0;
    gap: 0;
    
    /* 隱藏滾動條但保持功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.project-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}


/* 輪播項目 */
/* 輪播項目 */
.carousel-item {
    flex: 0 0 auto;
    width: 28%;
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    transform: scale(0.85);
    margin: 0 -20px;
    z-index: 1;
}

.carousel-item.active {
    transform: scale(1);
    z-index: 2;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.carousel-item:hover {
    transform: scale(1);
    z-index: 3;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 輪播圖片 */
.carousel-image {
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carousel-item:hover .carousel-image img {
    transform: scale(1.05);
}

/* 輪播項目標題 */
.carousel-item {
    flex: 0 0 auto;
    width: 28%;
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    transform: scale(0.85);
    margin: 0 -20px;
    z-index: 1;
    background-color: white; /* 確保背景不透明 */
}

.carousel-item a {
    text-decoration: none; /* 移除文字底線 */
    color: inherit;
    display: block;
}
.carousel-item h4 {
    font-size: 16px;
    font-weight: 500;
    padding: 15px;
    margin: 0;
    color: #333;
    text-align: left;
    transition: color 0.3s ease;
}

.carousel-item:hover h4 {
    color: #4169e1;
}

/* 輪播指示器 */
.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 8px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: #4169e1;
    width: 20px;
    border-radius: 5px;
}
/* 輪播項目 */
@media (min-width: 1025px) {
    .carousel-item {
        flex: 0 0 auto;
        width: 35%; /* 加寬卡片尺寸，從原來的28%增加到35% */
        scroll-snap-align: center;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
        transform: scale(0.85);
        margin: 0 -25px; /* 增加負邊距以維持重疊效果 */
        z-index: 1;
        background-color: white;
    }

    .carousel-item.active {
        transform: scale(1.05); /* 增加活躍卡片的縮放比例 */
        z-index: 2;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    }

    .carousel-item:hover {
        transform: scale(1.05);
        z-index: 3;
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    }
    
    /* 增加輪播圖片高度 */
    .carousel-image {
        height: 240px; /* 從原來的200px增加 */
    }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 auto;
        width: 32%; /* 三個項目並排 */
        margin: 0 5px; /* 正邊距，移除疊加 */
        transform: none !important; /* 移除縮放效果 */
        z-index: 1;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        transition: box-shadow 0.3s ease;
        background-color: white;
    }
    
    .carousel-item:hover {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    /* 隱藏指示器 */
    .carousel-indicators {
        display: none;
    }
    
    /* 調整輪播容器樣式 */
    .project-carousel {
        justify-content: space-between;
        gap: 10px;
        padding: 20px 0;
    }
}

@media (max-width: 768px) {
    .project-header {
        padding: 80px 0 40px;
    }
    
    .project-main-title {
        font-size: 30px;
    }
    
    .project-tagline {
        font-size: 18px;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 20px;
    }
    .nda-content {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .nda-text {
        text-align: center;
        justify-content: center;
    }
    .contact-email {
        margin-left: 0;
    }
    .carousel-item {
        width: 70%; /* 更宽的项目 */
        margin: 0 5px; /* 正边距而非负边距 */
        transform: scale(0.9); /* 稍微缩小初始比例 */
    }
    
    .carousel-item.active {
        transform: scale(1);
    }
    .carousel-indicators {
        display: block;
    }
}

@media (max-width: 480px) {
    .project-header {
        padding: 60px 0 30px;
    }
    
    .project-main-title {
        font-size: 26px;
    }
    
    .project-tagline {
        font-size: 16px;
    }
    .project-overview {
        padding: 40px 0 80px;
    }
    
    .nda-info {
        padding: 20px 15px;
    }
    
    .nda-text {
        font-size: 13px;
    }
    
    .contact-email {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .gradient-to-white {
        height: 120px;
    }
    .carousel-item {
        width: 85%; /* 几乎全宽 */
        margin: 0 auto; /* 居中 */
    }
}