/* 導入 Bootstrap - 已通過 CDN 載入，移除 @import */
/* @import 'bootstrap/dist/css/bootstrap.css'; */

/* 重置 Bootstrap 輪播圖的預設樣式 */
.carousel {
    position: relative !important;
}

/* 強制重置所有 Bootstrap 輪播圖相關樣式 */
.carousel-inner {
    position: relative !important;
    width: 100% !important;
    overflow: hidden !important;
}

.carousel-control-prev,
.carousel-control-next {
    z-index: 10 !important;
}

.carousel-indicators {
    z-index: 10 !important;
}

/* 自定義主題變數 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #4c63d2;
    --text-dark: #2d3436;
    --bg-light: #f8f9fa;
    
    /* Bootstrap 變數覆寫 */
    --bs-primary: #667eea;
    --bs-secondary: #764ba2;
    --bs-success: #27ae60;
}

body {
    font-family: 'Arial', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* 統一頁面頂部間距 - 配合新導覽列高度 */
.page-section {
    padding-top: 150px !important;
}

/* 導航列樣式 */
.navbar {
    background: rgba(102, 126, 234, 0.95) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 1.2rem 0;
    transition: all 0.3s ease;
    z-index: 9999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-height: 120px !important;
}

.navbar.fixed-top {
    background: rgba(102, 126, 234, 0.95) !important;
    backdrop-filter: blur(15px);
    z-index: 9999 !important;
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    margin-right: 3rem;
}

/* Logo 圖片樣式 - 等比例清晰顯示 */
.navbar-logo {
    height: 80px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

/* Logo 響應式設計 - 等比例版本 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 0;
        min-height: 100px !important;
    }
    .navbar-brand {
        margin-right: 2rem;
    }
    .navbar-logo {
        height: 60px;
        max-width: 150px;
    }
    .nav-link {
        font-size: 1rem;
        margin: 0 8px;
        padding: 0.6rem 1rem !important;
    }
    .page-section {
        padding-top: 130px !important;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.8rem 0;
        min-height: 80px !important;
    }
    .navbar-brand {
        margin-right: 1rem;
    }
    .navbar-logo {
        height: 45px;
        max-width: 120px;
    }
    .nav-link {
        font-size: 0.9rem;
        margin: 0 6px;
        padding: 0.5rem 0.8rem !important;
    }
    .page-section {
        padding-top: 110px !important;
    }
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 1.1rem;
    margin: 0 12px;
    padding: 0.75rem 1.25rem !important;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* 輪播圖區塊 */
.hero-carousel {
    height: 70vh !important;
    position: relative !important;
    margin-top: 120px !important; /* 配合120px導覽列高度 */
    overflow: hidden !important;
    z-index: 1 !important; /* 確保在導航列下方 */
}

/* 只對首頁主要輪播應用深藍色背景 */
.hero-illustration .carousel-item,
#heroCarousel .carousel-item,
.hero-carousel .carousel-item {
    height: 70vh !important;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    top: 0 !important; /* 強制重置位置 */
    left: 0 !important; /* 強制重置位置 */
}

/* 企劃主辦區塊的輪播項目保持透明背景 */
#organizerCarousel .carousel-item {
    background: transparent !important;
    height: auto !important;
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
}

/* 輪播圖內容樣式 - 已移除，改為圖片輪播 */

/* 輪播圖圖片樣式 */
.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.carousel-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 2rem 1rem 1rem;
    text-align: center;
}

.carousel-overlay h2 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* 滑鼠懸停效果 */
.carousel-link:hover .carousel-img {
    transform: scale(1.05);
}

.carousel-link:hover .carousel-overlay {
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.carousel-content h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.carousel-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    line-height: 1.4;
}

.btn-hero {
    background: var(--secondary-color);
    color: var(--text-dark);
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    color: var(--text-dark);
}

/* 區塊共用樣式 */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.8rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* 最新消息區塊 */
.news-section {
    background: var(--bg-light);
}

.news-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    border-left: 5px solid var(--primary-color);
    height: 100%;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.news-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.news-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.news-content {
    color: #666;
    line-height: 1.7;
}

/* 活動資訊區塊 */
.event-section {
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(76,99,210,0.1));
}

.event-info {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.event-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.event-title {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.event-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.detail-item {
    text-align: center;
    padding: 1rem;
}

.detail-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.detail-value {
    color: #666;
}

/* 認識小埃區塊 */
.about-section {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    text-align: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

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

.about-text {
    padding: 2rem;
}

.about-text h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}

.youtube-embed {
    margin-top: 2rem;
    text-align: center;
}

.youtube-embed iframe {
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* 原有卡片樣式保留 */
.birthday-card {
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.birthday-card:hover {
    transform: translateY(-5px);
}

/* 頁尾樣式 - 簡約設計 */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 2rem 0; /* 增加高度讓 footer 更明顯 */
}

/* Logo 區塊 - 簡約設計 */
.footer-logo-section {
    text-align: center;
    margin-bottom: 2rem; /* 給 logo 更多空間 */
}

.footer-logo {
    height: 120px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    transition: all 0.3s ease;
    /* 移除調亮效果，保持原始 logo 外觀 */
    margin: 0 auto;
    display: block;
}

.footer-logo:hover {
    transform: scale(1.05);
    /* 移除調亮效果，只保留縮放 */
}

/* 區塊標題統一樣式 - 簡約設計 */
.footer-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    letter-spacing: 0.5px;
}

/* 導覽區域 - 簡約緊湊 */
.footer-nav-section {
    margin-bottom: 0; /* 移除底部間距 */
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem; /* 減少間隙 */
    margin: 0;
    max-width: 240px; /* 更緊湊的寬度 */
    margin: 0 auto;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    padding: 0.4rem 0.6rem;
    text-align: center;
    font-size: 0.9rem;
    position: relative;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.footer-links a:hover::after {
    width: 100%;
}

/* 社群媒體區塊 - 簡約緊湊設計 */
.footer-social-section,
.footer-join-section {
    margin-bottom: 0; /* 移除底部間距 */
}

.social-links {
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.8rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.social-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px) scale(1.1);
}

/* 社群平台專屬顏色 */
.social-link.youtube:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.social-link.twitter:hover,
.social-link.twitter-join:hover {
    background: rgba(0, 0, 0, 0.3);
    color: #000000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
    color: white;
    box-shadow: 0 5px 15px rgba(225, 48, 108, 0.4);
}

.social-link.twitch:hover {
    background: rgba(145, 70, 255, 0.2);
    color: #9146ff;
    box-shadow: 0 5px 15px rgba(145, 70, 255, 0.3);
}

.social-link.discord:hover {
    background: rgba(88, 101, 242, 0.2);
    color: #5865f2;
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.3);
}

.social-link i {
    font-size: 1.4rem;
}

/* 分隔線和版權 */
.footer-divider {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 1rem 0 0.5rem 0; /* 減少間距 */
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem; /* 縮小字體 */
}

/* 新佈局的額外樣式 */
.footer-main-content {
    align-items: start;
}

.footer-logo-section {
    text-align: left; /* logo 左對齊 */
    margin-bottom: 0;
}

/* 右側功能區域間隙控制 */
.footer-main-content .col-auto {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Footer 響應式設計 - 簡約版本 */
@media (max-width: 992px) {
    .footer {
        padding: 2.5rem 0 1.5rem 0;
    }
    
    .footer-logo-section {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .footer-logo {
        height: 100px;
        max-width: 260px;
    }
    
    .footer-logo-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-section-title {
        margin-bottom: 0.8rem;
        font-size: 1rem;
    }
    
    .footer-links {
        max-width: 260px;
        gap: 0.4rem;
    }
    
    .footer-links a {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }
    
    .social-links {
        max-width: 140px;
        gap: 0.5rem;
    }
    
    .social-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 1.2rem 0;
    }
    
    .footer-main-content .col-auto {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .footer-logo {
        height: 90px;
        max-width: 220px;
    }
    
    .footer-logo-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-section-title {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .footer-nav-section,
    .footer-social-section,
    .footer-join-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-links {
        max-width: 100%;
        gap: 0.4rem;
    }
    
    .footer-links a {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .social-links {
        max-width: 200px;
        gap: 0.5rem;
    }
    
    .social-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .footer {
        padding: 2rem 0 1.2rem 0;
    }
    
    /* 小螢幕時改為垂直排列 */
    .footer-main-content .justify-content-end {
        justify-content: center !important;
    }
    
    .footer-main-content .col-auto {
        margin-bottom: 1rem;
    }
    
    .footer-logo {
        height: 80px;
        max-width: 200px;
    }
    
    .footer-logo-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-section-title {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }
    
    .footer-nav-section,
    .footer-social-section,
    .footer-join-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 0.4rem;
        max-width: 100%;
    }
    
    .footer-links a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .social-links {
        max-width: 100%;
        gap: 0.5rem;
    }
    
    .social-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .carousel-content {
        padding: 1.5rem;
        max-width: 90%;
    }
    
    .carousel-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        line-height: 1.1;
    }

    .carousel-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        line-height: 1.3;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .event-details {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 50px 0;
    }
    
    .hero-carousel {
        height: 60vh !important;
        margin-top: 80px !important; /* 手機版配合80px導覽列高度 */
    }
    
    .hero-illustration .carousel-item,
    #heroCarousel .carousel-item,
    .hero-carousel .carousel-item {
        height: 60vh;
    }
}

/* 強制解決重疊問題的終極方案 */
body {
    padding-top: 0 !important;
}

#home {
    margin-top: 0 !important; /* 移除強制上邊距，讓首頁大圖緊貼導覽列 */
    position: relative !important;
    z-index: 1 !important;
}

/* 確保導航列完全覆蓋 */
.navbar {
    min-height: 80px !important;
}

/* 強制輪播圖內容不重疊 */
.carousel-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 如果還有問題，使用這個強制方案 */
@media (max-width: 768px) {
    #home {
        margin-top: 0 !important; /* 手機版也移除上邊距 */
    }
}