/* Single Post Styles */

/* Hero Image Section */
.hero-image-section {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
    overflow: hidden;
    margin-top: -100px;
    z-index: 1;
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 60px 40px 40px;
    color: #fff;
    text-align: center;
}

.hero-title-overlay .article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.hero-title-overlay .article-date {
    color: #ddd;
}

.hero-title-overlay .article-category {
    background: #000;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
}

.hero-title-overlay .article-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #fff;
}

/* Article Main Content */
.article-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-breadcrumbs {
    margin-bottom: 30px;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-intro {
    margin-bottom: 30px;
}

.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    margin: 30px 0 20px;
    font-weight: 600;
    line-height: 1.3;
}

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

.article-body h3 {
    font-size: 24px;
}

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

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

.article-body ul li,
.article-body ol li {
    margin-bottom: 8px;
    line-height: 1.6;
}

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

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

.article-body blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    background: var(--quote-bg);
    border-left: 4px solid var(--text-primary);
    font-style: italic;
    font-size: 18px;
    line-height: 1.6;
}

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

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

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

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.article-body table th,
.article-body table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.article-body table th {
    background: var(--bg-secondary);
    font-weight: 600;
}

/* Dark Mode Styles */
[data-theme="dark"] .hero-title-overlay .article-category {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #333;
}

[data-theme="dark"] .hero-title-overlay .article-date {
    color: #ccc;
}

[data-theme="dark"] .hero-title-overlay .article-title {
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-image-section {
        height: 50vh;
        min-height: 300px;
        margin-top: -80px;
    }
    
    .hero-title-overlay {
        padding: 40px 20px 30px;
    }
    
    .hero-title-overlay .article-title {
        font-size: 18px;
    }
    
    .hero-title-overlay .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-main {
        padding: 30px 15px;
    }
    
    .article-body {
        font-size: 15px;
    }
    
    .article-body h2 {
        font-size: 24px;
    }
    
    .article-body h3 {
        font-size: 20px;
    }
    
    .article-body h4 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hero-image-section {
        height: 40vh;
        min-height: 250px;
        margin-top: -70px;
    }
    
    .hero-title-overlay .article-title {
        font-size: 22px;
    }
    
    .article-main {
        padding: 20px 10px;
    }
    
    .article-body {
        font-size: 14px;
    }
    
    .article-body ul,
    .article-body ol {
        padding-left: 20px;
    }
}

/* Article Footer Styles */
.article-footer {
    max-width: 800px;
    margin: 40px auto 0;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.article-tags {
    margin-bottom: 30px;
}

.article-tags a {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 6px 12px;
    margin: 0 8px 8px 0;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.article-tags a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Article Share Styles */
.article-share {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

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

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
    border: 2px solid #000;
}

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

.share-btn .fab.fa-facebook-f,
.share-btn .fab.fa-x-twitter,
.share-btn .fab.fa-instagram,
.share-btn .fab.fa-pinterest {
    background: transparent;
}

/* Dark mode styles for share buttons */
[data-theme="dark"] .share-btn {
    background: #000;
    color: #fff;
    border-color: #fff;
}

[data-theme="dark"] .share-btn:hover {
    background: #fff;
    color: #000;
}

/* Related Articles Styles */
.related-articles {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 40px 20px 0;
    border-top: 2px solid var(--border-color);
}

.related-articles h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-primary);
}

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

.related-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.related-item a {
    text-decoration: none;
}

.related-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.related-content {
    padding: 20px;
}

.related-category {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.related-content h4 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.related-content h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content h4 a:hover {
    color: var(--primary-color);
}

.related-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Dark Mode Styles for Footer, Share and Related */
[data-theme="dark"] .article-footer {
    border-top-color: #333;
}

[data-theme="dark"] .article-tags a {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #444;
}

[data-theme="dark"] .article-tags a:hover {
    background: var(--primary-color);
    color: #fff;
}

[data-theme="dark"] .related-item {
    background: #000;
    border-color: #444;
}

[data-theme="dark"] .related-content h4 a {
    color: #e0e0e0;
}

[data-theme="dark"] .related-content h4 a:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .related-content p {
    color: #b0b0b0;
}

/* Responsive Styles for Footer and Related */
@media (max-width: 768px) {
    .article-footer {
        padding: 20px 15px;
    }
    
    .article-share {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .article-share span {
        font-size: 14px;
    }
    
    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .related-articles {
        margin-top: 40px;
        padding: 30px 15px 0;
    }
    
    .related-articles h3 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .related-item img {
        height: 180px;
    }
    
    .related-content {
        padding: 15px;
    }
    
    .related-content h4 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .article-footer {
        padding: 15px 10px;
    }
    
    .share-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .related-articles {
        padding: 20px 10px 0;
    }
    
    .related-articles h3 {
        font-size: 20px;
    }
    
    .related-item img {
        height: 160px;
    }
    
    .related-content {
        padding: 12px;
    }
}