/**
 * Single Post Styles
 * Styles for single.php template (blog posts/articles)
 *
 * @package Melodica
 */

.post-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: transparent;
    min-height: 100vh;
}

/* Main Container */
.main-container {
    background: transparent;
    min-height: 100vh;
}

/* Post Header Section */
.post-header-section {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
}

/* Post Featured Image */
.post-featured-image {
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px var(--shadow-black-30);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content Section */
.post-content-section {
    background: transparent;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content h1 {
    font-size: 2rem;
}

.post-content h2 {
    font-size: 1.75rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content a {
    color: var(--color-purple);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content a:hover {
    color: var(--color-primary);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-content blockquote {
    border-right: 4px solid var(--color-purple);
    padding-right: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* Post Tags */
.post-tags {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--overlay-white-10);
}

.post-tags-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.post-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-primary-violet);
    color: var(--text-primary);
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-tag:hover {
    background: var(--color-purple);
    transform: translateY(-2px);
}

/* Post Share Section */
.post-share-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--overlay-white-10);
}

.post-share-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-primary-violet);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.post-share-btn:hover {
    background: var(--color-purple);
    transform: translateY(-2px);
}

.post-share-btn svg {
    width: 20px;
    height: 20px;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: transparent;
    border-radius: 16px;
}

.post-nav-item {
    flex: 1;
}

.post-nav-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.post-nav-item a:hover {
    color: var(--color-purple);
}

.post-nav-prev a {
    flex-direction: row-reverse;
}

.post-nav-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.post-nav-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Related Posts */
.related-posts-section {
    margin-bottom: 3rem;
}

.related-posts-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-post-card {
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-black-30);
}

.related-post-image {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 1.5rem;
}

.related-post-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.related-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: var(--color-purple);
}

.related-post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Comments Section */
#comments {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 3rem 0 2rem 0;
}

.commentlist {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.comment {
    background: transparent;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--overlay-white-10);
}

.comment-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comment-author .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--overlay-white-10);
}

.comment-author .fn {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.comment-author .fn a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.comment-author .fn a:hover {
    color: var(--color-purple);
}

.comment-author .says {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.comment-metadata {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.comment-metadata a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.comment-metadata a:hover {
    color: var(--color-purple);
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.comment-content p {
    margin: 0 0 1rem 0;
}

.comment-content a {
    color: var(--color-purple);
    text-decoration: none;
}

.comment-content a:hover {
    text-decoration: underline;
}

.comment .reply {
    margin-top: 1rem;
}

.comment-reply-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-primary-violet);
    color: var(--text-primary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.comment-reply-link:hover {
    background: var(--color-purple);
    transform: translateY(-2px);
}

/* Comment Form */
#respond {
    background: transparent;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
}

#reply-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

#reply-title small {
    font-size: 0.9rem;
    font-weight: 400;
}

#cancel-comment-reply-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin-right: 0.5rem;
    transition: color 0.3s ease;
}

#cancel-comment-reply-link:hover {
    color: var(--color-purple);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.logged-in-as {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.logged-in-as a {
    color: var(--color-purple);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logged-in-as a:hover {
    color: var(--color-primary);
}

.comment-form-comment {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-form-comment label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.comment-form-comment textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    background: var(--color-primary-violet);
    border: 1px solid var(--overlay-white-10);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.comment-form-comment textarea:focus {
    outline: none;
    border-color: var(--color-purple);
}

.form-submit {
    display: flex;
    justify-content: flex-start;
}

.form-submit .submit {
    padding: 0.75rem 2rem;
    background: var(--color-purple);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit .submit:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

.required {
    color: var(--color-error);
}

.required-field-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

/* Navigation for comments */
.navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
}

.navigation .alignleft,
.navigation .alignright {
    display: flex;
    gap: 0.5rem;
}

.navigation a {
    padding: 0.5rem 1rem;
    background: var(--color-primary-violet);
    color: var(--text-primary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navigation a:hover {
    background: var(--color-purple);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .post-single {
        padding: 0rem;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .post-content-section {
        padding: 1.5rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .comment {
        padding: 1rem;
    }

    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    #respond {
        padding: 1.5rem;
    }
}

