/* Static pages (/pages, /pages/{slug}) */
.pg {
    --pg-navy: #110e3f;
    --pg-navy-deep: #090823;
    --pg-orange: #f68216;
    --pg-orange-dark: #e06f08;
    --pg-muted: #595959;
    --pg-border: #e6e8ee;
    --pg-bg: #f5f4f9;
    background: var(--pg-bg);
    padding-bottom: 56px;
}

/* Hero */
.pg-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 40px 0 96px;
    background: linear-gradient(160deg, var(--pg-navy) 0%, var(--pg-navy-deep) 100%);
}

.pg-hero::before,
.pg-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.pg-hero::before {
    width: 380px;
    height: 380px;
    top: -170px;
    left: -110px;
    border: 56px solid rgba(246, 130, 22, .12);
}

.pg-hero::after {
    width: 260px;
    height: 260px;
    bottom: -140px;
    right: 8%;
    background: rgba(255, 255, 255, .05);
}

.pg-hero .container {
    position: relative;
    z-index: 1;
}

.pg-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
}

.pg-breadcrumb a {
    color: rgba(255, 255, 255, .8);
    transition: color .15s;
}

.pg-breadcrumb a:hover {
    color: var(--pg-orange);
}

.pg-breadcrumb li + li::before {
    content: "‹";
    margin-left: 6px;
    color: rgba(255, 255, 255, .4);
}

.pg-hero__title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.6;
    margin: 0;
}

.pg-hero__title::after {
    content: "";
    display: block;
    width: 52px;
    height: 4px;
    border-radius: 4px;
    background: var(--pg-orange);
    margin-top: 14px;
}

.pg-hero__text {
    max-width: 640px;
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 2;
    color: rgba(255, 255, 255, .72);
}

.pg-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.pg-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
}

.pg-chip i {
    color: var(--pg-orange);
}

.pg-body {
    margin-top: -64px;
    position: relative;
    z-index: 2;
}

/* Index: search + grid */
.pg-search {
    position: relative;
    max-width: 520px;
    margin: 0 auto 28px;
}

.pg-search input {
    width: 100%;
    height: 56px;
    padding: 0 52px 0 20px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: #fff;
    font-size: 15px;
    color: var(--pg-navy);
    box-shadow: 0 16px 40px rgba(17, 14, 63, .12);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.pg-search input:focus {
    border-color: var(--pg-orange);
    box-shadow: 0 16px 40px rgba(17, 14, 63, .12), 0 0 0 4px rgba(246, 130, 22, .14);
}

.pg-search i {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: #9a9bb0;
}

.pg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.pg-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--pg-border);
    border-radius: 18px;
    color: var(--pg-navy);
    box-shadow: 0 6px 18px rgba(17, 14, 63, .05);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.pg-card:hover {
    color: var(--pg-navy);
    transform: translateY(-4px);
    border-color: rgba(246, 130, 22, .45);
    box-shadow: 0 18px 36px rgba(17, 14, 63, .12);
}

.pg-card__media {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--pg-orange);
    background: rgba(246, 130, 22, .12);
    transition: background-color .2s, color .2s;
}

.pg-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pg-card:hover .pg-card__media:not(:has(img)) {
    background: var(--pg-orange);
    color: #fff;
}

.pg-card__title {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.8;
}

.pg-card__arrow {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--pg-navy);
    background: var(--pg-bg);
    transition: background-color .2s, color .2s, transform .2s;
}

.pg-card:hover .pg-card__arrow {
    background: var(--pg-navy);
    color: #fff;
    transform: translateX(-3px);
}

.pg-empty {
    text-align: center;
    padding: 48px 16px;
    background: #fff;
    border-radius: 18px;
    color: var(--pg-muted);
}

.pg-empty i {
    display: block;
    font-size: 36px;
    color: #c5c6d4;
    margin-bottom: 12px;
}

/* Show: layout */
.pg-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.pg-article {
    background: #fff;
    border-radius: 22px;
    padding: 40px 44px;
    box-shadow: 0 18px 44px rgba(17, 14, 63, .08);
}

.pg-article__cover {
    margin: -40px -44px 32px;
    border-radius: 22px 22px 0 0;
    overflow: hidden;
    max-height: 340px;
}

.pg-article__cover img {
    width: 100%;
    height: 100%;
    max-height: 340px;
    object-fit: cover;
    display: block;
}

.pg-aside {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pg-box {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(17, 14, 63, .06);
}

.pg-box__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--pg-navy);
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--pg-border);
}

.pg-box__title i {
    color: var(--pg-orange);
}

.pg-links {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 360px;
    overflow-y: auto;
}

.pg-links a {
    display: block;
    position: relative;
    padding: 8px 14px 8px 8px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--pg-muted);
    transition: background-color .15s, color .15s;
}

.pg-links a::before {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c5c6d4;
    transform: translateY(-50%);
    transition: background-color .15s;
}

.pg-links a:hover,
.pg-links a.is-active {
    color: var(--pg-navy);
    background: var(--pg-bg);
}

.pg-links a:hover::before,
.pg-links a.is-active::before {
    background: var(--pg-orange);
}

.pg-links .is-sub a {
    padding-right: 26px;
    font-size: 13px;
}

.pg-links .is-sub a::before {
    right: 16px;
}

.pg-help {
    color: #fff;
    background: linear-gradient(160deg, var(--pg-navy) 0%, var(--pg-navy-deep) 100%);
}

.pg-help p {
    font-size: 13px;
    line-height: 2;
    color: rgba(255, 255, 255, .72);
    margin: 6px 0 16px;
}

.pg-help .btn {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--pg-orange);
    border-color: var(--pg-orange);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pg-help .btn:hover {
    background: var(--pg-orange-dark);
    border-color: var(--pg-orange-dark);
}

/* Show: rich-text content from the editor */
.pg-content {
    font-size: 15px;
    line-height: 2.1;
    color: #3a3a4a;
    overflow-wrap: break-word;
}

.pg-content > *:first-child {
    margin-top: 0;
}

.pg-content h1,
.pg-content h2,
.pg-content h3,
.pg-content h4 {
    color: var(--pg-navy);
    font-weight: 800;
    line-height: 1.7;
    margin: 32px 0 12px;
    scroll-margin-top: 24px;
}

.pg-content h1,
.pg-content h2 {
    font-size: 21px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pg-content h1::before,
.pg-content h2::before {
    content: "";
    flex: 0 0 6px;
    height: 22px;
    border-radius: 4px;
    background: var(--pg-orange);
}

.pg-content h3 {
    font-size: 18px;
}

.pg-content h4 {
    font-size: 16px;
}

.pg-content p {
    margin: 0 0 14px;
    text-align: justify;
}

.pg-content a {
    color: var(--pg-orange-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.pg-content ul,
.pg-content ol {
    padding-right: 22px;
    margin: 0 0 16px;
}

.pg-content li {
    margin-bottom: 6px;
}

.pg-content ul li::marker {
    color: var(--pg-orange);
}

.pg-content ol li::marker {
    color: var(--pg-navy);
    font-weight: 700;
}

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

.pg-content blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    border-right: 4px solid var(--pg-orange);
    border-radius: 12px;
    background: rgba(246, 130, 22, .07);
    color: var(--pg-navy);
}

.pg-content blockquote p:last-child {
    margin-bottom: 0;
}

.pg-content hr {
    border: 0;
    border-top: 1px dashed var(--pg-border);
    margin: 28px 0;
    opacity: 1;
}

.pg-content table {
    width: 100%;
    margin: 20px 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--pg-border);
    border-radius: 14px;
    overflow: hidden;
    font-size: 14px;
}

.pg-content th,
.pg-content td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--pg-border);
    vertical-align: top;
}

.pg-content tr:last-child td {
    border-bottom: 0;
}

.pg-content thead th,
.pg-content tr:first-child th {
    color: #fff;
    background: var(--pg-navy);
    font-weight: 700;
}

.pg-content tbody tr:nth-child(even) {
    background: #fafafc;
}

.pg-table-wrap {
    overflow-x: auto;
}

.pg-edit {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

@media (max-width: 991.98px) {
    .pg-layout {
        grid-template-columns: 1fr;
    }

    .pg-aside {
        position: static;
    }

    .pg-toc-box {
        order: -1;
    }
}

@media (max-width: 767.98px) {
    .pg-hero {
        padding: 28px 0 84px;
    }

    .pg-hero__title {
        font-size: 23px;
    }

    .pg-article {
        padding: 28px 20px;
        border-radius: 18px;
    }

    .pg-article__cover {
        margin: -28px -20px 24px;
        border-radius: 18px 18px 0 0;
    }

    .pg-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pg-card {
        padding: 14px 16px;
    }
}

/* Contact us */
.pg-contact {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.pg-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pg-info__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--pg-border);
    border-radius: 18px;
    color: var(--pg-navy);
    box-shadow: 0 10px 30px rgba(17, 14, 63, .06);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

a.pg-info__item:hover {
    color: var(--pg-navy);
    transform: translateY(-3px);
    border-color: rgba(246, 130, 22, .45);
    box-shadow: 0 16px 34px rgba(17, 14, 63, .1);
}

.pg-info__icon {
    flex: 0 0 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--pg-orange);
    background: rgba(246, 130, 22, .12);
    transition: background-color .2s, color .2s;
}

a.pg-info__item:hover .pg-info__icon {
    color: #fff;
    background: var(--pg-orange);
}

.pg-info__label {
    display: block;
    font-size: 12px;
    color: var(--pg-muted);
    margin-bottom: 2px;
}

.pg-info__value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.pg-info__value[dir="ltr"] {
    text-align: right;
}

.pg-info .pg-help .pg-content {
    color: rgba(255, 255, 255, .8);
    font-size: 14px;
}

.pg-info .pg-help .pg-content * {
    color: inherit;
}

.pg-info .pg-help .pg-content .fw-bold {
    color: #fff;
    font-size: 16px;
}

.pg-info .pg-help .pg-content .caption-color {
    display: inline-block;
    padding: 2px 12px;
    margin-bottom: 8px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--pg-orange);
    background: rgba(246, 130, 22, .15);
}

.pg-form__head {
    margin-bottom: 28px;
}

.pg-form__head h2 {
    font-size: 21px;
    font-weight: 800;
    color: var(--pg-navy);
    margin: 0 0 6px;
}

.pg-form__head p {
    margin: 0;
    font-size: 14px;
    color: var(--pg-muted);
}

.pg-field {
    margin-bottom: 20px;
}

.pg-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pg-navy);
}

.pg-field label .req {
    color: var(--pg-orange);
}

.pg-input {
    position: relative;
}

.pg-input i {
    position: absolute;
    right: 16px;
    top: 17px;
    color: #9a9bb0;
    pointer-events: none;
    transition: color .15s;
}

.pg-input input,
.pg-input textarea {
    width: 100%;
    padding: 12px 44px 12px 16px;
    font-size: 15px;
    color: var(--pg-navy);
    background: #fafafc;
    border: 1px solid var(--pg-border);
    border-radius: 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.pg-input input {
    height: 50px;
}

.pg-input textarea {
    min-height: 160px;
    resize: vertical;
}

.pg-input input:focus,
.pg-input textarea:focus {
    border-color: var(--pg-orange);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(246, 130, 22, .12);
}

.pg-input:focus-within i {
    color: var(--pg-orange);
}

.pg-field.has-error .pg-input input,
.pg-field.has-error .pg-input textarea {
    border-color: #dc3545;
}

.pg-field .text-danger {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 400;
}

.pg-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 200px;
    height: 52px;
    padding: 0 32px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--pg-orange);
    box-shadow: 0 10px 20px rgba(246, 130, 22, .25);
    transition: background-color .15s, transform .15s;
}

.pg-submit:hover,
.pg-submit:focus {
    background: var(--pg-orange-dark);
    transform: translateY(-1px);
}

.pg-submit:disabled {
    opacity: .7;
    transform: none;
}

@media (max-width: 991.98px) {
    .pg-contact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .pg-submit {
        width: 100%;
    }
}
