:root {
    --main-color: rgba(183, 144, 36, 1);
    --secondary-color: rgba(41, 45, 100, 1);
}

.post-details-page {
    background: #f8f9fb;
    padding: 80px 0;
}

.post-details {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.post-details__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    object-position: center;
}


.post-details__content {
    padding: 40px;
}

.post-details__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.post-details__meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

.post-details__meta-item i {
    color: var(--main-color);
}

.post-details__type-badge {
    display: inline-block;
    background: rgba(183, 144, 36, 0.1);
    color: var(--main-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.post-details__title {
    font-size: 36px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 30px;
    line-height: 1.3;
}

.post-details__body {
    font-size: 16px;
    line-height: 1.9;
    color: #4b5563;
}

.post-details__body p {
    margin-bottom: 20px;
}

.post-details__body h2,
.post-details__body h3 {
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-details__body ul,
.post-details__body ol {
    padding-right: 25px;
    margin-bottom: 20px;
}

.post-details__body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}

/* Share Section */
.post-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.post-share__label {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 16px;
}

.post-share__links {
    display: flex;
    gap: 10px;
}

.post-share__link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f8f9fb;
    color: var(--secondary-color);
    font-size: 16px;
    transition: all 0.2s ease;
}

.post-share__link:hover {
    background: var(--main-color);
    color: #fff;
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
}

.related-posts__title {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 30px;
    text-align: center;
}

.related-post-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.related-post-card__img {
    height: 180px;
    overflow: hidden;
}

.related-post-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-card:hover .related-post-card__img img {
    transform: scale(1.05);
}

.related-post-card__content {
    padding: 20px;
}

.related-post-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-card__title a {
    color: inherit;
    text-decoration: none;
}

.related-post-card__title a:hover {
    color: var(--main-color);
}

.related-post-card__date {
    font-size: 13px;
    color: #9ca3af;
}

.related-post-card__category {
    display: inline-flex;
    align-items: center;
    background: rgba(183, 144, 36, 0.1);
    color: var(--main-color);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.related-post-card__excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Back Button */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 30px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--main-color);
}

.back-link i {
    transition: transform 0.2s ease;
}

.back-link:hover i {
    transform: translateX(5px);
}

/* PDF Title */
.pdf-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(41, 45, 100, 0.05) 0%, rgba(183, 144, 36, 0.08) 100%);
    border-right: 4px solid var(--main-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    margin-top: 30px;
}

.pdf-title-icon {
    font-size: 28px;
    color: #e53935;
    flex-shrink: 0;
}

.pdf-title-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.4;
}

/* Gallery Styles */
.gallery-item:hover img {
    transform: scale(1.05);
}

#lightbox-modal button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Flipbook Styles */
/* RTL: Mirror the flipbook so it opens from the right */
#flipbook {
    transform: scaleX(-1);
}

/* Un-mirror the content so pages display correctly */
.my-page canvas {
    transform: scaleX(-1);
}

/* Button hover */
#prev-btn:hover,
#next-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Click zone visual feedback */
#click-zone-left:hover,
#click-zone-right:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* ============================================================
   POST DETAILS — Mobile Responsive
   ============================================================ */
@media (max-width: 767px) {

    .post-details-page {
        padding: 40px 0;
    }

    /* Remove card border-radius on very small screens */
    .post-details {
        border-radius: 12px;
    }

    /* Content padding */
    .post-details__content {
        padding: 20px 16px;
    }

    /* Main title */
    .post-details__title {
        font-size: 22px !important;
        margin-bottom: 20px;
    }

    /* Body text */
    .post-details__body {
        font-size: 15px;
        line-height: 1.8;
    }

    /* Meta row */
    .post-details__meta {
        gap: 12px;
        margin-bottom: 16px;
    }

    /* Gallery grid — 2 columns */
    .post-details__gallery .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Share row */
    .post-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Related posts section */
    .related-posts {
        margin-top: 30px;
    }

    .related-posts__title {
        font-size: 20px !important;
        margin-bottom: 20px;
    }

    /* Related card image smaller */
    .related-post-card__img {
        height: 140px;
    }

    .related-post-card__content {
        padding: 14px;
    }

    .related-post-card__title {
        font-size: 14px;
    }

    .related-post-card__excerpt {
        font-size: 12px;
    }

    /* Flipbook */
    .flipbook-container {
        height: 400px !important;
    }
}

@media (max-width: 576px) {
    .post-details__title {
        font-size: 18px !important;
    }

    /* Gallery grid — 2 columns on small screens */
    .post-details__gallery .col-6.col-md-4.col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}