﻿/* ============================================================
   COMPANY POLICY PAGE
============================================================ */

.company-policy-page {
    min-height: 100vh;
    background: #f5f7fb;
    padding-bottom: 60px;
    font-family: "Kanit", sans-serif;
}


/* ============================================================
   HEADER
============================================================ */

.policy-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient( 135deg, #171334 0%, #20204d 55%, #293b73 100% );
    color: #fff;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(23, 19, 52, 0.18);
}


    /* decorative circle */

    .policy-header::before {
        content: "";
        position: absolute;
        width: 220px;
        height: 220px;
        border-radius: 50%;
        right: 7%;
        top: -120px;
        background: rgba(255,255,255,.06);
    }


    .policy-header::after {
        content: "";
        position: absolute;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        right: 25%;
        bottom: -100px;
        background: rgba(255,255,255,.04);
    }


.policy-header-content {
    position: relative;
    z-index: 2;
    max-width: 1250px;
    margin: auto;
    padding: 22px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.policy-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: .2px;
}


.policy-header span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: rgba(255,255,255,.65);
    letter-spacing: .5px;
}


.policy-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.15);
    font-size: 23px;
}


/* ============================================================
   TAB WRAPPER
============================================================ */

.policy-tabs-wrapper {
    max-width: 1250px;
    margin: 0 auto 28px;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}


/* ============================================================
   TAB
============================================================ */

.policy-tab {
    position: relative;
    border: 1px solid #e4e8f0;
    background: #fff;
    border-radius: 14px;
    padding: 17px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 3px 12px rgba(25, 35, 60, .04);
    font-family: "Kanit", sans-serif;
}


    .policy-tab:hover {
        transform: translateY(-2px);
        border-color: #9bb8dd;
        box-shadow: 0 8px 22px rgba(25, 35, 60, .09);
    }


    .policy-tab.active {
        border-color: #2384c6;
        box-shadow: 0 8px 25px rgba(35, 132, 198, .13);
        background: linear-gradient( 135deg, #ffffff, #f5faff );
    }


        /* active bottom line */

        .policy-tab.active::after {
            content: "";
            position: absolute;
            left: 20px;
            right: 20px;
            bottom: -1px;
            height: 3px;
            border-radius: 5px 5px 0 0;
            background: #1687c9;
        }


/* ============================================================
   TAB ICON
============================================================ */

.policy-tab-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #2375aa;
    background: #edf6fc;
    transition: all .25s ease;
}


.policy-tab.active
.policy-tab-icon {
    color: #fff;
    background: linear-gradient( 135deg, #1687c9, #3157a6 );
}


/* ============================================================
   TAB TEXT
============================================================ */

.policy-tab-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}


    .policy-tab-text strong {
        font-size: 15px;
        color: #27354a;
        line-height: 1.4;
        font-weight: 600;
    }


    .policy-tab-text span {
        margin-top: 2px;
        font-size: 11px;
        color: #8994a5;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


/* ============================================================
   CONTENT
============================================================ */

.policy-content {
    max-width: 1180px;
    margin: auto;
    padding: 0 15px;
}


.policy-section {
    animation: policyFadeIn .35s ease;
}


@keyframes policyFadeIn {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   TITLE
============================================================ */

.policy-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}


.policy-title-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 21px;
    background: linear-gradient( 135deg, #1687c9, #3157a6 );
    box-shadow: 0 6px 16px rgba(35, 120, 180, .2);
}


.policy-title h2 {
    margin: 0;
    font-size: 22px;
    color: #222c3d;
    font-weight: 700;
}


.policy-title p {
    margin: 2px 0 0;
    font-size: 12px;
    color: #8791a0;
}


/* ============================================================
   INFO BAR
============================================================ */

.policy-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #fff;
    border: 1px solid #e8ebf1;
    border-radius: 14px;
    padding: 14px 17px;
    margin-bottom: 18px;
    box-shadow: 0 3px 15px rgba(30,40,60,.04);
}


.policy-info-item {
    display: flex;
    align-items: center;
    gap: 11px;
}


    .policy-info-item > i {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #237db5;
        background: #eef7fc;
        font-size: 17px;
    }


    .policy-info-item div {
        display: flex;
        flex-direction: column;
    }


    .policy-info-item small {
        color: #9aa3b1;
        font-size: 10px;
    }


    .policy-info-item strong {
        color: #374151;
        font-size: 13px;
        font-weight: 500;
    }


/* ============================================================
   BUTTONS
============================================================ */

.policy-actions {
    display: flex;
    gap: 8px;
}


.policy-btn {
    min-height: 36px;
    padding: 7px 15px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: "Kanit", sans-serif;
    font-size: 12px;
    text-decoration: none;
    transition: all .2s ease;
}


.policy-btn-primary {
    color: #fff;
    background: linear-gradient( 135deg, #1687c9, #3157a6 );
    border: 1px solid transparent;
}


    .policy-btn-primary:hover {
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 5px 15px rgba(35, 120, 190, .25);
    }


.policy-btn-outline {
    color: #42627c;
    background: #fff;
    border: 1px solid #d8e0e9;
}


    .policy-btn-outline:hover {
        color: #1687c9;
        border-color: #9bc5e2;
        background: #f6fbfe;
    }


/* ============================================================
   DOCUMENT CARD
============================================================ */

.document-card {
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(25,35,55,.07);
}


/* ============================================================
   DOCUMENT CARD HEADER
============================================================ */

.document-card-header {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf0f4;
    background: linear-gradient( 180deg, #ffffff, #fafbfd );
}


.document-label {
    display: block;
    margin-bottom: 2px;
    font-size: 9px;
    font-weight: 600;
    color: #1687c9;
    letter-spacing: 1px;
}


.document-card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #3b4657;
}


.document-pdf-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #d85b5b;
    background: #fff1f1;
}


/* ============================================================
   DOCUMENT VIEWER
============================================================ */

.document-viewer {
    padding: 25px;
    background: #f1f3f7;
    text-align: center;
}


/* ============================================================
   DOCUMENT IMAGE
============================================================ */

.document-image {
    display: block;
    width: 100%;
    max-width: 1080px;
    height: auto;
    margin: 0 auto;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 25px rgba(0,0,0,.14);
    transition: transform .25s ease, box-shadow .25s ease;
}


    .document-image:hover {
        box-shadow: 0 10px 35px rgba(0,0,0,.18);
    }


/* ============================================================
   HIDE
============================================================ */

.d-none {
    display: none !important;
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 900px) {

    .policy-tabs-wrapper {
        grid-template-columns: 1fr;
        gap: 10px;
    }


    .policy-tab {
        padding: 13px 15px;
    }


    .policy-content {
        padding: 0 12px;
    }
}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 600px) {

    .company-policy-page {
        padding-bottom: 30px;
    }


    .policy-header-content {
        padding: 18px 20px;
    }


    .policy-header h1 {
        font-size: 22px;
    }


    .policy-header span {
        font-size: 11px;
    }


    .policy-header-icon {
        width: 40px;
        height: 40px;
        font-size: 19px;
    }


    .policy-tabs-wrapper {
        padding: 0 10px;
        margin-bottom: 20px;
    }


    .policy-tab {
        border-radius: 12px;
        padding: 12px;
    }


    .policy-tab-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }


    .policy-tab-text strong {
        font-size: 13px;
    }


    .policy-title {
        align-items: flex-start;
        gap: 10px;
    }


    .policy-title-icon {
        width: 42px;
        height: 42px;
        border-radius: 11px;
        font-size: 18px;
    }


    .policy-title h2 {
        font-size: 18px;
        line-height: 1.4;
    }


    .policy-title p {
        font-size: 10px;
    }


    .policy-info {
        align-items: stretch;
        flex-direction: column;
        padding: 13px;
        gap: 12px;
    }


    .policy-actions {
        width: 100%;
    }


    .policy-btn {
        flex: 1;
        font-size: 11px;
    }


    .document-card {
        border-radius: 13px;
    }


    .document-card-header {
        padding: 14px 15px;
    }


        .document-card-header h3 {
            font-size: 12px;
            max-width: 250px;
        }


    .document-label {
        font-size: 8px;
    }


    .document-pdf-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }


    .document-viewer {
        padding: 10px;
        overflow-x: auto;
    }


    .document-image {
        border-radius: 3px;
        min-width: 700px;
        max-width: none;
    }
}
