/* --- Layout & Container --- */
.site-main .s-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.content-area {
    flex: 1;
    min-width: 0;
    /* Prevents flex items from overflowing */
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* --- Page Header (Archive Title) --- */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--mint-bg);
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
}

.page-title span {
    color: var(--primary-green);
}

/* --- Blog Post Card --- */
article.post {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(11, 62, 39, 0.05);
}

.entry-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
}

.entry-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.entry-title a:hover {
    color: var(--primary-green);
}

/* --- Entry Meta (Date, Author, etc.) --- */
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-gray);
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.entry-meta i {
    color: var(--primary-green);
    font-size: 14px;
}

.entry-meta a {
    color: var(--text-gray);
    text-decoration: none;
}

.entry-meta a:hover {
    color: var(--primary-green);
}

/* --- Post Content & Read More --- */
.entry-content p {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-green);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.read-more:hover i {
    transform: translateX(5px);
}

.read-more i {
    transition: transform 0.2s;
}

/* --- Sidebar Widgets --- */
.widget {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
}

.widget-title,
.wp-block-heading {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--text-dark);
    margin-bottom: 20px !important;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--mint-bg);
}

.widget ul,
.widget ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li,
.widget ol li {
    padding: 10px 0;
    border-bottom: 1px solid #f9fafb;
    font-size: 14px;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.2s;
}

.widget a:hover {
    color: var(--primary-green);
    padding-left: 5px;
}

/* --- Search Widget Customization --- */
.wp-block-search__label {
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.wp-block-search__inside-wrapper {
    display: flex;
    gap: 5px;
}

.wp-block-search__input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.wp-block-search__button {
    background: var(--primary-green) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600;
    cursor: pointer;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .sidebar {
        width: 100%;
    }

    .site-main .s-container {
        flex-direction: column;
    }
}

/* --- Tazaj Mart Comments & Threading --- */

/* 1. Headings & Layout */
#comments,
#reply-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 50px 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--mint-bg);
}

.commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.commentlist li.comment {
    margin-bottom: 20px;
    position: relative;
}

/* 2. Comment Card Design */
.comment-body {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    position: relative;
    z-index: 2;
    /* Keeps card above the branch lines */
    transition: all 0.3s ease;
}

.comment-body:hover {
    border-color: var(--primary-green);
    box-shadow: 0 8px 20px rgba(11, 62, 39, 0.05);
}

/* Author & Meta */
.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.comment-author .avatar {
    border-radius: 50%;
    border: 2px solid var(--mint-bg);
    width: 45px;
    height: 45px;
}

.comment-author .fn {
    font-weight: 700;
    color: var(--text-dark);
    font-style: normal;
}

.comment-metadata {
    margin-left: 60px;
    margin-top: -12px;
    margin-bottom: 15px;
}

.comment-metadata a {
    font-size: 12px;
    color: var(--text-gray);
    text-decoration: none;
}

.comment-content {
    margin-left: 60px;
    color: #4b5563;
    line-height: 1.6;
}

.reply {
    margin-left: 60px;
    margin-top: 15px;
}

.comment-reply-link {
    display: inline-block;
    background: var(--mint-bg);
    color: var(--primary-green);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
}

.comment-reply-link:hover {
    background: var(--primary-green);
    color: #fff;
}

/* --- 3. The Curved Branching Design --- */

/* The vertical "trunk" line */
.commentlist .children {
    list-style: none;
    padding-left: 60px;
    /* Space for the line */
    margin-top: 10px;
    position: relative;
}

.commentlist .children::before {
    content: "";
    position: absolute;
    top: -20px;
    /* Starts from parent card */
    left: 30px;
    width: 2px;
    height: calc(100% - 130px);
    background-color: var(--primary-green);
}

/* The curved "branch" arrow for each reply */
.commentlist .children li.comment::before {
    content: "";
    position: absolute;
    top: 45px;
    /* Aligns with middle of child avatar */
    left: -30px;
    width: 30px;
    height: 20px;
    border-left: 2px solid var(--primary-green);
    border-bottom: 2px solid var(--primary-green);
    border-bottom-left-radius: 15px;
    z-index: 1;
}

/* Stop the line at the last reply */
.commentlist .children li.comment:last-child::before {
    border-left: 2px solid var(--primary-green);
}

/* --- 4. Updated Comment Form Styling --- */
#respond {
    background: #f9fafb;
    padding: 40px;
    border-radius: var(--radius);
    margin-top: 60px;
    border: 1px solid var(--border-color);
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-notes,
.email-notes {
    font-size: 13px;
    color: var(--text-gray);
}

/* Input Fields (Name, Email, Website, Comment) */
.comment-form label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    transition: all 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(11, 62, 39, 0.05);
}

/* Cookies Consent Checkbox */
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.comment-form-cookies-consent input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--primary-green);
}

.comment-form-cookies-consent label {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.4;
}

/* Submit Button */
.form-submit .submit {
    background: var(--primary-green);
    color: #fff;
    border: none;
    padding: 16px 40px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    width: auto;
    min-width: 200px;
}

.form-submit .submit:hover {
    background: #082f1d;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 62, 39, 0.15);
}

/* --- 5. Responsive Fixes --- */
@media (max-width: 768px) {
    .commentlist .children {
        padding-left: 20px;
    }

    .commentlist .children::before,
    .commentlist .children li.comment::before {
        display: none;
        /* Lines take up too much space on mobile */
    }

    .comment-metadata,
    .comment-content,
    .reply {
        margin-left: 0;
    }

    #respond {
        padding: 25px;
    }

    .form-submit .submit {
        width: 100%;
    }
}