.post-item {
    position: relative;
    overflow: hidden;
}

.post-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.55) 55%,
        rgba(0, 0, 0, 0.82) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.post-item .post-item-content p {
    color: rgba(255, 255, 255, 0.84);
}

.before-after-post-image {
    width: 100%;
}

.before-after-slider {
    --position: 50%;
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #111;
    isolation: isolate;
    cursor: ew-resize;
}

.before-after-slider .ba-image {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    pointer-events: none;
}

.before-after-slider .ba-after-image {
    position: relative;
    z-index: 1;
}

.before-after-slider .ba-before-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    clip-path: inset(0 calc(100% - var(--position)) 0 0);
}

.before-after-slider .ba-before-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.before-after-slider .ba-range {
    position: absolute;
    inset: 0;
    z-index: 6;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.before-after-slider .ba-range::-webkit-slider-thumb {
    width: 48px;
    height: 100%;
    cursor: ew-resize;
    appearance: none;
    -webkit-appearance: none;
}

.before-after-slider .ba-range::-moz-range-thumb {
    width: 48px;
    height: 100%;
    border: 0;
    cursor: ew-resize;
}

.before-after-slider .ba-handle {
    position: absolute;
    top: 0;
    left: var(--position);
    z-index: 5;
    width: 0;
    height: 100%;
    transform: translateX(-50%);
    pointer-events: none;
}

.before-after-slider .ba-handle-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.35);
}

.before-after-slider .ba-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.before-after-slider .ba-handle-button::before,
.before-after-slider .ba-handle-button::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-top: 3px solid #1f1f1f;
    border-left: 3px solid #1f1f1f;
}

.before-after-slider .ba-handle-button::before {
    left: 18px;
    transform: translateY(-50%) rotate(-45deg);
}

.before-after-slider .ba-handle-button::after {
    right: 18px;
    transform: translateY(-50%) rotate(135deg);
}

.before-after-slider .ba-label {
    position: absolute;
    top: 22px;
    z-index: 4;
    padding: 8px 14px;
    border-radius: 100px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    pointer-events: none;
}

.before-after-slider .ba-label-before {
    left: 22px;
}

.before-after-slider .ba-label-after {
    right: 22px;
}

.before-after-slider:focus-within .ba-handle-button {
    outline: 3px solid rgba(255, 255, 255, 0.75);
    outline-offset: 4px;
}

@media (max-width: 767px) {
    .before-after-slider {
        border-radius: 14px;
    }

    .before-after-slider .ba-label {
        top: 14px;
        padding: 7px 11px;
        font-size: 12px;
    }

    .before-after-slider .ba-label-before {
        left: 14px;
    }

    .before-after-slider .ba-label-after {
        right: 14px;
    }

    .before-after-slider .ba-handle-button {
        width: 48px;
        height: 48px;
    }

    .before-after-slider .ba-handle-button::before {
        left: 15px;
    }

    .before-after-slider .ba-handle-button::after {
        right: 15px;
    }
}


.post-tag-links {
    margin-top: 50px;
}

.project-navigation {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    width: 100%;
}

.project-nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 92px;
    padding: 22px 24px;
    border: 1px solid rgba(31, 31, 31, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--accent-color);
    text-decoration: none;
    overflow: hidden;
    transition: all 0.35s ease;
}

.project-nav-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(31, 31, 31, 0.06), rgba(31, 31, 31, 0));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.project-nav-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(31, 31, 31, 0.28);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
    color: var(--accent-color);
}

.project-nav-btn:hover::before {
    opacity: 1;
}

.project-nav-next {
    justify-content: flex-end;
    text-align: right;
}

.project-nav-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.project-nav-label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(31, 31, 31, 0.48);
}

.project-nav-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--accent-color);
}

.project-nav-arrow {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    transition: all 0.35s ease;
}

.project-nav-btn:hover .project-nav-arrow {
    transform: scale(1.08);
    background: #000000;
}

@media (max-width: 767px) {
    .post-tag-links {
        margin-top: 35px;
    }

    .project-navigation {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .project-nav-btn {
        min-height: 82px;
        padding: 18px 20px;
        border-radius: 15px;
    }

    .project-nav-title {
        font-size: 17px;
    }

    .project-nav-arrow {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ============================================
   Home Remodeling Project (case study) — supplemental styles
   Only fills gaps; reuses existing .post-entry typography
   ============================================ */

/* Project Snapshot — make the first <ul> after Snapshot read like a spec sheet.
   Targets the snapshot list specifically so other <ul> blocks stay default. */
.post-entry .snapshot-list,
.post-entry ul.snapshot-list {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

.post-entry .snapshot-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.post-entry .snapshot-list li:last-child {
    border-bottom: none;
}

/* CTA button spacing inside the post entry */
.post-entry .btn-default {
    margin-top: 10px;
    display: inline-block;
    color: #ffff;
}

/* Comfortable rhythm between case-study sections */
.post-entry h2 {
    margin-top: 40px;
}

.post-entry h3 {
    margin-top: 24px;
    margin-bottom: 8px;
}

/* Inline links inside the case study (inherit accent, just add affordance) */
.post-entry a:not(.btn-default) {
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.3s ease;
}

.post-entry a:not(.btn-default):hover {
    opacity: 0.75;
}

/* ============================= */
/* Projects Page Extra Sections */
/* ============================= */

.projects-intro-section,
.project-planning-cta-section,
.project-page-faqs {
    padding: 100px 0;
}

.projects-intro-section {
    background: #f8f5f2;
}

.projects-intro-box,
.project-lead-item,
.project-planning-box {
    background: #ffffff;
    border: 1px solid rgba(31, 31, 31, 0.08);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
}

.projects-intro-box {
    padding: 40px;
}

.projects-intro-box h3,
.project-lead-item h3,
.project-planning-box h3 {
    font-size: 24px;
    line-height: 1.3em;
    margin-bottom: 15px;
}

.projects-intro-box p,
.project-lead-item p,
.project-planning-box p {
    margin-bottom: 25px;
}

.project-lead-item {
    height: 100%;
    padding: 34px 30px;
    margin-top: 30px;
    transition: all 0.35s ease;
}

.project-lead-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.09);
}

.project-lead-item h3 {
    font-size: 22px;
}

.project-lead-item p {
    margin-bottom: 0;
}

/* Improve spacing between intro section and project grid */
.page-blog {
    padding-top: 100px;
}

/* ============================= */
/* Project Planning CTA Section */
/* ============================= */

.project-planning-cta-section {
    background: #1f1f1f;
    position: relative;
    overflow: hidden;
}

.project-planning-cta-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 35%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.06), transparent 35%);
    pointer-events: none;
}

.project-planning-cta-section .container {
    position: relative;
    z-index: 1;
}

.project-planning-cta-section ,
.project-planning-cta-section h2,
.project-planning-cta-section p {
    color: #ffffff;
}
.section-sub-title{
    color: var(--accent-color);
}
.project-planning-cta-section p {
    opacity: 0.86;
}

.project-planning-box {
    padding: 40px;
    background: #ffffff;
}

.project-planning-box h3 {
    color: #1f1f1f;
}

.project-planning-box ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.project-planning-box ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 14px;
    color: #4d4d4d;
    line-height: 1.6em;
}

.project-planning-box ul li:last-child {
    margin-bottom: 0;
}

.project-planning-box ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    color: #ffffff;
    background: #1f1f1f;
    border-radius: 50%;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    font-weight: 700;
}

/* ============================= */
/* Project FAQ Section */
/* ============================= */

.project-page-faqs {
    background: #f8f5f2;
}

.project-page-faqs .faq-accordion {
    background: transparent;
}

.project-page-faqs .accordion-item {
    border: 1px solid rgba(31, 31, 31, 0.08);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 18px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.04);
}

.project-page-faqs .accordion-item:last-child {
    margin-bottom: 0;
}

.project-page-faqs .accordion-button {
    padding: 24px 28px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4em;
    color: #1f1f1f;
    background: #ffffff;
    box-shadow: none;
}

.project-page-faqs .accordion-button:not(.collapsed) {
    color: #ffffff;
    background: #1f1f1f;
}

.project-page-faqs .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.project-page-faqs .accordion-body {
    padding: 24px 28px 28px;
}

.project-page-faqs .accordion-body p {
    margin-bottom: 0;
}

.project-page-faqs .accordion-body a {
    font-weight: 700;
    text-decoration: underline;
}

/* ============================= */
/* Responsive */
/* ============================= */

@media only screen and (max-width: 991px) {
    .projects-intro-section,
    .project-planning-cta-section,
    .project-page-faqs {
        padding: 70px 0;
    }

    .page-blog {
        padding-top: 70px;
    }

    .projects-intro-box,
    .project-planning-box {
        padding: 30px;
        margin-top: 30px;
    }

    .project-lead-item {
        margin-top: 24px;
    }
}

@media only screen and (max-width: 767px) {
    .projects-intro-section,
    .project-planning-cta-section,
    .project-page-faqs {
        padding: 55px 0;
    }

    .page-blog {
        padding-top: 55px;
    }

    .projects-intro-box,
    .project-lead-item,
    .project-planning-box {
        border-radius: 18px;
        padding: 26px 22px;
    }

    .projects-intro-box h3,
    .project-planning-box h3 {
        font-size: 22px;
    }

    .project-lead-item h3 {
        font-size: 20px;
    }

    .project-page-faqs .accordion-button {
        padding: 20px 22px;
        font-size: 16px;
    }

    .project-page-faqs .accordion-body {
        padding: 20px 22px 24px;
    }
}