/**
 * Single Article Page Styles
 * Based on mockup design - clean and modern
 * Version 3.0
 */

/* ========================================
 * CSS VARIABLES
 * ======================================== */
:root {
    --article-text-dark: #2D2D2D;
    --article-text-gray: #6B6B6B;
    --article-text-light: #999999;
    --article-bg-white: #FFFFFF;
    --article-bg-page: #FFFFFF;
    --article-border: #E5E7EB;
    --article-blue-accent: #3B82F6;
}

/* ========================================
 * PAGE LAYOUT
 * ======================================== */
.single-article-page {
    background: var(--article-bg-page);
    padding: 20px 0 80px;
    min-height: 100vh;
}

.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* ========================================
 * FIXED SOCIAL SIDEBAR - All Same Blue
 * ======================================== */
.social-sticky {
    position: fixed;
    left: 20px;
    top: 160px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--article-blue-accent);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

/* Remove external link arrows from social buttons */
.social-sticky .social-btn::after,
.social-btn[target="_blank"]::after {
    display: none !important;
    content: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: white;
}

.social-btn:hover::after {
    display: none !important;
    content: none !important;
}

.social-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ========================================
 * ARTICLE CONTENT - Main Column
 * ======================================== */
.article-content {
    min-width: 0;
    overflow: hidden;
}

/* Article Header */
.article-header {
    margin-bottom: 24px;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--article-text-dark);
    margin: 0 0 16px 0;
    letter-spacing: -0.01em;
}

/* Article Meta Line */
.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-bottom: 1px solid var(--article-border);
    font-size: 14px;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-by {
    color: var(--article-text-gray);
}

.author-name {
    font-weight: 600;
    color: var(--article-text-dark);
    text-decoration: none;
}

.author-name:hover {
    color: var(--article-blue-accent);
}

.article-date {
    color: var(--article-text-gray);
}

.article-views {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--article-text-gray);
}

.article-views svg {
    width: 16px;
    height: 16px;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.tags-label {
    font-weight: 600;
    color: var(--article-text-gray);
}

.tag-link {
    color: var(--article-blue-accent);
    text-decoration: none;
}

.tag-link:hover {
    text-decoration: underline;
}

/* ========================================
 * FEATURED IMAGE
 * ======================================== */
.article-featured-image {
    width: 100%;
    margin: 24px 0;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* ========================================
 * ARTICLE BODY
 * ======================================== */
.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--article-text-gray);
    font-weight: var(--font-weight-light, 300);
}

.article-body p {
    margin: 0 0 18px 0;
    font-weight: inherit;
}

.article-body h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--article-text-dark);
    margin: 36px 0 16px 0;
    line-height: 1.3;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--article-text-dark);
    margin: 28px 0 12px 0;
    line-height: 1.4;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

.article-body a {
    color: var(--article-blue-accent);
    text-decoration: underline;
}

.article-body a:hover {
    text-decoration: none;
}

.article-body ul,
.article-body ol {
    margin: 18px 0;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body strong,
.article-body b {
    font-weight: 700;
    color: var(--article-text-dark);
}

.article-body blockquote {
    text-align: center;
    padding: 32px 20px;
    margin: 32px 0;
    border-top: 1px solid var(--article-border);
    border-bottom: 1px solid var(--article-border);
    border-left: none;
    background: transparent;
}

.article-body blockquote p {
    font-size: 20px;
    font-weight: 500;
    font-style: italic;
    color: var(--article-blue-accent);
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.article-body blockquote cite {
    font-size: 13px;
    color: var(--article-text-light);
    font-style: normal;
}

/* Image Grid - WordPress Gallery */
.article-body .wp-block-gallery,
.article-body .gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
}

.article-body .wp-block-gallery img,
.article-body .gallery img {
    margin: 0;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
}

/* ========================================
 * AUTHOR BOX
 * ======================================== */
.author-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: #F9FAFB;
    border-radius: 8px;
    margin-top: 40px;
}

.author-box-avatar {
    flex-shrink: 0;
}

.author-box-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.author-box-content {
    flex: 1;
}

.author-box-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--article-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.author-box-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--article-text-dark);
    margin: 0 0 8px 0;
}

.author-box-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--article-text-gray);
    margin: 0;
}

/* ========================================
 * IN-BODY RELATED ARTICLES
 * ======================================== */
.article-related-more {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--article-border);
}

.article-related-header {
    margin-bottom: 24px;
}

.article-related-heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--article-text-dark);
    margin: 0 0 8px 0;
}

.article-related-subtext {
    margin: 0;
    color: var(--article-text-light);
    font-size: 15px;
}

.article-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.related-card {
    border: 1px solid var(--article-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--article-bg-white);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.related-card-image {
    display: block;
    width: 100%;
    overflow: hidden;
}

.related-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.related-card-content {
    padding: 18px;
}

.related-card-date {
    display: block;
    font-size: 12px;
    color: var(--article-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.related-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--article-text-dark);
    line-height: 1.35;
}

.related-card-title a {
    color: inherit;
    text-decoration: none;
}

.related-card-title a:hover {
    color: var(--article-blue-accent);
}

.related-card-excerpt {
    margin: 0;
    font-size: 14px;
    color: var(--article-text-gray);
    line-height: 1.6;
}

/* ========================================
 * SIDEBAR - Right Column
 * ======================================== */
.article-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: var(--article-bg-white);
    border: 1px solid var(--article-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sidebar-card-image {
    display: block;
    width: 100%;
    overflow: hidden;
    text-decoration: none;
}

/* Remove any external link arrows from sidebar cards */
.sidebar-card-image::after,
.sidebar-card-title a::after {
    display: none !important;
    content: none !important;
}

.sidebar-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-card:hover .sidebar-card-image img {
    transform: scale(1.03);
}

.sidebar-card-content {
    padding: 16px;
}

.sidebar-card-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--article-blue-accent);
    text-transform: capitalize;
    margin-bottom: 8px;
}

.sidebar-card-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.sidebar-card-title a {
    color: var(--article-text-dark);
    text-decoration: none;
}

.sidebar-card-title a:hover {
    color: var(--article-blue-accent);
}

.sidebar-card-excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: var(--article-text-gray);
    margin: 0;
}

/* ========================================
 * COMMENTS SECTION
 * ======================================== */
.article-comments {
    padding: 40px 0 0;
    border-top: 1px solid var(--article-border);
    margin-top: 40px;
}

/* ========================================
 * RESPONSIVE DESIGN
 * ======================================== */

/* Large Screens - Position social icons better */
@media (min-width: 1400px) {
    .social-sticky {
        left: calc((100vw - 1200px) / 2 - 70px);
    }
}

/* Medium Screens */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .social-sticky {
        left: 10px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .single-article-page {
        padding: 16px 0 60px;
    }

    .article-container {
        padding: 0 16px;
    }

    .social-sticky {
        display: none;
    }

    .article-title {
        font-size: 26px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .article-tags {
        margin-left: 0;
    }

    .article-body {
        font-size: 15px;
    }

    .article-body h2 {
        font-size: 20px;
    }

    .article-body .wp-block-gallery,
    .article-body .gallery {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .article-title {
        font-size: 24px;
    }

    .sidebar-card-image img {
        height: 160px;
    }
}

/* ========================================
 * PRINT STYLES
 * ======================================== */
@media print {
    .social-sticky,
    .article-sidebar,
    .article-comments {
        display: none;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-body {
        font-size: 12pt;
    }
}
