/* Single Post Template Styles */

/* Post Wrapper */
.single-post-wrapper {
    width: 100%;
    background: #ffffff;
}

.single-post-container {
    max-width: 1292px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Post Header */
.single-post-header {
    padding: 72px 0 32px;
}

/* Post Meta */
.single-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.single-post-category {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: #F4F8FC;
    color: #1E73BE;
    font-size: 14px;
    font-weight: 500;
    border-radius: 32px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.single-post-category:hover {
    background: #E8F1F8;
}

.meta-separator {
    color: #999999;
    font-size: 14px;
}

.single-post-date {
    color: #999999;
    font-size: 14px;
}

/* Post Title */
.single-post-title {
    color: #2C2C2C;
    text-align: center;
    font-family: "Helvetica Neue", sans-serif;
    font-size: 32px;
    font-weight: 500;
    text-transform: uppercase;
    margin: 0 auto 32px;
    max-width: 70%;
}

/* Featured Image */
.single-post-featured-image {
    width: 100%;
    max-width: 100%;
    height: 550px;
    border-radius: 32px;
    overflow: hidden;
}

.single-post-featured-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Content Layout */
.single-post-content-wrapper {
    padding: 40px 0 80px;
}

.single-post-layout {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 60px;
    max-width: 100%;
    margin: 0 auto;
}

/* Author Block */
.author-block {
    display: flex;
    padding: 16px 24px 16px 16px;
    background: #F4F8FC;
    border-radius: 24px;
    margin-bottom: 40px;
}

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

.author-avatar img,
.author-avatar svg {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
    margin: 0 40px 0 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-info h3.author-name {
    color:#2C2C2C;
    font-family: "Helvetica Neue";
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    margin: 0 0 8px;
}

.author-link{
    display: flex;
    justify-content: center;
    align-items: center;
}

.author-link a{
    opacity: 0.9;
    display: flex;
}

.author-link a:hover{
    opacity: 1;
}

.author-name a {
    color: inherit;
    text-decoration: none;
}

.author-name a:hover {
    color: #1E73BE;
}

.author-bio {
    color: #625D5E;
    font-family: "Helvetica Neue";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;  
    margin: 0;
}

/* Post Content Styles */
.single-post-content {
    color: #2C2C2C;
    font-family: "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.8;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4,
.single-post-content h5,
.single-post-content h6 {
    font-family: "Helvetica Neue";
    color: #2C2C2C;
    font-weight: 500;
    margin: 32px 0 16px;
    line-height: 1.3;
}

.single-post-content h2 {
    font-size: 24px;
    margin: 40px 0 16px;
}

.single-post-content h3 {
    font-size: 20px;
}

.single-post-content h4 {
    font-size: 18px;
}

.single-post-content p {
    margin: 0 0 8px;
    font-size: 16px;
    color: #625D5E;
}

.single-post-content ul,
.single-post-content ol {
    margin: 0 0 20px 20px;
    padding-left: 20px;
}
 

.single-post-content blockquote {
    margin: 24px 0;
    padding: 20px;
    background: #F9FBFD;
    border-left: 4px solid #1E73BE;
    font-style: italic;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
}

.single-post-content a {
    color: #1E73BE;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
    word-break: break-all;
}

.single-post-content a:hover {
    border-bottom-color: #1E73BE;
}

.single-post-content sup {
    font-size: 12px;
    vertical-align: super;
    color: #1E73BE;
}

/* Social Share Block */
.social-share-block {
    margin-top: 40px;
    padding: 16px 24px;
    background: #1E73BE;
    border-radius: 20px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-title {
    color: #ffffff;
    font-family: "Helvetica Neue";
    font-size: 20px; 
    font-weight: 500; 
    margin: 0;
}

.share-title span{
    color: #D2E3F2;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 100px;
    background: #4289C8;
    transition: all 0.3s ease;
    color: #ffffff;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

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

/* Table of Contents */
.single-post-toc {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc-wrapper h3.toc-title {
    margin: 0 0 12px;
    color: #2C2C2C;
    font-family: "Helvetica Neue";
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px; 
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-item {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    color: #A7A7A7;
    font-family: "Helvetica Neue";
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;  
    padding: 8px;
    outline: none;
    border: none;
}

.toc-item:hover {
    color: #1E73BE;
}

.toc-item.active {
    color: #1E73BE; 
    border-radius: 12px;
    background: #F4F8FC;
    outline: none;
    border: none;
} 

/* Related Articles Section */
.related-articles-section {
    padding: 80px 0 120px;
    background: #fff;
}

.related-articles-container {
    max-width: 1292px;
    margin: 0 auto;
    padding: 0 16px;
}

.related-articles-container h2.related-articles-title {
    color: #2C2C2C;
    font-family: "Helvetica Neue";
    font-size: 32px; 
    font-weight: 500; 
    text-transform: uppercase;
    margin: 0 0 40px;
    text-align: left;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-article-card {
    background: #ffffff; 
    display: flex;
    flex-direction: column; 
}
 

.related-thumbnail {
    width: 100%;
    height: 228px;
    border-radius: 12px;
    overflow: hidden;
}

.related-thumbnail img,
.related-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0F0F0;
}

.related-card-content {
    padding: 20px 0 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.related-category {
    padding: 4px 10px;
    background: #F4F8FC;
    color: #1E73BE;
    font-weight: 500;
    border-radius: 20px;
}

.related-meta-separator {
    color: #999999;
}

.related-date {
    color: #999999;
}

.related-title-excerpt {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-title-excerpt  .related-title {
    color: #2C2C2C;
    font-family: "Helvetica Neue";
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    margin: 0;
}

.related-title a {
    color: #2C2C2C;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-title a:hover {
    color: #1E73BE;
}

.related-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #625D5E;
}

.related-author {
    display: flex;
    align-items: center;
    gap: 8px; 
}

.related-author img,
.related-author svg {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.related-author-name {
    color: #2C2C2C;
    font-family: "Helvetica Neue";
    font-size: 16px; 
    font-weight: 400;
    line-height: 24px;
}

.no-related {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999999;
}

.author-link-mob-icon{
    display: none;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .single-post-layout {
        display: flex;
        flex-direction: column-reverse;
        gap: 32px;
    }
    
    .single-post-sidebar {
        max-width: 100%;
    }
    
    .single-post-toc {
        position: static;
        max-width: max-content;
        margin: 0;
    }
    
    .related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .single-post-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .single-post-header {
        padding: 40px 0;
    }
    .single-post-meta{
        margin-bottom: 20px;
    }
    .author-block {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    .author-info{
        margin: 16px 0 24px;
    }
    .author-link-desk-icon{
        display: none;
    }
    .author-link-mob-icon{
        display: flex;
    }
    .author-link a{
        display: flex;
        width: 100%; 
        padding: 8px 16px;
        justify-content: center;
        align-items: center;
        gap: 8px;
        align-self: stretch;
        border-radius: 32px;
        background: linear-gradient(97deg, #1E73BE -9.46%, #00ABC4 110.21%);
        color: #fff;
        text-decoration: none;;
    }
    .single-post-featured-image{
        border-radius: 12px;
        height: 100%;
    }
    
    .social-share-block {
        padding: 16px 24px;
        gap: 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .related-articles-title {
        font-size: 24px;
    }
    .single-post-content-wrapper{
        padding: 0 0 32px;
    }
    .related-articles-section{
        padding: 32px 0;
    }
    .related-articles-container h2.related-articles-title{
        font-size: 24px;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .single-post-title {
        font-size: 24px;
    }
    
    .single-post-content h2 {
        font-size: 22px;
    }
    
    .single-post-content h3 {
        font-size: 20px;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .share-btn {
        width: 42px;
        height: 42px;
    }
}

/* Print Styles */
@media print {
    .single-post-toc,
    .social-share-block,
    .related-articles-section,
    .gm-breadcrumb {
        display: none;
    }
    
    .single-post-layout {
        grid-template-columns: 1fr;
    }
}



/* Additional Single Post Enhancements */

/* Mobile TOC Toggle */
.toc-toggle {
    display: none;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #E8F1F8;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2C2C2C;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
    text-align: left;
}

.toc-toggle svg {
    float: right;
    transition: transform 0.3s ease;
}

.toc-toggle.active svg {
    transform: rotate(180deg);
}

.toc-toggle:hover {
    background: #F4F8FC;
}
 

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

/* Loading State for Related Articles */
.related-articles-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Enhanced Typography for Content */
.single-post-content {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Code Blocks Styling */
.single-post-content pre {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 24px 0;
}

.single-post-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

.single-post-content pre code {
    background: transparent;
    padding: 0;
}

/* Tables Styling */
.single-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.single-post-content th,
.single-post-content td {
    padding: 12px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.single-post-content th {
    background: #f5f5f5;
    font-weight: 600;
}

.single-post-content tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Image Captions */
.single-post-content figure {
    margin: 32px 0;
}

.single-post-content figcaption {
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    color: #999999;
    font-style: italic;
}

/* Video Embeds */
.single-post-content .wp-block-embed {
    margin: 32px 0;
}

.single-post-content .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.single-post-content .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Print Styles Enhancement */
@media print {
    .single-post-content {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .single-post-content a {
        color: #000;
        text-decoration: underline;
    }
    
    .single-post-content a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    } 
}

