/* Article Detail Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
    --go-green: #69B846;
    --go-dark: #1a1a1a;
    --go-light: #f8f9fa;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
}

.text-go-green { color: var(--go-green); }
.bg-go-green { background-color: var(--go-green); }
.border-go-green { border-color: var(--go-green); }

/* Navigation */
.nav-item {
    transition: color 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--go-green);
}

/* Line Clamp Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Content Styles */
.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #374151;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #111827;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-content h1 {
    font-size: 2rem;
}

.article-content h2 {
    font-size: 1.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.25rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content a {
    color: var(--go-green);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.article-content a:hover {
    color: #559e38;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--go-green);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: #f9fafb;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #4b5563;
}

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

.article-content pre {
    background-color: #1f2937;
    color: #e5e7eb;
    padding: 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.article-content code {
    background-color: #f3f4f6;
    color: #dc2626;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875em;
}

.article-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.article-content table th,
.article-content table td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    text-align: left;
}

.article-content table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #111827;
}

.article-content table tr:hover {
    background-color: #f9fafb;
}

.article-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

.article-content figure {
    margin: 1.5rem 0;
}

.article-content figcaption {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Video Container */
.article-content iframe,
.article-content video {
    max-width: 100%;
    width: 100%;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

/* Info Box Styles */
.article-content .info-box,
.article-content .tip-box,
.article-content .warning-box {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.article-content .info-box {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.article-content .tip-box {
    background-color: #f0fdf4;
    border-left: 4px solid var(--go-green);
}

.article-content .warning-box {
    background-color: #fefce8;
    border-left: 4px solid #eab308;
}

/* Hero Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-hero-content {
    animation: fadeInUp 0.6s ease-out;
}

/* Share Button Hover Effects */
.share-btn {
    transition: transform 0.2s, box-shadow 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Related Articles Cards */
.related-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* Navigation Arrows */
.nav-arrow {
    transition: all 0.3s;
}

.nav-arrow:hover {
    transform: translateX(4px);
}

.nav-arrow.prev:hover {
    transform: translateX(-4px);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--go-green), #34d399);
    z-index: 100;
    transition: width 0.1s ease-out;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--go-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(105, 184, 70, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #559e38;
    transform: translateY(-4px);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Focus States */
a:focus,
button:focus {
    outline: 2px solid var(--go-green);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background-color: rgba(105, 184, 70, 0.2);
    color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Print Styles */
@media print {
    header,
    footer,
    .back-to-top,
    .reading-progress,
    .share-buttons,
    .related-articles {
        display: none !important;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    .article-content a {
        text-decoration: none;
        color: inherit;
    }
    
    .article-content img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h1 {
        font-size: 1.75rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
    
    .article-content pre {
        font-size: 0.8125rem;
        padding: 1rem;
    }
    
    .article-content table {
        font-size: 0.875rem;
    }
    
    .article-content table th,
    .article-content table td {
        padding: 0.5rem 0.75rem;
    }
}

/* Image Loading Placeholder */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Table of Contents Sticky */
.toc-sticky {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

/* Quote styling */
.article-content .pullquote {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    border-left: none;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.article-content .pullquote::before,
.article-content .pullquote::after {
    content: '"';
    font-size: 3rem;
    color: var(--go-green);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.article-content .pullquote::before {
    position: absolute;
    top: 0;
    left: 0;
}

.article-content .pullquote::after {
    content: '"';
    position: absolute;
    bottom: 0;
    right: 0;
}

