/* 學院列表卡片樣式 */
.academy-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.academy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.academy-card a {
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.academy-card-video {
    width: 100%;
    position: relative;
    background: #000;
}

.academy-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.academy-video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.academy-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.academy-card:hover .academy-video-overlay {
    opacity: 1;
}

.academy-video-overlay i {
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.academy-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.academy-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.academy-card-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.academy-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.academy-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 500;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.academy-card:hover .academy-card-link {
    gap: 0.75rem;
}

.academy-card-link i {
    transition: transform 0.3s ease;
}

.academy-card:hover .academy-card-link i {
    transform: translateX(4px);
}

/* 學院詳細頁面樣式 */
.academy-detail-container {
    max-width: 1000px;
    margin: 0 auto;
}

.academy-detail-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.academy-detail-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.academy-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0;
    line-height: 1.3;
}

.academy-detail-description {
    margin-bottom: 2rem;
}

.academy-detail-video-container {
    margin-bottom: 2rem;
}

.academy-detail-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background: #000;
}

.academy-detail-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

.academy-detail-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.academy-detail-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.academy-detail-back-btn:hover {
    background: #e9ecef;
    color: #212529;
    transform: translateX(-4px);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .academy-card-title {
        font-size: 1.1rem;
    }

    .academy-detail-title {
        font-size: 1.75rem;
    }

    .academy-detail-category {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .academy-video-overlay i {
        font-size: 3rem;
    }
}

/* 載入動畫 */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.academy-card-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* 影片容器改進 - 確保正確的寬高比 */
.academy-video-wrapper,
.academy-detail-video-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 改善 iframe 在不同裝置上的顯示 */
@media (max-width: 576px) {
    .academy-detail-actions {
        flex-direction: column;
    }

    .academy-detail-actions .btn {
        width: 100%;
    }
}
