@charset "utf-8";

/* Detail Page ================================================================ */

/* Loading */
.detail-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}
.detail-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #1e64dc;
    border-radius: 50%;
    animation: detail-spin 0.8s linear infinite;
}
@keyframes detail-spin {
    to { transform: rotate(360deg); }
}

/* Error */
.detail-error {
    text-align: center;
    padding: 120px 20px;
    font-family: 'HanjinGroupSans', sans-serif;
}
.detail-error p {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 24px;
}
.detail-error a {
    color: #1e64dc;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}
.detail-error a:hover {
    opacity: 0.7;
}

/* Page */
.detail-page {
    font-family: 'HanjinGroupSans', sans-serif;
    color: #1a1a1a;
}

/* Hero Image */
.detail-hero {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
}
.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
}
.detail-hero-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 40px;
}
.detail-hero-text h2 {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}
.detail-hero-text p {
    margin-top: 12px;
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    line-height: 1.6;
}

/* Container */
.detail-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 40px 120px;
}

/* Back Navigation */
.detail-back {
    padding: 40px 0 0;
}
.detail-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: -0.01em;
}
.detail-back a:hover {
    color: #1e64dc;
}
.detail-back a svg {
    transition: transform 0.2s;
}
.detail-back a:hover svg {
    transform: translateX(-3px);
}

/* Article Header */
.detail-header {
    padding: 48px 0 40px;
    border-bottom: 1px solid #e5e7eb;
}
.detail-category {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #1e64dc;
    background: #eff6ff;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}
.detail-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    letter-spacing: -0.025em;
    word-break: keep-all;
}
.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    font-size: 14px;
    color: #9ca3af;
}
.detail-meta-divider {
    width: 1px;
    height: 12px;
    background: #d1d5db;
}

/* Article Body */
.detail-body {
    padding: 56px 0 0;
}

/* Content Styling (prose-like) */
.detail-content {
    font-size: 17px;
    line-height: 1.85;
    color: #374151;
    word-break: keep-all;
}
.detail-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 56px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
    letter-spacing: -0.02em;
}
.detail-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 44px 0 16px;
    letter-spacing: -0.01em;
}
.detail-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 36px 0 12px;
}
.detail-content p {
    margin: 0 0 24px;
}
.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 32px 0;
}
.detail-content a {
    color: #1e64dc;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}
.detail-content a:hover {
    opacity: 0.7;
}
.detail-content strong {
    font-weight: 700;
    color: #111827;
}
.detail-content blockquote {
    margin: 32px 0;
    padding: 20px 24px;
    border-left: 4px solid #1e64dc;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    color: #4b5563;
    font-style: italic;
}
.detail-content blockquote p:last-child {
    margin-bottom: 0;
}
.detail-content ul,
.detail-content ol {
    margin: 16px 0 24px;
    padding-left: 24px;
}
.detail-content li {
    margin-bottom: 8px;
}
.detail-content ul li {
    list-style-type: disc;
}
.detail-content ol li {
    list-style-type: decimal;
}
.detail-content pre {
    margin: 28px 0;
    padding: 20px 24px;
    background: #1f2937;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.7;
}
.detail-content code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    color: #dc2626;
}
.detail-content pre code {
    background: none;
    padding: 0;
    color: #e5e7eb;
}
.detail-content hr {
    border: none;
    height: 1px;
    background: #e5e7eb;
    margin: 48px 0;
}
.detail-content iframe {
    max-width: 100%;
    border-radius: 12px;
    margin: 32px 0;
}

/* Attachments */
.detail-attachments {
    margin-top: 64px;
    padding: 28px 32px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
}
.detail-attachments h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 16px;
}
.detail-attachments h3 svg {
    color: #9ca3af;
}
.detail-attachments ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.detail-attachments li {
    border-bottom: 1px solid #f0f0f0;
}
.detail-attachments li:last-child {
    border-bottom: none;
}
.detail-attachments li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    text-decoration: none;
    transition: color 0.2s;
}
.detail-attachments li a:hover {
    color: #1e64dc;
}
.detail-attachments .file-name {
    font-size: 14px;
    color: #374151;
    transition: color 0.2s;
}
.detail-attachments li a:hover .file-name {
    color: #1e64dc;
}
.detail-attachments .file-size {
    font-size: 13px;
    color: #9ca3af;
    flex-shrink: 0;
    margin-left: 16px;
}

/* Bottom Navigation */
.detail-bottom-nav {
    display: flex;
    justify-content: center;
    margin-top: 80px;
}
.detail-list-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    height: 52px;
    padding: 0 36px;
    font-size: 15px;
    font-weight: 600;
    color: #1e64dc;
    background: #fff;
    border: 2px solid #1e64dc;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.25s;
    letter-spacing: 0.01em;
}
.detail-list-btn:hover {
    color: #fff;
    background: #1e64dc;
}
