/* ================================
   ARTICLE STYLES
   ================================ */

.article {
    padding-top: 70px;
}

.article-header {
    padding: var(--spacing-lg) 0 var(--spacing-md);
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}

.container-article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.article-breadcrumb {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.article-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-breadcrumb a:hover {
    color: var(--primary);
}

.article-category {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--gradient-primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--spacing-md);
}

.article-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--white);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Content Layout */
.article-content {
    padding: var(--spacing-lg) 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-lg);
    align-items: start;
}

.main-content {
    min-width: 0; /* Prevents grid overflow */
}

.article-image {
    width: 100%;
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Body Text */
.article-body {
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-body .lead {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
    line-height: 1.7;
}

.article-body h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.article-body p {
    margin-bottom: var(--spacing-md);
}

.article-body ul,
.article-body ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-md);
}

.article-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.article-body a {
    color: var(--primary);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.article-body a:hover {
    color: var(--secondary);
}

.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
}

.article-body code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-body pre {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--spacing-md) 0;
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0;
}

/* Special Boxes */
.highlight-box {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary);
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius-md);
}

.cta-box {
    background: var(--gradient-primary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    margin: var(--spacing-lg) 0;
}

.cta-box h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
}

.cta-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-md);
}

/* Article Footer */
.article-footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-share span {
    font-weight: 600;
    color: var(--text);
}

.share-btn {
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--gradient-primary);
    border-color: transparent;
}

/* Related Posts */
.related-posts {
    margin-top: var(--spacing-xl);
}

.related-posts h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--spacing-md);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.related-card {
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.related-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.related-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-card {
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
}

.sidebar-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.sidebar-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
}

.sidebar-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.sidebar-form input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Popular Posts List */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease;
}

.popular-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.popular-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.popular-title {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-list a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.category-list a:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

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

@media (max-width: 768px) {
    .article-body {
        font-size: 1rem;
    }

    .article-body .lead {
        font-size: 1.15rem;
    }

    .article-body h2 {
        font-size: 1.6rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }
}
