/* NYCU AR App Project Page Styles - Dark Theme */
body {
    background: #0a192f;
    background-attachment: fixed;
    color: #e6f1ff;
}

/* 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: 60px 0 40px;
    text-align: center;
    background-color: rgba(10, 25, 47, 0.7);
}

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

.title-underline {
    background-color: #4169e1;
}

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

/* Project Content */
.project-content {
    display: flex;
    gap: 50px;
    align-items: center;
    padding-bottom: 100px;
}

.project-image-showcase {
    flex: 1;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    background-color: transparent;
}

.main-project-image {
    width: 85%; /* 縮小主圖片尺寸 */
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    transform: scale(1.1); /* 稍微縮小縮放比例 */
    transform-origin: center;
    border-radius: 10px;
    margin: 0 auto; /* 居中顯示 */
}

.gradient-to-dark {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px; /* 增加高度使過渡更平滑 */
    background-image: linear-gradient(to bottom, 
        rgba(10, 25, 47, 0) 0%, 
        rgba(10, 25, 47, 0.3) 20%, 
        rgba(10, 25, 47, 0.6) 40%, 
        rgba(10, 25, 47, 0.8) 60%, 
        rgba(10, 25, 47, 0.9) 80%, 
        rgba(10, 25, 47, 1) 100%);
}

/* Project Overview */
.project-overview {
    padding: 50px 0 100px;
    position: relative;
}

/* Course info block style */
.course-info {
    margin-top: 40px;
    padding: 25px;
    border-radius: 12px;
    position: relative;
    z-index: 2;
}

/* Glassmorphism for dark theme */
.glassmorphism {
    background: rgba(16, 32, 61, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(65, 105, 225, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

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

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

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

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

.app-store-button {
    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;
}

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

.app-store-button i {
    font-size: 16px;
}

.project-description-block {
    flex: 1;
}
.project-description-block strong{
    color: #ffffff;
    font-weight: 400;
}

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

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

.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: #a8b2d1;
    margin: 0;
}
.gradient-section {
    height: 300px;
    width: 100%;
    position: relative;
    z-index: 1;
}
/* 從深色到淺色的漸層 */
.dark-to-light {
    background: linear-gradient(to bottom, #0a192f 0%, #ffffff 100%);
}

/* Side Navigation */
.side-nav {
    position: fixed;
    right: -200px; /* 改為右側 */
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    background: transparent; /* 去掉底色 */
    z-index: 99;
    transition: right 0.5s ease; /* 改為right過渡 */
    display: none;
}

.side-nav.visible {
    right: 0; /* 改為從右側滑入 */
}

.side-nav-content {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: right; /* 文字右對齊 */
}

.side-nav-item {
    color: #a8b2d1; /* 保留原有文字顏色 */
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.side-nav-item:hover {
    background: transparent; /* 去掉hover底色 */
    color: #2a4492; /* 保留懸停時文字顏色 */
}

.side-nav-item.active {
    background: transparent; /* 去掉active底色 */
    color: #4169e1; /* 活動項目使用主題藍色 */
    font-weight: 500;
    margin-right: 10px;
}

/* Project Details Styles */
.project-details {
    background: #ffffff;
    padding: 80px 0;
}

.detail-section {
    margin-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h2 {
    font-size: 32px;
    font-weight: 600;
    color: #0a192f; /* 深色標題 */
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    width: 100%;
}
.detail-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #4169e1;
}
.detail-section h3 {
    font-size: 20px;
    font-weight: 500;
    color: #4169e1;
    margin-bottom: 15px;
    width: 100%;
}

.detail-section p {
    font-size: 16px;
    line-height: 1.8;
    color: #333; /* 深灰色文字 */
    margin-bottom: 20px;
    max-width: 700px;
}

/* Challenge Section with image */
.challenge-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 25px;
    position: relative;
}

.challenge-text {
    flex: 1.5;
    max-width: 65%;
}

.challenge-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 35%;
    height: 100%;
    position: absolute;
    right: -35%;
    top: 0;
    bottom: 0;
    background-color: transparent;
}

.challenge-img {
    width: auto;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.3s ease;
}

/* Ensure challenge points maintain proper styling */
.challenge-content .challenge-points {
    list-style-type: none;
    padding-left: 0;
    margin-top: 20px;
}

.challenge-content .challenge-points li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.challenge-content .challenge-points li::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #4169e1;
}

.users-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 25px;
    justify-content: space-between; /* Add this to improve distribution */
}

.users-text {
    flex: 1.2; /* Slightly reduced from 1.3 */
    max-width: 60%; /* Add a max-width to ensure text doesn't push image too far */
}

.users-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 320px; /* Ensure image has minimum width */
}

.users-text h3 {
    margin-top: 0;
}

.users-text h3:not(:first-child) {
    margin-top: 30px;
}

.users-text strong {
    color: #0a192f;
    font-weight: 600;
}

.persona-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.circular-image-container {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border: 4px solid rgba(65, 105, 225, 0.3);
    transition: all 0.3s ease;
}

.circular-image-container:hover {
    transform: scale(1.03);
    border-color: #4169e1;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

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

.persona-tag {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #0a192f;
    background: rgba(230, 235, 245, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(65, 105, 225, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Persona Modal/Popup */
.persona-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.persona-modal.active {
    opacity: 1;
    visibility: visible;
}

.persona-modal-content {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.4s ease;
}

.persona-modal.active .persona-modal-content {
    transform: scale(1);
    opacity: 1;
}

.close-persona-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* Research Process Styles */
.research-content {
    margin-bottom: 40px;
}

.research-section {
    margin-bottom: 30px;
    max-width: 700px;
}

.research-section h4 {
    font-size: 20px;
    font-weight: 600;
    color: #0a192f;
    margin-bottom: 15px;
}

.research-section strong {
    color: #0a192f;
    font-weight: 600;
}

.research-points {
    list-style-type: none;
    padding-left: 0;
    margin-top: 15px;
    max-width: 700px;
}

.research-points li {
    position: relative;
    padding-left: 50px; /* Increased for larger circle */
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    display: flex;
    align-items: center; /* Ensure vertical alignment */
    min-height: 36px; /* Ensure minimum height for alignment */
}

.research-points li::before {
    content: '\f119'; /* fa-face-frown icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%); /* Center vertically */
    color: #FF7843;
    font-size: 22px;
    background-color: rgba(255, 120, 67, 0.1); /* Light orange background */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    margin: 60px 0 20px;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.horizontal-timeline {
    display: block;
}

.vertical-timeline {
    display: none;
}

.timeline {
    display: flex;
    position: relative;
    z-index: 2;
}

.horizontal-timeline .timeline {
    justify-content: space-between;
}

.timeline-line {
    position: absolute;
    z-index: 1;
    background: linear-gradient(to right, #4169e1, #bd43ff);
}

.horizontal-timeline .timeline-line {
    top: 30px;
    left: 0;
    width: 0%;
    height: 4px;
    transition: width 1.5s ease;
}

.timeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.horizontal-timeline .timeline-node {
    align-items: center;
}

.timeline-node.active {
    opacity: 1;
}

.timeline-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #e8eeff;
    color: #4169e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 2px solid #4169e1;
    position: relative;
    z-index: 3;
}

.timeline-label {
    margin-top: 15px;
    text-align: center;
}

.timeline-label span {
    font-size: 16px;
    font-weight: 500;
    color: #0a192f;
}

/* Findings Section Styles */
.findings-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.finding-item {
    background-color: rgba(230, 235, 245, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(65, 105, 225, 0.2);
    border-radius: 12px;
    padding: 25px;
    height: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.finding-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(65, 105, 225, 0.3);
}

.finding-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(65, 105, 225, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.finding-icon i {
    color: #4169e1;
    font-size: 20px;
}

.finding-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: #0a192f;
    margin: 0 0 20px 0;
}

.findings-points {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.findings-points li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: #333;
    font-size: 15px;
    line-height: 1.5;
}

.findings-points li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #4169e1;
}

.findings-conclusion {
    margin-top: 35px;
    width: 100%;
    padding: 28px 35px;
    background-color: rgba(230, 235, 245, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(65, 105, 225, 0.15);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.findings-conclusion p {
    font-size: 18px;
    line-height: 1.7;
    color: #333;
    margin: 0;
    max-width: none; /* Override any max-width */
}

.findings-conclusion strong {
    color: #0a192f;
    font-weight: 600;
    display: inline-block;
    margin-right: 8px;
}
/* Design Prototypes Section */
.design-prototypes {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.prototype-item {
    border-radius: 16px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prototype-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.prototype-item h3 {
    font-size: 24px;
    font-weight: 600;
    color: #4169e1;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(65, 105, 225, 0.2);
}

.prototype-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.prototype-content:last-child {
    margin-bottom: 0;
}

.environment-search-second {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed rgba(65, 105, 225, 0.2);
}

.prototype-text {
    flex: 0.6; /* 60% width */
}

.prototype-image {
    flex: 0.4; /* 40% width */
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.prototype-text h4 {
    font-size: 18px;
    font-weight: 600;
    color: #0a192f;
    margin-bottom: 15px;
    margin-top: 0;
}

.prototype-text h4:not(:first-child) {
    margin-top: 25px;
}

.prototype-features {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.prototype-features li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}

.prototype-features li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #4169e1;
}

.image-gallery {
    display: flex;
    gap: 20px;
    width: 100%;
}

.image-popup {
    display: block;
    cursor: pointer;
}

.prototype-img {
    max-width: 100%;
    height: auto;
    max-height: 410px;
    border-radius: 12px;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.prototype-img:hover {
    transform: scale(1.02);
}
.image-gallery {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center; /* 確保圖片水平置中 */
}
/* Image popup overlay */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.image-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* 確保卡片容器不受70%寬度限制 */
/* 確保卡片容器不受70%寬度限制並水平置中 */
.adopted-features-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    margin-bottom: 50px;
    left: 0;
    right: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
}

/* 調整卡片排列 */
.adopted-features {
    display: flex;
    gap: 30px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 40px auto;
    padding: 0;
}

.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 25px;
    text-align: center;
    width: 220px;
    transition: all 0.3s ease;
    border: 1px solid rgba(65, 105, 225, 0.1);
    display: block;
    text-decoration: none;
    color: inherit;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(65, 105, 225, 0.3);
}

.feature-link {
    color: #4169e1;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.feature-link:hover {
    color: #FF7843;
    text-decoration: underline;
}

/* Impact Section Styles */
.impact-content {
    margin: 30px 0;
}

.impact-content p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 800px;
}

.impact-content strong {
    color: #4169e1;
    font-weight: 600;
}

.adopted-features {
    display: flex;
    gap: 30px;
    margin: 40px 0;
    justify-content: center;
}

.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 25px;
    text-align: center;
    width: 220px;
    transition: all 0.3s ease;
    border: 1px solid rgba(65, 105, 225, 0.1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(65, 105, 225, 0.3);
}

.feature-icon {
    font-size: 32px;
    color: #4169e1;
    margin-bottom: 15px;
}

.feature-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #0a192f;
    margin-bottom: 12px;
}

.feature-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.feature-status.adopted {
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.feature-status.in-progress {
    background-color: rgba(241, 196, 15, 0.15);
    color: #f39c12;
}

/* Next Project */
/* 相關項目推薦 */
.related-projects {
    padding: 80px 0 60px;
    background: #071528;
    text-align: center;
    position: relative;
    z-index: 2;
}

.related-projects h3 {
    font-size: 24px;
    font-weight: 500;
    background:  #e6f1ff 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 40px;
    transition: color 0.5s ease;
    position: relative;
    z-index: 2;
}

/* 輪播容器 */
.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 */
}

/* 輪播項目 */
@media (min-width: 1025px) {
    .carousel-item {
        flex: 0 0 auto;
        width: 35%;
        scroll-snap-align: center;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        transform: scale(0.85);
        margin: 0 -25px;
        z-index: 1;
        background-color: #f5f8ff; /* 改為淺色背景 */
    }

    .carousel-item.active {
        transform: scale(1.05);
        z-index: 2;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    }

    .carousel-item:hover {
        transform: scale(1.05);
        z-index: 3;
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    }
    
    .carousel-image {
        height: 240px;
    }
    
    /* 調整卡片文字顏色為深色 */
    .carousel-item h4 {
        color: #0a192f; /* 深色文字 */
    }
    
    .carousel-item:hover h4 {
        color: #4169e1; /* 懸停時的文字顏色 */
    }
}

/* 輪播圖片 */
.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.2);
    transition: all 0.3s ease;
    transform: scale(0.85);
    margin: 0 -20px;
    z-index: 1;
}

.carousel-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.carousel-item h4 {
    font-size: 16px;
    font-weight: 500;
    padding: 15px;
    margin: 0;
    color: #0a192f;
    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: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: #4169e1;
    width: 20px;
    border-radius: 5px;
}

/* Footer */
.footer {
    background: linear-gradient(to bottom, #071528, #050d18);
    padding: 40px 0;
    color: #a8b2d1;
}

.footer-content {
    text-align: center;
}

.footer-info {
    max-width: 600px;
    margin: 0 auto;
}

.motto {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 15px;
    color: #e6f1ff;
}

.thank-you {
    font-size: 16px;
    color: #e6f1ff;
}

/* Scroll to top button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4169e1;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.scroll-top-btn:hover {
    background-color: #FF7843;
    transform: translateY(-5px);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .side-nav {
        display: none !important;
    }
    .detail-section p, 
    .detail-section .challenge-points,
    .detail-section .research-points,
    .research-section {
        max-width: 100%; /* Use full width on smaller screens */
    }
    .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.2);
        transition: box-shadow 0.3s ease;
        background-color: #f5f8ff;
    }
    
    .carousel-item:hover {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }
    
    .carousel-item h4 {
        color: #0a192f; /* 深色文字 */
    }
    
    /* 隱藏指示器 */
    .carousel-indicators {
        display: none;
    }
    
    /* 調整輪播容器樣式 */
    .project-carousel {
        justify-content: space-between;
        gap: 10px;
        padding: 20px 0;
    }
    
    .project-content {
        flex-direction: column;
    }
    
    .project-image-showcase, .project-description-block {
        flex: auto;
        width: 100%;
    }
    .main-project-image{
        width: 60%;
        margin-bottom: 60px;
    }
    
    .project-main-title {
        font-size: 36px;
    }
    .challenge-content {
        flex-direction: column;
        gap: 30px;
        align-items: flex-start;
        align-items: center;
    }
    
    .challenge-text {
        max-width: 100%;
        width: 100%;
    }
    
    .challenge-image {
        position: relative;
        max-width: 100%;
        width: 60%;
        height: auto;
        margin-top: 30px;
        right: 0;
        left: 0;
    }
    
    .challenge-img {
        width: auto;
        height: auto;
        max-width: 70%;
        align-items: center;
    }
    .users-content {
        flex-direction: column-reverse;
        gap: 30px;
        align-items: center;
    }
    
    .users-text {
        max-width: 100%;
        width: 100%;
    }
    
    .users-image {
        min-width: auto;
    }
    
    .circular-image-container {
        width: 240px;
        height: 240px;
    }
    .findings-content {
        grid-template-columns: repeat(2, 1fr);
    }
    .prototype-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .prototype-text, .prototype-image {
        flex: 1;
        width: 100%;
    }
    
    .image-gallery {
        display: flex;
        flex-direction: row; /* 保持水平排列 */
        justify-content: center; /* 置中對齊 */
        gap: 10px; /* 縮小間距 */
    }
    
    .image-gallery .image-popup {
        flex: 1;
        max-width: calc(50% - 5px); /* 確保兩張圖並排且有間距 */
        display: flex;
        justify-content: center;
    }
    
    .image-gallery img {
        max-width: 100%;
        max-height: 340px; /* 控制圖片高度 */
    }
    
    .prototype-image {
        display: flex;
        justify-content: center;
        align-items: center;
    }

}
@media (max-width: 1024px) and (min-width: 480px) {
    /* Target the first carousel item (Mai.today) */
    .project-carousel .carousel-item:first-child .carousel-image img {
      object-position: top center;
    }
    
    /* Keep the other images centered */
    .project-carousel .carousel-item:not(:first-child) .carousel-image img {
      object-position: center;
    }
  }
@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;
    }
    
    .course-content {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .course-text {
        text-align: center;
        justify-content: center;
    }
    
    .app-store-button {
        margin-left: 0;
    }
    .challenge-image {
        max-width: 100%;
        width: 50%;
    }
    .challenge-img {
        max-width: 85%;
    }
    .circular-image-container {
        width: 200px;
        height: 200px;
    }
    
    .persona-tag {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .horizontal-timeline {
        display: none;
    }
    .findings-content {
        grid-template-columns: 1fr;
    }
    
    .finding-icon {
        width: 40px;
        height: 40px;
    }
    
    .finding-icon i {
        font-size: 18px;
    }
    
    .finding-item h4 {
        font-size: 16px;
    }
    
    .findings-points li {
        font-size: 14px;
    }
    
    .findings-conclusion p {
        font-size: 15px;
    }
    .image-gallery {
        display: flex;
    }
    
    .image-gallery .image-popup {
        max-width: 100%;
    }
    .prototype-img{
        max-height: 350px;
    }
    .image-gallery img {
        margin-bottom: 15px;
        max-height: 350px;
    }
    .adopted-features {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .feature-card {
        width: 85%;
        max-width: 300px;
    }
    
    .impact-content p {
        font-size: 15px;
    }
    .related-projects {
        position: relative;
    }
    
    .related-projects h3 {
        position: relative;
        z-index: 2;
    }
    
    .related-projects::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100px;
        z-index: 1;
    }
    .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;
    }
    .main-project-image{
        width: 80%;
        margin-bottom: 60px;
    }
    .course-info {
        padding: 20px 15px;
    }
    
    .course-text {
        font-size: 13px;
    }
    
    .app-store-button {
        padding: 8px 16px;
        font-size: 13px;
    }
    .detail-section{
        margin-bottom: 40px;
    }
    .detail-section h2 {
        font-size: 24px;
    }
    .detail-section h3{
        font-size: 16px;
    }
    .detail-section p{
        font-size: 12px;
    }
    .detail-section li{
        font-size: 12px;
    }
    .challenge-img {
        display: none;
    }
    .finding-item {
        padding: 15px;
    }
    
    .finding-icon {
        width: 36px;
        height: 36px;
    }
    
    .finding-icon i {
        font-size: 16px;
    }
    
    .finding-item h4 {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .findings-points li {
        font-size: 12px;
        padding-left: 18px;
        margin-bottom: 8px;
    }
    
    .findings-points li::before {
        left: 5px;
        top: 7px;
        width: 5px;
        height: 5px;
    }
    
    .findings-conclusion {
        padding: 15px;
    }
    
    .findings-conclusion p {
        font-size: 13px;
    }

    .prototype-item {
        padding: 15px;
    }
    
    .prototype-item h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .prototype-text h4 {
        font-size: 14px;
    }
    
    .prototype-features li {
        font-size: 12px;
        padding-left: 20px;
    }
    .prototype-img{
        max-height: 200px;
    }
    .image-gallery img {
        margin-bottom: 15px;
        max-height: 200px;
    }
    .circular-image-container {
        width: 160px;
        height: 160px;
    }
    
    .persona-tag {
        font-size: 12px;
        padding: 6px 14px;
    }
    .carousel-item {
        width: 85%;
        margin: 0 auto;
    }
    .feature-card {
        padding: 20px 15px;
    }
    
    .feature-icon {
        font-size: 28px;
    }
    
    .feature-card h4 {
        font-size: 16px;
    }
    
    .feature-status {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .impact-content p {
        font-size: 14px;
    }
}