/* ==========================================
   文章明細頁共用樣式
   ========================================== */

/* 明細容器 */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* 麵包屑 */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    color: #6b7280;
}
.breadcrumb-nav a {
    color: #0089A7;
    text-decoration: none;
}
.breadcrumb-nav a:hover {
    text-decoration: underline;
}

/* Detail Layout: 2 columns */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    align-items: start;
}
@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

/* Spec Card (區域1) */
.spec-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.spec-card-header {
    background: linear-gradient(135deg, #003366, #004488);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.spec-card-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}
.spec-table tr:nth-child(even) {
    background: #fbfbfb;
}
.spec-table tr:hover {
    background: #f0f9ff;
}
.spec-label {
    width: 180px;
    padding: 14px 20px;
    font-weight: 700;
    color: #003366;
    background: rgba(0, 137, 167, 0.06);
    vertical-align: top;
    font-size: 0.92rem;
    border-bottom: 1px solid #f0f0f0;
}
.spec-value {
    padding: 14px 20px;
    color: #374151;
    font-size: 0.92rem;
    line-height: 1.6;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-word;
}

/* Content Section (區域2) */
.content-section {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-top: 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.content-section-header {
    background: #f8fafc;
    padding: 14px 24px;
    font-weight: 700;
    color: #003366;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}
.content-section-body {
    padding: 24px;
    color: #374151;
    line-height: 1.8;
    font-size: 0.95rem;
}
.content-section-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Video Embed */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.video-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0089A7;
    font-weight: 600;
    text-decoration: none;
}
.video-link:hover {
    text-decoration: underline;
}

/* Back Button */
.back-btn-wrapper {
    margin-top: 24px;
}
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.2s;
}
.back-btn:hover {
    background: #f3f4f6;
    border-color: #003366;
    color: #003366;
}

/* Sidebar (區域3) */
.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

.info-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-top: 4px solid #F2A900;
}
.info-card-title {
    padding: 16px 20px 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #003366;
}
.info-card-body {
    padding: 0 20px 20px;
}

/* Sidebar Item Types */
.sidebar-item {
    margin-bottom: 12px;
}
.sidebar-item:last-child {
    margin-bottom: 0;
}
.sidebar-item-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 3px;
}
.sidebar-item-value {
    font-size: 0.92rem;
    color: #374151;
    line-height: 1.5;
}
.sidebar-item-textarea {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Sidebar Link */
.sidebar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0089A7;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
}
.sidebar-link:hover {
    text-decoration: underline;
    color: #006d85;
}

/* Sidebar Tags */
.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sidebar-tag {
    display: inline-block;
    padding: 3px 12px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 12px;
}

/* Sidebar Button */
.sidebar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    text-align: center;
}
.sidebar-btn-primary {
    background: #0089A7;
    color: #fff;
}
.sidebar-btn-primary:hover {
    background: #006d85;
}
.sidebar-btn-secondary {
    background: #003366;
    color: #fff;
}
.sidebar-btn-secondary:hover {
    background: #002244;
}
.sidebar-btn-outline {
    background: #fff;
    color: #003366;
    border: 2px solid #003366;
}
.sidebar-btn-outline:hover {
    background: #003366;
    color: #fff;
}

/* Sidebar Download Link */
.sidebar-download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
}
.sidebar-download-link:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0284c7;
}
.sidebar-download-link i {
    font-size: 0.95rem;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 80px 20px;
    color: #888;
}
.error-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #ddd;
}
.error-state h2 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 8px;
}

/* Page Loading */
.page-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 120px 20px;
    color: #003366;
    font-size: 2rem;
}

/* Print Button */
.print-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.print-btn:hover {
    background: rgba(255,255,255,0.3);
}

@media print {
    .sidebar-wrapper,
    .breadcrumb-nav,
    .back-btn-wrapper,
    .print-btn {
        display: none !important;
    }
    .detail-layout {
        grid-template-columns: 1fr;
    }
}
