/* =====================================================
   PARIMAH THEME - SINGLE POST
   -----------------------------------------------------
   01. Reading progress   02. Post header
   03. Layout             04. Post content
   05. Sidebar            06. Related posts
   07. Comments           08. Responsive
   (header band base: components/page-banner.css)
===================================================== */

.single-post {
    --single-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    background: #FCF9F3;
    color: #26344A;
    direction: rtl;
}

.single-post .screen-reader-text,
.post-sidebar .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


/* 01. READING PROGRESS */

.reading-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100001;
    height: 3px;
    background: transparent;
    pointer-events: none;
}

.reading-progress__bar {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, #E6C987, #A98135);
    transform: scaleX(0);
    transform-origin: right center;
}


/* 02. POST HEADER */

.post-header__container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    text-align: right;
}

.post-header__category {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 14px;
    border-radius: 9999px;
    background: #142B45;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.35s var(--single-ease);
}

.post-header__category:hover {
    background: #A98135;
    color: #ffffff;
}

.post-header__title {
    margin: 0 0 14px;
    color: #142B45;
    font-size: 34px;
    font-weight: 900;
    line-height: 1.6;
}

.post-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    padding: 0;
    color: #5E6773;
    font-size: 13px;
    list-style: none;
}

.post-header__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-header__meta-item svg {
    width: 17px;
    height: 17px;
    color: #B18A50;
}


/* 03. LAYOUT */

.single-post__layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 28px;
    width: 100%;
    max-width: 1280px;
    margin: -34px auto 0;
    padding: 0 20px 50px;
}

.single-post__main {
    min-width: 0;
}

.single-post__sidebar {
    align-self: stretch;
}


/* 04. POST CONTENT */

.post-content {
    overflow: hidden;
    border: 1px solid #EDE5D8;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(20, 43, 69, 0.06);
}

.post-content__media {
    margin: 0;
    aspect-ratio: 16 / 8.5;
    overflow: hidden;
    background: #F2E5CB;
}

.post-content__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content__body {
    padding: 32px 36px 20px;
    color: #3A4659;
    font-size: 15.5px;
    line-height: 2.2;
}

.post-content__body > *:first-child {
    margin-top: 0;
}

.post-content__body h2,
.post-content__body h3,
.post-content__body h4 {
    margin: 30px 0 10px;
    color: #142B45;
    font-weight: 800;
    line-height: 1.7;
    scroll-margin-top: 120px;
}

.post-content__body h2 {
    position: relative;
    padding-right: 14px;
    font-size: 22px;
}

.post-content__body h2::before {
    content: "";
    position: absolute;
    top: 0.45em;
    right: 0;
    width: 4px;
    height: 0.95em;
    border-radius: 4px;
    background: #C6A052;
}

.post-content__body h3 {
    font-size: 18px;
}

.post-content__body h4 {
    font-size: 16px;
}

.post-content__body p {
    margin: 0 0 16px;
}

.post-content__body ul,
.post-content__body ol {
    margin: 0 0 18px;
    padding-right: 24px;
}

.post-content__body li {
    margin-bottom: 6px;
}

.post-content__body li::marker {
    color: #C6A052;
}

.post-content__body a {
    color: #A98135;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content__body strong {
    color: #142B45;
}

.post-content__body img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.post-content__body figure {
    margin: 22px 0;
}

.post-content__body figcaption {
    margin-top: 6px;
    color: #8A8174;
    font-size: 12.5px;
    text-align: center;
}

.post-content__body blockquote {
    margin: 22px 0;
    padding: 16px 20px;
    border-right: 4px solid #C6A052;
    border-radius: 12px;
    background: #FBF6EC;
    color: #142B45;
}

.post-content__body table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
    font-size: 14px;
}

.post-content__body th,
.post-content__body td {
    padding: 10px 12px;
    border: 1px solid #EDE5D8;
    text-align: right;
}

.post-content__body th {
    background: #F8F1E6;
    color: #142B45;
}

.post-content__footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 36px;
    padding: 18px 0 26px;
    border-top: 1px solid #F0E9DE;
}

.post-content__tags,
.post-content__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.post-content__tags-label,
.post-content__share-label {
    color: #142B45;
    font-size: 13px;
    font-weight: 700;
}

.post-content__tag {
    padding: 5px 12px;
    border-radius: 9999px;
    background: #F8F1E6;
    color: #6B5A3A;
    font-size: 12.5px;
    text-decoration: none;
    transition:
        background-color 0.35s var(--single-ease),
        color 0.35s var(--single-ease);
}

.post-content__tag:hover {
    background: #142B45;
    color: #ffffff;
}

.post-content__share-link {
    padding: 6px 14px;
    border: 1px solid #E3D3B4;
    border-radius: 9999px;
    background: #ffffff;
    color: #142B45;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.35s var(--single-ease),
        border-color 0.35s var(--single-ease),
        color 0.35s var(--single-ease);
}

.post-content__share-link:hover {
    border-color: #142B45;
    background: #142B45;
    color: #ffffff;
}

.post-content__share-link--copied {
    border-color: #39845B;
    background: #39845B;
    color: #ffffff;
}


/* 05. SIDEBAR */

.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.post-sidebar__box {
    padding: 18px;
    border: 1px solid #EDE5D8;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(20, 43, 69, 0.06);
}

.post-sidebar__title {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #F0E9DE;
    color: #142B45;
    font-size: 16px;
    font-weight: 800;
}

/* Search */

.post-sidebar__search {
    position: relative;
    display: flex;
    padding: 8px;
}

.post-sidebar__search-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: #FAF7F1;
    color: #142B45;
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
}

.post-sidebar__search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: 8px;
    border: 0;
    border-radius: 12px;
    background: #142B45;
    color: #ffffff;
    cursor: pointer;
}

.post-sidebar__search-button svg {
    width: 20px;
    height: 20px;
}

/* Consultation (sticky inside the stretched sidebar column) */

.post-sidebar__consult {
    position: sticky;
    top: 120px;
    order: 9;
    background: #142B45;
    border-color: #142B45;
    color: #ffffff;
}

.post-sidebar__consult-title {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
}

.post-sidebar__consult-text {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12.5px;
    line-height: 1.9;
}

.post-sidebar__notice {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12.5px;
}

.post-sidebar__notice--success {
    background: rgba(57, 132, 91, 0.25);
}

.post-sidebar__notice--error {
    background: rgba(198, 74, 74, 0.3);
}

.post-sidebar__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-sidebar__input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.3s var(--single-ease);
}

.post-sidebar__input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.post-sidebar__input:focus {
    border-color: #D9B66F;
}

.post-sidebar__honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.post-sidebar__submit {
    height: 44px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #E6C987 0%, #C6A052 45%, #A98135 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.35s var(--single-ease);
}

.post-sidebar__submit:hover {
    transform: translateY(-2px);
}

.post-sidebar__phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    color: #EAD6A8;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    direction: ltr;
}

.post-sidebar__phone svg {
    width: 18px;
    height: 18px;
}

/* Latest posts */

.post-sidebar__posts,
.post-sidebar__categories {
    margin: 0;
    padding: 0;
    list-style: none;
}

.post-sidebar__post {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.35s var(--single-ease);
}

.post-sidebar__post:hover {
    background: #F8F1E6;
}

.post-sidebar__post-thumb {
    flex: none;
    width: 66px;
    height: 54px;
    overflow: hidden;
    border-radius: 10px;
    background: #F2E5CB;
}

.post-sidebar__post-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-sidebar__post-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.post-sidebar__post-title {
    display: -webkit-box;
    overflow: hidden;
    color: #142B45;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.8;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-sidebar__post-date {
    color: #A18A64;
    font-size: 11px;
}

/* Categories */

.post-sidebar__category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 10px;
    color: #3A4659;
    font-size: 13.5px;
    text-decoration: none;
    transition:
        background-color 0.35s var(--single-ease),
        color 0.35s var(--single-ease);
}

.post-sidebar__category:hover {
    background: #F8F1E6;
    color: #142B45;
}

.post-sidebar__category-count {
    min-width: 26px;
    padding: 1px 8px;
    border-radius: 9999px;
    background: #F2E5CB;
    color: #6B5A3A;
    font-size: 11.5px;
    text-align: center;
}


/* 06. RELATED POSTS */

.related-posts {
    padding: 10px 20px 50px;
}

.related-posts__container,
.single-post__comments-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.related-posts__heading {
    margin-bottom: 20px;
    text-align: center;
}

.related-posts__eyebrow {
    display: inline-block;
    margin-bottom: 4px;
    color: #B18A50;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.related-posts__title {
    margin: 0;
    color: #142B45;
    font-size: 24px;
    font-weight: 800;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.related-posts__card {
    overflow: hidden;
    border: 1px solid #EDE5D8;
    border-radius: 18px;
    background: #ffffff;
    transition:
        transform 0.5s var(--single-ease),
        box-shadow 0.5s var(--single-ease);
}

.related-posts__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(20, 43, 69, 0.1);
}

.related-posts__image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #F2E5CB;
}

.related-posts__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-posts__body {
    padding: 14px 16px 16px;
}

.related-posts__date {
    color: #A18A64;
    font-size: 11.5px;
}

.related-posts__card-title {
    margin: 4px 0 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.8;
}

.related-posts__card-title a {
    color: #142B45;
    text-decoration: none;
    transition: color 0.35s var(--single-ease);
}

.related-posts__card-title a:hover {
    color: #A98135;
}


/* 07. COMMENTS (WordPress default markup) */

.single-post__comments {
    padding: 0 20px 56px;
}

.single-post__comments-container {
    max-width: 920px;
    padding: 26px 30px;
    border: 1px solid #EDE5D8;
    border-radius: 22px;
    background: #ffffff;
}

.single-post__comments .comments-title,
.single-post__comments .comment-reply-title {
    margin: 0 0 14px;
    color: #142B45;
    font-size: 19px;
    font-weight: 800;
}

.single-post__comments .comment-list {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.single-post__comments .comment-body {
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #FAF7F1;
    font-size: 14px;
    line-height: 2;
}

.single-post__comments textarea,
.single-post__comments input[type="text"],
.single-post__comments input[type="email"],
.single-post__comments input[type="url"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E4DCCF;
    border-radius: 12px;
    background: #FAF7F1;
    font-family: inherit;
    font-size: 14px;
}

.single-post__comments .submit {
    padding: 12px 26px;
    border: 0;
    border-radius: 12px;
    background: #142B45;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}


/* 08. RESPONSIVE */

@media (max-width: 1024px) {

    .single-post__layout {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        height: auto;
    }

    .post-sidebar__consult {
        position: static;
        order: 0;
    }

    .related-posts__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {

    .post-header__title {
        font-size: 24px;
    }

    .post-header__meta {
        font-size: 12px;
    }

    .single-post__layout {
        margin-top: -28px;
        padding: 0 16px 36px;
    }

    .post-content__body {
        padding: 22px 18px 14px;
        font-size: 14.5px;
    }

    .post-content__footer {
        margin: 0 18px;
    }

    .related-posts {
        padding: 0 16px 36px;
    }

    .related-posts__grid {
        grid-template-columns: 1fr;
    }

    .single-post__comments {
        padding: 0 16px 40px;
    }

    .single-post__comments-container {
        padding: 20px 16px;
    }
}
