/**
 * IMS Space - Single Article Styles
 */

/* Article Header Section */
.article-header {
    position: relative;
    padding: 180px 0 100px;
    min-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.article-header .hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
}

.hero-orbits {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.orbit-line {
    position: absolute;
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    animation: orbit-rotate 20s linear infinite;
}

.orbit-1 {
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orbit-2 {
    width: 700px;
    height: 700px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 30s;
    animation-direction: reverse;
}

.orbit-3 {
    width: 900px;
    height: 900px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 40s;
}

@keyframes orbit-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.article-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    position: relative;
    z-index: 10;
}

.article-category {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(78, 204, 163, 0.2);
    color: #4ecca3;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.article-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 20px 0;
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
}

.article-excerpt {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 20px 0;
}

.article-meta {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.article-meta svg {
    opacity: 0.8;
}

/* Article Hero (legacy) */
.article-hero {
    padding: 160px 0 60px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.article-hero .back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.article-hero .back-link svg {
    width: 18px;
    height: 18px;
}

.article-hero .back-link:hover {
    color: var(--primary);
}

.article-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.article-header .article-meta {
    margin-bottom: 20px;
}

.article-header .article-views {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.article-excerpt {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Featured Image */
.article-featured-image {
    padding: 40px 0;
    background: rgba(10, 14, 39, 0.95);
    position: relative;
    z-index: 10;
}

.article-featured-image .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

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

/* Article Content */
.article-content {
    padding: 60px 0;
    background: rgba(10, 14, 39, 0.95);
    position: relative;
    z-index: 10;
}

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

.article-content-section {
    padding-bottom: 80px;
}

.article-body {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.article-body h2,
.article-body h3,
.article-body h4 {
    font-family: 'Orbitron', sans-serif;
    margin-top: 2em;
    margin-bottom: 0.8em;
    color: white;
}

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

.article-body h3 {
    font-size: 1.4rem;
}

.article-body p {
    margin-bottom: 1.5em;
}

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

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

.article-body ul,
.article-body ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.article-body li {
    margin-bottom: 0.5em;
}

.article-body blockquote {
    margin: 2em 0;
    padding: 1.5em 2em;
    background: rgba(0, 212, 255, 0.05);
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

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

.article-body code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-body pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5em;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2em 0;
}

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

/* Tags Section */
.article-tags {
    max-width: 760px;
    margin: 40px auto;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.article-tags strong {
    color: #4ecca3;
    margin-right: 15px;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border-radius: 15px;
    font-size: 0.85rem;
    margin: 5px;
}

/* Share Section */
.article-share {
    max-width: 760px;
    margin: 30px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-share strong {
    display: block;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.share-twitter,
.share-btn.twitter {
    background: rgba(29, 161, 242, 0.1);
    color: #1da1f2;
}

.share-twitter:hover,
.share-btn.twitter:hover {
    background: rgba(29, 161, 242, 0.2);
}

.share-facebook,
.share-btn.facebook {
    background: rgba(66, 103, 178, 0.1);
    color: #4267b2;
}

.share-facebook:hover,
.share-btn.facebook:hover {
    background: rgba(66, 103, 178, 0.2);
}

.share-linkedin,
.share-btn.linkedin {
    background: rgba(10, 102, 194, 0.1);
    color: #0a66c2;
}

.share-linkedin:hover,
.share-btn.linkedin:hover {
    background: rgba(10, 102, 194, 0.2);
}

/* Related Articles */
.related-articles {
    padding: 80px 0;
    background: rgba(10, 14, 39, 0.95);
    position: relative;
    z-index: 10;
}

.related-articles .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.related-articles h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.article-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: rgba(78, 204, 163, 0.3);
    box-shadow: 0 10px 30px rgba(78, 204, 163, 0.1);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-content {
    padding: 25px;
}

.article-card h3 {
    font-size: 1.25rem;
    margin: 0 0 15px;
}

.article-card h3 a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.article-card h3 a:hover {
    color: #4ecca3;
}

.article-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.article-card-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* === Light Theme Styles === */
/* Apply light theme to article content sections, keeping header dark */
body.light-theme .article-featured-image,
body.light-theme .article-content,
body.light-theme .related-articles {
    background: var(--color-bg-primary-light, #f0f7fa) !important;
}

body.light-theme .article-body {
    color: var(--color-text-primary-light, #0f172a);
}

body.light-theme .article-body h2,
body.light-theme .article-body h3,
body.light-theme .article-body h4 {
    color: var(--color-text-primary-light, #0f172a);
}

body.light-theme .article-body p,
body.light-theme .article-body li {
    color: var(--color-text-secondary-light, #475569);
}

body.light-theme .article-body strong {
    color: var(--color-primary, #00d4ff);
}

body.light-theme .article-body blockquote {
    background: rgba(0, 212, 255, 0.08);
    color: var(--color-text-primary-light, #0f172a);
    border-left-color: var(--color-primary);
}

body.light-theme .article-body code {
    background: rgba(0, 0, 0, 0.08);
    color: var(--color-text-primary-light, #0f172a);
}

body.light-theme .article-body pre {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* Tags Light Theme */
body.light-theme .article-tags {
    border-top-color: rgba(0, 0, 0, 0.1);
    color: var(--color-text-primary-light, #0f172a);
}

body.light-theme .article-tags strong {
    color: var(--color-primary, #00d4ff);
}

body.light-theme .tag {
    background: rgba(0, 212, 255, 0.15);
    color: var(--color-primary, #00d4ff);
}

/* Share Section Light Theme */
body.light-theme .article-share {
    background: #ffffff;
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 132, 199, 0.1);
}

body.light-theme .article-share strong {
    color: var(--color-text-primary-light, #0f172a);
}

/* Related Articles Light Theme */
body.light-theme .related-articles h2 {
    color: var(--color-text-primary-light, #0f172a);
}

body.light-theme .article-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fcff 100%);
    border: 1px solid rgba(0, 212, 255, 0.25);
    box-shadow: 0 4px 20px rgba(0, 132, 199, 0.1);
}

body.light-theme .article-card:hover {
    background: #ffffff;
    box-shadow: 0 12px 40px rgba(0, 132, 199, 0.2);
    border-color: var(--color-primary, #00d4ff);
}

body.light-theme .article-card h3 a {
    color: var(--color-text-primary-light, #0f172a);
}

body.light-theme .article-card h3 a:hover {
    color: var(--color-primary, #00d4ff);
}

body.light-theme .article-card p {
    color: var(--color-text-secondary-light, #475569);
}

body.light-theme .article-card-date {
    color: var(--color-text-muted-light, #64748b);
}

/* Responsive */
@media (max-width: 768px) {
    .article-header,
    .article-hero {
        padding: 120px 0 40px;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-excerpt {
        font-size: 1.1rem;
    }
    
    .article-meta {
        gap: 15px;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}
