/* 1. 變數和基本設置 */
:root {
    --primary-color: #2c3e50;      /* 深灰藍色 - 主要背景 */
    --secondary-color: #34495e;     /* 稍淺灰藍色 - 次要背景 */
    --accent-color: #3498db;        /* 科技藍 - 強調色 */
    --gold-accent: #f39c12;         /* 暖金色 - 次要強調色 */
    --text-color: #ecf0f1;          /* 淺灰白色 - 主要文字 */
    --text-secondary: #bdc3c7;      /* 中灰色 - 次要文字 */
    --white: #ffffff;
    --black: rgba(0, 0, 0, 0.75);
    /* PEAK */
    --p-red: #e74c3c; /* 更柔和的紅色 */
    --e-green: #279e9c;
    --a-blue: #3383bd;
    --k-orange: #eb8022;
}

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400; /* 設定字重，例如 400（Regular） */
    font-size: 1rem; /* 設定字體大小，例如 16px */;
    overflow-x: hidden;
    padding-top: 75px; /* 為固定導航欄留出空間 */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans TC', sans-serif;
}

p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0.5rem 0;
}

small {
    font-size: 0.8rem;
    font-weight: 200;
    font-style: italic;
    color: var(--white);
    line-height: 1.5;
    margin: 0.5rem 0;
}

img {
    margin: 0 0;
}

li {
    line-height: 1.8;
}

.p-red {
    color: var(--p-red);
}

.e-green {
    color: var(--e-green);
}

.a-blue {
    color: var(--a-blue);
}

.k-orange {
    color: var(--k-orange);
}

/* 2. 導航欄樣式 */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 1rem;
    max-height: 70px;
}

.navbar-brand {
    padding: 0.25rem 0;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-light .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-light .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.9);
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 3. 主要內容區域 */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.2;
}

/* 定義半透明底色的類別 */
.transparent-bg {
    position: fixed;
    top: 0;
    left: 0;
    display: block;
    background-color: #2c3e50d2;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(135deg, rgba(44, 62, 80, 0.5) 0%, rgba(52, 73, 94, 0.3) 100%); */
    z-index: 1;
}

.hero-section > .text-center {
    position: relative;
    z-index: 2;
}

.hero-section .lead {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.3s;
    animation-fill-mode: both;
}

.hero-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 0;
}

@media (min-width: 992px) {
    .hero-cards-container {
        flex-wrap: nowrap;
    }
}

/* 卡片樣式 */
.card {
    /* width: 280px; */
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 20;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid rgba(52, 152, 219, 0.3); /* 添加科技感邊框 */
    --bs-card-bg: transparent!important;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.3);
    border: 1px solid rgba(52, 152, 219, 0.7);
}

.card-p {
    background-image: url('../assets/cover_p03.jpg');
    /* background-color: rgba(44, 62, 80, 0.3); */
    background-blend-mode: multiply;
}

.card-e {
    background-image: url('../assets/cover_e03.jpg');
    /* background-color: rgba(44, 62, 80, 0.3); */
    background-blend-mode: multiply;
}

.card-a {
    background-image: url('../assets/cover_a03.jpg');
    /* background-color: rgba(44, 62, 80, 0.3); */
    background-blend-mode: multiply;
}

.card-k {
    background-image: url('../assets/cover_k03.jpg');
    /* background-color: rgba(44, 62, 80, 0.3); */
    background-blend-mode: multiply;
}

.card-title {
    font-size: 72px;
    margin-bottom: 0px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-subtitle {
    font-size: 16px;
    margin-top: 0px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.card-content {
    margin-top: auto;
}

.card-stats {
    font-size: 18px;
    font-weight: bold;
    margin-top: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

.card-stats-label {
    font-size: 12px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    display: block;
}

.number {
    display: inline-block;
    font-size: 28px;
    font-weight: 700;
    margin-right: 4px;
    color: #fff;
}

.unit {
    font-size: 10px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 內容區塊 */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--gold-accent);
}

.content-section {
    padding: 100px 0;
    position: relative;
    background-color: var(--secondary-color);
    margin: 50px 0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), var(--gold-accent));
}

.content-section h1 {
    color: var(--accent-color);
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-section h2 {
    color: var(--accent-color);
    font-size: 2.2rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.content-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.img-fluid {
    border-radius: 10px;
    /* box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); */
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.img-fluid:hover {
    /* transform: translateY(-10px) !important; */
    transform: scale(1.05) !important;
    transition: 0.3s ease !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* PEAK 部分 */
.peak-section {
    text-align: center;
    padding: 80px 0;
}

.peak-section h1 {
    color: var(--gold-accent);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.peak-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.peak-icon:hover {
    transform: scale(1.2);
}

/* 頁腳 */
footer {
    background-color: var(--secondary-color);
    padding: 20px 0;
    margin-top: 50px;
}

footer p {
    font-size: 0.8rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--accent-color);
    margin: 0 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* 4. 動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.slide-in-up {
    animation: slideInUp 0.8s ease forwards;
    opacity: 0;
}

/* 卡片動畫延遲 */
.card-p.slide-in-up {
    animation-delay: 0.1s;
}

.card-e.slide-in-up {
    animation-delay: 0.3s;
}

.card-a.slide-in-up {
    animation-delay: 0.5s;
}

.card-k.slide-in-up {
    animation-delay: 0.7s;
}

/* 5. 響應式設計 */
@media (min-width: 992px) {
    body {
        padding-top: 75px;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: white;
        padding: 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        max-height: 80vh;
        overflow-y: auto;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 1000;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .navbar-nav .nav-link:after {
        display: none;
    }
    
    .navbar-nav .nav-link.active {
        background-color: rgba(13, 110, 253, 0.1);
        color: #0d6efd;
        border-radius: 0.25rem;
    }
    
    .navbar-nav .nav-item {
        margin: 5px 0;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .navbar-toggler {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        padding: 0;
    }
    
    .navbar .container {
        position: relative;
        padding-right: 50px;
    }
    
    .hero-section {
        padding-top: 0px;
    }

    .hero-section h1 {
        font-size: 8rem;
    }
    
    .hero-section .lead {
        font-size: 1.2rem;
    }
    
    .content-section {
        padding: 60px 0;
    }
    
    .card {
        width: 100%;
        /* max-width: 320px; */
        height: auto;
        min-height: 500px;
    }
    
    .hero-cards-container {
        padding: 10px;
        margin-top: 0px;
    }

    footer p {
        font-size: 0.5rem;
    }
}

.project-content {
    margin-top: 2rem;
}
  
.project-item h4 {
    color: #0066cc;
    margin-bottom: 0.5rem;
}
  
.sustainability-list {
    padding-left: 1.5rem;
}
  
.sustainability-list li {
    margin-bottom: 0.5rem;
}

.about-content {
    margin-top: 2rem;
}

.about-section h4 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.values-list, .achievements-list {
    padding-left: 1.5rem;
}

.values-list li, .achievements-list li {
    margin-bottom: 0.5rem;
}

.peak-framework {
    margin: 2rem 0;
}

.peak-item {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--gold-accent);
}

.peak-item h4 {
    color: var(--accent-color);
}

@keyframes arrow-move {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
  100% {
    transform: translateX(0);
  }
}

.btn-outline-light .bi-arrow-right {
  display: inline-block;
  transition: transform 0.3s ease;
  animation: arrow-move 1.5s infinite;
}

.btn-outline-light:hover .bi-arrow-right {
  animation: arrow-move 0.8s infinite;
}

.btn-outline-light {
    border-color: var(--accent-color);
    color: var(--text-color);
    background: rgba(52, 152, 219, 0.1);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.data-area-bg {
    background-color: rgba(100, 255, 218, 0.1);
}

.gradient-text {
    background: linear-gradient(45deg, #007bff 20%, #00ffb3 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.peak-gif {
    margin: 0rem 0rem!important;
    box-shadow: none!important;
    width: 530px!important;
}

.peak-gif:hover {
    transform: none!important;
}

.img-100w {
    width: 100%;
    height: auto;
    max-width: 100%;
}