/* ===================================================================
   SENTRYOPEN BLOG POST STYLES — Premium Editorial Layout
   =================================================================== */

/* ---- HERO SECTION ---- */
.post-hero {
    height: 75vh;
    min-height: 540px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    padding-top: 80px;
    padding-bottom: 140px;
    /* ensures meta row is visible above white card */
}

.post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.92) 100%);
    z-index: 1;
}

.post-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
    text-align: center;
    animation: fadeInUp 0.9s ease-out;
}

.post-hero h1 {
    font-size: 3.5rem;
    color: var(--white) !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.15;
    margin: 1.2rem 0 1.8rem;
    font-family: var(--font-secondary);
}

.post-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.post-meta-hero {
    display: flex;
    justify-content: center;
    gap: 25px;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 0.5rem;
}

/* ---- LAYOUT WRAPPER ---- */
.blog-wrapper {
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 10;
    background: #f3f4f8;
    /* subtle page bg so white card pops */
}

.post-content-wrap {
    max-width: 1200px;
    margin: -110px auto 0;
    padding: 0 15px 80px;
    position: relative;
}

/* ---- ARTICLE CARD ---- */
.post-container {
    background: var(--white);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.07), 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 4rem 6rem;
    position: relative;
    margin: 0;
    max-width: 100%;
}

/* back link */
.back-floating {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
    transition: gap 0.3s ease;
    text-decoration: none;
}

.back-floating:hover {
    gap: 14px;
}

/* ---- POST BODY ---- */
.post-body {
    line-height: 1.9;
    color: #3d4a5e;
    font-size: 1.1rem;
}

.post-body .lead {
    font-size: 1.35rem;
    color: #1e293b;
    font-weight: 500;
    margin-bottom: 3rem;
    line-height: 1.65;
}

.post-body h2 {
    font-size: 2rem;
    margin: 4rem 0 1.5rem;
    color: var(--black);
    font-family: var(--font-secondary);
}

.post-body p {
    margin-bottom: 2rem;
    text-align: left;
    color: #3d4a5e;
}

.post-body strong {
    color: var(--black);
}

.post-body ul {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.post-body ul li {
    margin-bottom: 0.75rem;
    color: #3d4a5e;
    font-size: 1.05rem;
    line-height: 1.7;
}

.post-body img {
    width: 100% !important;
    height: auto;
    border-radius: var(--radius-md);
    margin: 3rem 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* Tip box */
.tip-box {
    background: #f0f6ff;
    border-left: 5px solid var(--primary-blue);
    padding: 2.5rem 3rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 3.5rem 0;
}

.tip-box h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Quote box */
.quote-box {
    font-family: var(--font-secondary);
    font-size: 1.6rem;
    font-style: italic;
    color: var(--black);
    border-left: 5px solid var(--primary-blue);
    padding: 1rem 0 1rem 2.5rem;
    margin: 3.5rem 0;
    font-weight: 600;
    line-height: 1.4;
}

/* ---- INLINE CTA ---- */
.cta-inline {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: linear-gradient(135deg, #4F46E5 0%, #818CF8 100%);
    border-radius: var(--radius-md);
    padding: 2.5rem 3rem;
    margin: 4rem 0 0;
    color: var(--white);
}

.cta-inline-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.cta-inline-content {
    flex: 1;
}

.cta-inline-content h3 {
    color: var(--white) !important;
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.cta-inline-content p {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 1rem;
    margin: 0;
}

.cta-inline .btn-primary {
    flex-shrink: 0;
    background: var(--white);
    color: var(--primary-blue);
    border: none;
    white-space: nowrap;
}

.cta-inline .btn-primary:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
}

/* ---- SOCIAL SHARE ---- */
.social-share {
    border-top: 2px solid #e2e8f0;
    margin-top: 4rem;
    padding-top: 2.5rem;
}

.social-share h3 {
    font-size: 1.3rem;
    color: var(--black);
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    color: var(--white);
    text-decoration: none;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #000000;
}

.share-btn.linkedin {
    background: #0A66C2;
}

.share-btn.email {
    background: #64748b;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: var(--white);
}

/* ---- RELATED SECTION — Xentic style ---- */
.related-section {
    padding: 5rem 0 6rem;
    background: var(--white);
    border-top: 1px solid #e8ecf0;
}

.related-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.related-section-inner h2 {
    font-size: 1.6rem;
    color: var(--black);
    border-bottom: 3px solid var(--primary-blue);
    padding-bottom: 12px;
    margin-bottom: 2.5rem;
    display: inline-block;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.related-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid #e4e9f0;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.25);
}

.related-image {
    height: 170px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.related-card:hover .related-image img {
    transform: scale(1.06);
}

.related-content {
    padding: 1.4rem 1.5rem 1.6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1.45;
    margin-bottom: 0.6rem;
    transition: color 0.3s;
}

.related-card:hover h3 {
    color: var(--primary-blue);
}

.related-content .excerpt {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    margin: 0 0 1rem;
}

.related-link {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.related-link i {
    transition: transform 0.3s;
}

.related-card:hover .related-link i {
    transform: translateX(4px);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .post-hero h1 {
        font-size: 2.2rem;
    }

    .post-hero {
        padding-bottom: 120px;
    }

    .post-container {
        padding: 2.5rem 1.8rem;
        border-radius: 16px 16px 0 0;
    }

    .post-content-wrap {
        padding: 0 0 60px;
    }

    .cta-inline {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

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

@media (max-width: 600px) {
    .post-hero {
        min-height: 420px;
    }

    .post-hero h1 {
        font-size: 1.9rem;
    }

    .share-buttons {
        gap: 8px;
    }

    .share-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}