/* ==========================================================================
   RESOURCE DETAIL PAGE STYLES - payroll.sg
   Reusable for CPF Guide, IRAS Guide, Payroll Guide, Leave Guide
   ========================================================================== */

.pg-doc-wrapper {
    background-color: #080c14;
    color: #f8fafc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Hero Section with Skyline Banner */
.pg-doc-hero {
    position: relative;
    padding-top: calc(var(--header-height, 72px) + 24px);
    padding-bottom: 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #1e293b;
    overflow: hidden;
    min-height: 360px;
}

.pg-doc-hero-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    max-width: 100%;
    min-height: 260px;
}

.pg-doc-hero-content {
    position: relative;
    z-index: 2;
    flex: 1 1 50%;
    max-width: 540px;
    padding-bottom: 24px;
    align-self: center;
}

.pg-doc-hero-title {
    font-size: 40px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.pg-doc-hero-sub {
    font-size: 17px;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
}

.pg-doc-hero-graphic,
.pg-doc-hero-image-box,
.pg-hero-graphic,
.pg-hero-image-box {
    position: relative;
    flex: 1 1 50%;
    max-width: 600px;
    height: 280px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    z-index: 1;
    pointer-events: auto;
}

.pg-doc-hero-img,
.pg-hero-img {
    width: 100%;
    height: 100%;
    max-height: 280px;
    object-fit: cover;
    object-position: right bottom;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: block;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.3) 18%, rgba(0,0,0,0.85) 45%, #000 70%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.3) 18%, rgba(0,0,0,0.85) 45%, #000 70%);
}

.pg-doc-hero-bg {
    display: none;
}

/* 2-Column Content Layout */
.pg-doc-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

/* Left Column: Article Body */
.pg-doc-article {
    background: #0d131f;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 40px 36px;
}

.pg-doc-section {
    margin-bottom: 40px;
}

.pg-doc-section:last-child {
    margin-bottom: 0;
}

.pg-doc-section-heading {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 14px;
    scroll-margin-top: 90px;
}

.pg-doc-text {
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 16px;
}

.pg-doc-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.pg-doc-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 12px;
}

.pg-doc-list-item i {
    color: #00DF89;
    font-size: 14px;
    margin-top: 4px;
    flex-shrink: 0;
}

.pg-doc-inline-link {
    color: #00DF89;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.pg-doc-inline-link:hover {
    gap: 10px;
    text-decoration: underline;
}

/* Article CTA Box */
.pg-doc-cta-box {
    background: #111827;
    border: 1px solid #1f2937;
    border-left: 4px solid #00DF89;
    border-radius: 10px;
    padding: 24px;
    margin-top: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.pg-doc-cta-content h4 {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.pg-doc-cta-content p {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
}

.pg-doc-cta-btn {
    padding: 11px 22px;
    background: #00DF89;
    color: #080c14;
    font-weight: 700;
    font-size: 16px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.pg-doc-cta-btn:hover {
    background: #00fca0;
    color: #080c14;
}

/* Right Column: Sticky Sidebar */
.pg-doc-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pg-doc-sidebar-card {
    background: #0d131f;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 24px;
}

.pg-doc-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.pg-doc-toc-list,
.pg-doc-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pg-doc-toc-item,
.pg-doc-sidebar-item {
    margin-bottom: 12px;
}

.pg-doc-toc-link,
.pg-doc-sidebar-link {
    color: #94a3b8;
    font-size: 16px;
    line-height: 1.4;
    text-decoration: none;
    display: block;
    transition: color 0.2s;
}

.pg-doc-toc-link:hover,
.pg-doc-toc-link.active,
.pg-doc-sidebar-link:hover,
.pg-doc-sidebar-link.active {
    color: #00DF89;
    font-weight: 600;
}

.pg-doc-help-desc {
    font-size: 16px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.pg-doc-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: #111827;
    border: 1px solid #334155;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.pg-doc-whatsapp-btn:hover {
    border-color: #00DF89;
    color: #ffffff;
    background: #1f2937;
}

/* Responsive */
@media (max-width: 991px) {
    .pg-doc-hero {
        min-height: auto;
        padding-bottom: 20px;
    }
    .pg-doc-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        min-height: auto;
        gap: 16px;
    }
    .pg-doc-hero-graphic,
    .pg-doc-hero-image-box,
    .pg-hero-graphic,
    .pg-hero-image-box {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: 200px;
        justify-content: center;
    }
    .pg-doc-hero-img,
    .pg-hero-img {
        max-height: 200px;
        object-position: center;
        -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
    }
    .pg-doc-layout {
        grid-template-columns: 1fr;
    }
    .pg-doc-sidebar {
        position: static;
    }
    .pg-doc-hero-title {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .pg-doc-article {
        padding: 28px 20px;
    }

    .pg-doc-cta-box {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px;
    }

    .pg-doc-cta-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
