/* ============================================================
   GouguCMS News Aggregation - Article Detail Styles
   Blue Theme | Modern Minimalist
   ============================================================ */

/* ---------------------------------------------------------
   1. Breadcrumb Navigation
   --------------------------------------------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 13px;
    color: #9e9e9e;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #757575;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #1565c0;
}

.breadcrumb .separator {
    color: #bdbdbd;
    font-size: 12px;
}

.breadcrumb .current {
    color: #424242;
    font-weight: 500;
}

/* ---------------------------------------------------------
   2. Detail Wrapper
   --------------------------------------------------------- */
.detail-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

/* ---------------------------------------------------------
   3. Detail Container (main article card)
   --------------------------------------------------------- */
.detail {
    background: #fff;
    padding: 40px 48px;
    margin: 0 auto 28px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    max-width: 820px;
    width: 100%;
}

/* ---------------------------------------------------------
   4. Detail Header (Title + Meta)
   --------------------------------------------------------- */
.detail-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.4;
    margin: 0 0 20px;
    word-break: break-word;
    letter-spacing: -0.02em;
}

.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #9e9e9e;
}

.detail-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.detail-meta .meta-item i {
    font-size: 15px;
    color: #bdbdbd;
}

.detail-meta .platform-badge {
    font-size: 12px;
}

.detail-meta .meta-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.detail-meta .meta-tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    color: #1565c0;
    background: #e3f2fd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.detail-meta .meta-tag:hover {
    background: #bbdefb;
}

/* Legacy class aliases for existing templates */
.detial-ops {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    line-height: 30px;
    color: #9e9e9e;
    font-size: 13px;
    padding: 12px 0;
}

.detial-ops span {
    margin-right: 0;
}

.detial-ops a {
    margin-right: 8px;
    color: #1565c0;
    font-size: 13px;
}

.detial-ops a:hover {
    color: #0f4c9e;
}

.color-tags {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------
   5. Detail Content (Article Body)
   --------------------------------------------------------- */
.detail-content {
    padding: 24px 0 0;
    color: #1a1a2e;
    word-break: break-word;
    font-size: 16px !important;
    line-height: 1.8 !important;
}

.detail-content p {
    margin: 0 0 18px;
    padding: 0;
    color: #333;
}

.detail-content li,
.detail-content p {
    padding: 4px 0;
    word-break: break-word;
}

/* Images */
.detail-content img {
    max-width: 100% !important;
    height: auto;
    margin: 16px auto;
    display: block;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Video embed */
.detail-content .gougu-video {
    width: 100% !important;
    max-width: 640px !important;
    height: auto !important;
    aspect-ratio: 16/10;
    margin: 20px auto !important;
    border: none;
    border-radius: 8px;
}

/* Headings */
.detail-content h1,
.detail-content h2,
.detail-content h3,
.detail-content h4,
.detail-content h5 {
    margin: 28px 0 14px;
    color: #1a1a2e;
    font-weight: 600;
    line-height: 1.4;
}

.detail-content h1 { font-size: 24px; }
.detail-content h2 {
    font-size: 22px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e3f2fd;
}
.detail-content h3 { font-size: 19px; }
.detail-content h4 { font-size: 17px; }
.detail-content h5 { font-size: 15px; }

/* Links */
.detail-content a {
    color: #1565c0;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.detail-content a:hover {
    color: #0f4c9e;
    border-bottom-color: #0f4c9e;
}

/* Code blocks */
.detail-content p code {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: #f0f7ff;
    color: #1565c0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #e3f2fd;
}

.detail-content pre {
    margin: 20px 0;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: #fafafa;
    padding: 20px 24px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid #e8eef5;
    color: #1a1a2e;
}

.detail-content pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: inherit;
    font-size: inherit;
}

/* Blockquotes */
.detail-content blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f0f7ff;
    border-left: 4px solid #1565c0;
    border-radius: 0 8px 8px 0;
    color: #424242;
    font-size: 15px;
}

.detail-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
.detail-content table {
    border-collapse: collapse;
    border-spacing: 0;
    display: block;
    width: 100%;
    overflow: auto;
    word-break: normal;
    word-break: keep-all;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid #e8eef5;
}

.detail-content table tr {
    background-color: #fff;
    border-top: 1px solid #e8eef5;
}

.detail-content table tr:nth-child(2n) {
    background-color: #f0f7ff;
}

.detail-content table td,
.detail-content table th {
    padding: 10px 16px;
    border: 1px solid #e8eef5;
    font-size: 14px;
}

.detail-content table th {
    font-weight: 600;
    color: #1a1a2e;
    background: #f0f7ff;
}

/* Lists */
.detail-content li {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 6px;
}

.detail-content ol li {
    list-style: decimal;
}

/* Horizontal rule */
.detail-content hr {
    border: none;
    border-top: 1px solid #e8eef5;
    margin: 32px 0;
}

/* Strong, emphasis */
.detail-content strong {
    font-weight: 600;
    color: #1a1a2e;
}

.detail-content em {
    font-style: italic;
    color: #424242;
}

/* ---------------------------------------------------------
   6. Detail Source Info Box
   --------------------------------------------------------- */
.detail-source {
    margin-top: 32px;
    padding: 20px 24px;
    background: #f0f7ff;
    border-radius: 12px;
    border: 1px solid #e3f2fd;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-source .source-label {
    font-size: 13px;
    color: #757575;
    font-weight: 500;
}

.detail-source .platform-badge {
    font-size: 13px;
}

.detail-source .source-link {
    font-size: 13px;
    color: #1565c0;
    word-break: break-all;
}

.detail-source .source-link:hover {
    color: #0f4c9e;
    text-decoration: underline;
}

.detail-source .source-author {
    font-size: 13px;
    color: #424242;
}

/* ---------------------------------------------------------
   7. Article Actions (Share, Like, etc.)
   --------------------------------------------------------- */
.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.detail-actions .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    font-size: 14px;
    color: #424242;
    background: #f5f5f5;
    border: 1px solid #e8eef5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-actions .action-btn:hover {
    color: #1565c0;
    background: #e3f2fd;
    border-color: #bbdefb;
}

.detail-actions .action-btn.active {
    color: #1565c0;
    background: #e3f2fd;
    border-color: #1565c0;
}

/* ---------------------------------------------------------
   8. Related Articles
   --------------------------------------------------------- */
.related-articles {
    max-width: 820px;
    margin: 0 auto 28px;
    padding: 0 24px;
}

.related-articles .related-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1565c0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-articles .related-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: #1565c0;
    border-radius: 2px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.related-card {
    display: flex;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.25s ease;
    cursor: pointer;
}

.related-card:hover {
    box-shadow: 0 6px 20px rgba(12, 45, 107, 0.1);
    transform: translateY(-2px);
    border-color: #e3f2fd;
}

.related-card .related-img {
    width: 120px;
    min-height: 90px;
    flex-shrink: 0;
    overflow: hidden;
}

.related-card .related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.related-card:hover .related-img img {
    transform: scale(1.05);
}

.related-card .related-body {
    flex: 1;
    min-width: 0;
    padding: 12px 14px 12px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-card .related-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.5;
    margin: 0 0 8px;
    transition: color 0.2s ease;
}

.related-card:hover .related-card-title {
    color: #1565c0;
}

.related-card .related-meta {
    font-size: 12px;
    color: #bdbdbd;
}

/* ---------------------------------------------------------
   9. Previous / Next Article Navigation
   --------------------------------------------------------- */
.article-nav {
    max-width: 820px;
    margin: 0 auto 28px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.article-nav a {
    display: block;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.article-nav a:hover {
    box-shadow: 0 4px 12px rgba(12, 45, 107, 0.1);
    border-color: #e3f2fd;
}

.article-nav .nav-label {
    font-size: 12px;
    color: #9e9e9e;
    margin-bottom: 6px;
}

.article-nav .nav-title {
    font-size: 14px;
    color: #1a1a2e;
    font-weight: 500;
    line-height: 1.5;
}

.article-nav a:hover .nav-title {
    color: #1565c0;
}

.article-nav .nav-next {
    text-align: right;
}

/* ---------------------------------------------------------
   10. Responsive - Tablet (max-width: 1024px)
   --------------------------------------------------------- */
@media (max-width: 1024px) {
    .detail {
        padding: 32px 36px;
    }

    .detail-title {
        font-size: 24px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-card .related-img {
        width: 140px;
    }
}

/* ---------------------------------------------------------
   11. Responsive - Mobile (max-width: 768px)
   --------------------------------------------------------- */
@media (max-width: 768px) {
    .detail-wrap {
        padding: 0 0 24px;
    }

    .detail {
        padding: 24px 20px;
        margin: 0 0 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .detail-title {
        font-size: 21px;
        line-height: 1.45;
    }

    .detail-meta {
        gap: 10px;
        font-size: 12px;
    }

    .detial-ops {
        gap: 10px;
        font-size: 12px;
    }

    .detail-content {
        font-size: 15px !important;
        line-height: 1.75 !important;
        padding-top: 16px;
    }

    .detail-content h1 { font-size: 21px; }
    .detail-content h2 { font-size: 19px; }
    .detail-content h3 { font-size: 17px; }

    .detail-content img {
        margin: 12px auto;
        border-radius: 6px;
    }

    .detail-content pre {
        padding: 14px 16px;
        font-size: 13px;
        margin: 14px 0;
        border-radius: 6px;
    }

    .detail-content blockquote {
        padding: 12px 16px;
        margin: 14px 0;
    }

    .detail-content table td,
    .detail-content table th {
        padding: 8px 10px;
        font-size: 13px;
    }

    /* Source box */
    .detail-source {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-top: 24px;
        border-radius: 8px;
    }

    /* Actions */
    .detail-actions {
        flex-wrap: wrap;
        padding-top: 16px;
        margin-top: 16px;
    }

    /* Related articles */
    .related-articles {
        padding: 0 16px;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .related-card .related-img {
        width: 110px;
        min-height: 80px;
    }

    .related-card .related-body {
        padding: 10px 12px 10px 0;
    }

    .related-card .related-card-title {
        font-size: 13px;
    }

    /* Article nav */
    .article-nav {
        padding: 0 16px;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .article-nav .nav-next {
        text-align: left;
    }

    /* Breadcrumb */
    .breadcrumb {
        padding: 12px 16px;
        font-size: 12px;
    }

    /* Related section mobile */
    .related-section {
        margin-top: 24px;
    }

    .related-section .related-thumb {
        width: 110px;
        min-height: 80px;
    }

    .related-section .related-info {
        padding: 10px 12px 10px 0;
    }

    .related-section .related-name {
        font-size: 13px;
    }
}

/* ---------------------------------------------------------
   12. Detail Article Wrapper
   --------------------------------------------------------- */
.detail-article {
    background: #fff;
    padding: 40px 48px;
    margin: 0 auto 28px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    max-width: 820px;
    width: 100%;
}

@media (max-width: 1024px) {
    .detail-article {
        padding: 32px 36px;
    }
}

@media (max-width: 768px) {
    .detail-article {
        padding: 24px 20px;
        margin: 0 0 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }
}

/* ---------------------------------------------------------
   13. Detail Tags (Keyword links)
   --------------------------------------------------------- */
.detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.detail-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    font-size: 13px;
    color: #1565c0;
    background: #e3f2fd;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.detail-tag:hover {
    color: #0f4c9e;
    background: #bbdefb;
}

/* ---------------------------------------------------------
   14. Related Section (Template aliases)
       Template uses .related-section, .related-thumb,
       .related-info, .related-name instead of the
       .related-articles, .related-img, .related-body,
       .related-card-title classes above.
   --------------------------------------------------------- */
.related-section {
    max-width: 820px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.related-section .related-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1565c0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-section .related-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: #1565c0;
    border-radius: 2px;
}

.related-section .related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.related-section .related-card {
    display: flex;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.25s ease;
    cursor: pointer;
}

.related-section .related-card:hover {
    box-shadow: 0 6px 20px rgba(12, 45, 107, 0.1);
    transform: translateY(-2px);
    border-color: #e3f2fd;
}

.related-thumb {
    width: 120px;
    min-height: 90px;
    flex-shrink: 0;
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.related-card:hover .related-thumb img {
    transform: scale(1.05);
}

.related-info {
    flex: 1;
    min-width: 0;
    padding: 12px 14px 12px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.5;
    margin: 0 0 8px;
    transition: color 0.2s ease;
}

.related-card:hover .related-name {
    color: #1565c0;
}

.related-section .related-meta {
    font-size: 12px;
    color: #bdbdbd;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 1024px) {
    .related-section .related-grid {
        grid-template-columns: 1fr;
    }

    .related-thumb {
        width: 140px;
    }
}

/* ---------------------------------------------------------
   15. Source Info (inside .detail-source)
   --------------------------------------------------------- */
.detail-source .source-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #424242;
}

.detail-source .source-info a {
    color: #1565c0;
    font-weight: 500;
    transition: color 0.2s ease;
}

.detail-source .source-info a:hover {
    color: #0f4c9e;
    text-decoration: underline;
}
