/* Blog Layout */
.sovy-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: var(--sovy-body-font-family);
    color: var(--sovy-dark);
    line-height: 1.6;
    box-sizing: border-box;
}

/* Main Content - 70% width */
.sovy-content-wrapper .site-main {
    padding-right: 30px;
    box-sizing: border-box;
    width: 100%;
    max-width: 70%;
    flex: 0 0 70%;
}

/* Blog Posts Grid - 2 columns */
.sovy-blog-posts {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    width: 100%;
}

.sovy-blog-post {
    flex: 0 0 50%;
    max-width: 50%;
    box-sizing: border-box;
    padding: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-content {
    padding: 15px;
    background-color: var(--sovy-primary);
    border-radius: 8px;
}

/* Post Thumbnail */
.post-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sovy-blog-post:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* Post Content */
.entry-header {
    padding: 20px;
}

.entry-title {
    margin: 0 0 15px;
    font-size: 1.4rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--sovy-light);
}

.entry-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: var(--wp--preset--color--theme-2);
}

.entry-meta {
    display: flex;
    margin: 0 0 15px;
    padding: 0;
    gap: 10px;
    list-style: none;
}

.entry-meta>* {
    color: var(--sovy-light);
    font-size: 0.85rem;
}

.entry-meta .posted-on {
    color: var(--sovy-light);
    font-weight: 500;
}

.entry-summary {
    padding: 0 20px 20px;
    color: var(--sovy-light);
    line-height: 1.6;
}

.entry-summary p {
    margin: 0 0 15px;
}

.read-more {
    display: inline-block;
    color: var(--sovy-light);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--wp--preset--color--theme-2);
}

/* Sidebar - 30% width */
.sovy-sidebar {
    flex: 0 0 30%;
    max-width: 30%;
    box-sizing: border-box;
    padding-left: 30px;
}

/* Responsive */
@media (max-width: 992px) {

    .sovy-blog-container,
    .sovy-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
    }

    .sovy-blog-post {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .sovy-content-wrapper {
        padding: 20px 15px;
    }

    .sovy-blog-post {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .entry-title {
        font-size: 1.2rem;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 50px 0 20px;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.pagination li {
    margin: 0 4px 8px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border-radius: 4px;
    background: var(--sovy-light);
    color: var(--sovy-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--sovy-light);
    font-size: 0.95rem;
    font-weight: 500;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--sovy-primary);
    color: var(--sovy-light);
    border-color: var(--sovy-primary);
}

.blog .site-content,
.single-post .site-content,
.search .site-content,
.archive .site-content {
    background: var(--sovy-light);
}

.sovy-sidebar .widget_categories ul {
    padding-left: 15px;
}

.sovy-sidebar .widget_categories ul li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sovy-sidebar .widget_categories ul li a {
    font-weight: 600;
    color: var(--sovy-dark);
    text-decoration: none;
    transition: color .3s;
    display: inline-block;
    padding: 7px 10px;
    line-height: 1;
    transition: all ease-in-out .6s;
}

.sovy-sidebar .widget_categories ul li a:hover {
    color: var(--sovy-primary);
    padding-left: 15px;
}

.sovy-sidebar .widget_categories ul li:before {
    content: '';
    background-image: var(--sovy-favicon);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 15px;
    height: 15px;
}

/* No Results Styling */
.no-results-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

.no-results-content {
    max-width: 500px;
    padding: 40px;
    background: var(--sovy-light);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.no-results-icon {
    font-size: 48px;
    color: var(--sovy-primary);
    margin-bottom: 20px;
}

.no-results-title {
    color: var(--sovy-dark);
    font-size: 1.75rem;
    margin: 0 0 15px;
    font-weight: 600;
}

.no-results-description {
    color: var(--sovy-gray);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .no-results-content {
        padding: 30px 20px;
    }

    .no-results-title {
        font-size: 1.5rem;
    }

    .no-results-description {
        font-size: 1rem;
    }

    .no-results-icon {
        font-size: 40px;
    }
}

.single-post .sovy-blog-posts .post-thumbnail {
    margin-bottom: 30px;
}

.single-post .sovy-blog-posts .entry-meta .posted-on {
    color: var(--sovy-primary);
}

.single-post .sovy-blog-posts .entry-meta>* {
    color: var(--sovy-secondary);
}

.single-post .comments-area {
    margin-top: 30px;
    width: 100%;
}

.single-post .comments-area h2 {
    margin-top: 0;
}

.single-post .sovy-blog-posts .sovy-single-post {
    width: 100%;
}

/* =========================================
   Comments Section
   ========================================= */

/* Comment Respond Container */
.comment-respond {
    margin: 2.5rem 0;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Comment Title */
.comment-reply-title {
    font-size: 1.5rem;
    color: var(--sovy-dark);
    margin: 0 0 1.5rem;
    padding: 0;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.comment-reply-title small {
    font-size: 0.7em;
    font-weight: normal;
    margin-left: auto;
}

#cancel-comment-reply-link {
    color: #6c757d;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

#cancel-comment-reply-link:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .comment-reply-title {
        color: #f8f9fa;
    }

    #cancel-comment-reply-link {
        background: #2d3748;
        border-color: #4a5568;
        color: #a0aec0;
    }

    #cancel-comment-reply-link:hover {
        background: #4a5568;
        color: #f8f9fa;
    }
}

.comment-reply-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--sovy-secondary);
}

/* Comment Form */
.comment-form {
    display: grid;
    gap: 1.5rem;
}

.comment-notes {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Form Fields */
.comment-form-comment {
    margin-bottom: 0;
}

.comment-form-comment label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--sovy-dark);
    font-size: 1rem;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 1.125rem;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    min-height: 160px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
}

.comment-form-comment textarea:focus {
    border-color: var(--sovy-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--sovy-primary-rgb), 0.1);
}

/* Submit Button */
.form-submit {
    margin: 1.25rem 0 0;
}

.form-submit .submit {
    background: var(--sovy-primary);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: var(--sovy-body-font-size);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.form-submit .submit:hover {
    background: var(--sovy-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Logged In User Info */
.logged-in-as {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #495057;
    border-left: 3px solid var(--sovy-primary);
}

.logged-in-as a {
    color: var(--sovy-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.logged-in-as a:hover {
    background-color: rgba(var(--sovy-primary-rgb), 0.1);
    text-decoration: none;
}

.required-field-message {
    margin-left: auto;
    font-size: 0.85em;
    color: #6c757d;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

/* Form Validation */
.comment-form .error {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 0.25rem;
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .comment-respond {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .comment-reply-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
    }

    .comment-form {
        gap: 1.25rem;
    }

    .logged-in-as {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .required-field-message {
        margin: 8px 0 0 0;
        padding-top: 8px;
        border-top: 1px solid #e9ecef;
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .comment-respond {
        background: #2d3748;
        border-color: #4a5568;
    }

    .comment-reply-title {
        color: #f7fafc;
    }

    .comment-form-comment label {
        color: #e2e8f0;
    }

    .comment-form-comment textarea {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .logged-in-as {
        background: #2d3748;
        color: #e2e8f0;
    }
}

/* Comments List */
.comments-title {
    font-size: 1.75rem;
    color: var(--sovy-dark);
    margin: 3rem 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--sovy-primary);
    position: relative;
    font-weight: 700;
}

.comments-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--sovy-secondary);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem;
}

.comment {
    position: relative;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.comment:last-child {
    border-bottom: none;
}

/* Comment Body */
.comment-body {
    position: relative;
    padding-left: 20px;
}

/* Comment Author */
.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.comment-author .avatar {
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid var(--sovy-primary);
    padding: 2px;
}

.comment-author .fn {
    font-style: normal;
    color: var(--sovy-dark);
}

.comment-author .fn a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.comment-author .fn a:hover {
    color: var(--sovy-primary);
}

.comment-author .says {
    font-weight: normal;
    color: #6c757d;
    margin-left: 5px;
    font-size: 0.9em;
}

/* Comment Metadata */
.comment-metadata {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.comment-metadata a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.comment-metadata a:hover {
    color: var(--sovy-primary);
}

.comment-edit-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8em;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.comment-edit-link:hover {
    background: var(--sovy-primary);
    color: var(--sovy-light) !important;
}

/* Comment Content */
.comment-content {
    margin: 1rem 0;
    line-height: 1.7;
    color: var(--sovy-dark);
}

.comment-content p {
    margin: 0 0 1rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* Reply Link */
.reply {
    margin-top: 1rem;
}

.comment-reply-link {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--sovy-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(var(--sovy-primary-rgb), 0.1);
    transition: all 0.2s ease;
}

.comment-reply-link:hover {
    background: var(--sovy-primary);
    color: white;
    transform: translateY(-1px);
}

/* Nested Comments */
.children {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 1.5rem;
    border-left: 2px solid rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .comment-body {
        padding-left: 0;
    }

    .comment-author {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-author .avatar {
        margin-bottom: 10px;
    }

    .children {
        padding-left: 1.5rem;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .comments-title {
        color: #f7fafc;
    }

    .comment {
        border-color: rgba(255, 255, 255, 0.1);
    }

    .comment-author .fn,
    .comment-content {
        color: #e2e8f0;
    }

    .comment-author .says,
    .comment-metadata,
    .comment-metadata a {
        color: #a0aec0;
    }

    .comment-edit-link {
        background: #2d3748;
        color: #a0aec0;
    }

    .comment-edit-link:hover {
        background: var(--sovy-primary);
        color: white;
    }

    .children {
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Search Block Styles */
.wp-block-search {
    margin: 1.5rem 0;
    max-width: 100%;
}

.wp-block-search__inside-wrapper {
    display: flex;
    max-width: 100%;
    gap: 10px;
}

.wp-block-search__input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #583225;
    border-radius: 3px 0 0 3px;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    transition: border-color 0.3s ease;
    height: 48px;
    width: 100%;
}

.wp-block-search__input:focus {
    outline: none;
    border-color: #7a4a3a;
    box-shadow: 0 0 0 2px rgba(88, 50, 37, 0.2);
}

.wp-block-search__button {
    background-color: #583225;
    color: white;
    border: 1px solid #583225;
    border-radius: 0 3px 3px 0;
    padding: 0 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-block-search__button:hover {
    background-color: #7a4a3a;
    border-color: #7a4a3a;
}

.wp-block-search__button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(88, 50, 37, 0.3);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wp-block-search__input {
        background-color: #2d2d2d;
        color: #f5f5f5;
        border-color: #4a4a4a;
    }

    .wp-block-search__input::placeholder {
        color: #a0a0a0;
    }

    .wp-block-search__button {
        background-color: #7a4a3a;
        border-color: #7a4a3a;
    }

    .wp-block-search__button:hover {
        background-color: #8f5b49;
        border-color: #8f5b49;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .wp-block-search__inside-wrapper {
        flex-direction: column;
    }

    .wp-block-search__input {
        border-radius: 3px 3px 0 0;
        width: 100%;
    }

    .wp-block-search__button {
        border-radius: 0 0 3px 3px;
        width: 100%;
        margin-top: -1px;
    }
}