:root {
    --wiz-blue: #46a9e8;
    --wiz-blue-dark: #0879c9;

    --wiz-green: #85c64a;
    --wiz-green-dark: #6fad37;

    --wiz-text: #0f2742;
    --wiz-muted: #607086;

    --wiz-border: #d8e7f1;
    --wiz-soft: #f6fbfe;
    --wiz-white: #ffffff;
}


/* =========================================================
   Container
========================================================= */

.wiz-insurance-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================================
   Insurance Grid
========================================================= */

.wiz-insurance-grid {
    display: grid;
    gap: 24px;
    align-items: stretch;
}

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

.wiz-columns-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.wiz-columns-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.wiz-columns-4 {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}


/* =========================================================
   Insurance Card
========================================================= */

.wiz-insurance-card {
    display: flex;
    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    background:
        var(--wiz-white);

    border:
        1px solid
        var(--wiz-border);

    border-radius: 18px;

    box-shadow:
        0 8px 24px
        rgba(27, 79, 114, 0.05);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.wiz-insurance-card:hover {
    transform:
        translateY(-4px);

    box-shadow:
        0 14px 34px
        rgba(27, 79, 114, 0.10);
}


/* =========================================================
   Card Featured Image
========================================================= */

.wiz-insurance-card__image {
    display: block;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background:
        var(--wiz-soft);
}

.wiz-insurance-card__image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .3s ease;
}

.wiz-insurance-card:hover
.wiz-insurance-card__image img {
    transform:
        scale(1.025);
}


/* =========================================================
   Card Body
========================================================= */

.wiz-insurance-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 24px;
}

.wiz-insurance-card__topline {
    display: flex;

    gap: 10px;

    align-items: center;
    justify-content: space-between;

    min-height: 24px;

    margin-bottom: 8px;
}


/* =========================================================
   Company
========================================================= */

.wiz-insurance-card__company {
    color:
        var(--wiz-blue-dark);

    font-size: 13px;
    font-weight: 700;
}


/* =========================================================
   Card Badge
========================================================= */

.wiz-insurance-card__badge {
    display: inline-flex;

    align-items: center;

    width: fit-content;

    padding: 5px 10px;

    border-radius: 999px;

    background: #eef8e6;

    color: #5d9428;

    font-size: 12px;
    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   Card Title
========================================================= */

.wiz-insurance-card__title {
    margin: 0 0 10px;

    color:
        var(--wiz-text);

    font-size: 21px;

    line-height: 1.35;
}

.wiz-insurance-card__title a {
    color: inherit;

    text-decoration: none;
}


/* =========================================================
   Card Description
========================================================= */

.wiz-insurance-card__description {
    margin: 0 0 18px;

    color:
        var(--wiz-muted);

    line-height: 1.7;
}


/* =========================================================
   Card Highlights
========================================================= */

.wiz-insurance-card__highlights {
    list-style: none;

    margin:
        0 0 22px;

    padding: 0;
}

.wiz-insurance-card__highlights li {
    position: relative;

    padding:
        11px
        0
        11px
        28px;

    border-bottom:
        1px dashed #dce9f2;

    color:
        var(--wiz-text);

    line-height: 1.55;
}

.wiz-insurance-card__highlights li::before {
    content: '✓';

    position: absolute;

    left: 2px;
    top: 11px;

    color:
        var(--wiz-blue);

    font-weight: 700;
}

.wiz-insurance-card__footer {
    margin-top: auto;
}


/* =========================================================
   Buttons
========================================================= */

.wiz-insurance-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding:
        10px 22px;

    border:
        1px solid
        var(--wiz-blue);

    border-radius: 999px;

    background:
        var(--wiz-white);

    color:
        var(--wiz-blue-dark);

    font-weight: 700;

    line-height: 1.3;

    text-decoration:
        none !important;

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.wiz-insurance-button:hover {
    border-color:
        var(--wiz-blue);

    background:
        var(--wiz-blue);

    color:
        var(--wiz-white);

    transform:
        translateY(-1px);
}


/*
 * Purchase Button
 */

.wiz-insurance-button--primary {
    border-color:
        var(--wiz-green);

    background:
        var(--wiz-green);

    color: #173600;
}

.wiz-insurance-button--primary:hover {
    border-color:
        var(--wiz-green-dark);

    background:
        var(--wiz-green-dark);

    color:
        var(--wiz-white);
}


/* =========================================================
   Empty State
========================================================= */

.wiz-insurance-empty {
    padding: 30px;

    border:
        1px solid
        var(--wiz-border);

    border-radius: 14px;

    background:
        var(--wiz-soft);

    color:
        var(--wiz-muted);

    text-align: center;
}


/* =========================================================
   Archive
========================================================= */

.wiz-insurance-archive {
    padding:
        70px 0;

    background:
        var(--wiz-white);
}

.wiz-insurance-archive__header {
    max-width: 780px;

    margin:
        0 auto 45px;

    text-align: center;
}

.wiz-insurance-archive__header h1 {
    margin:
        0
        0
        14px;

    color:
        var(--wiz-text);
}

.wiz-insurance-archive__description {
    color:
        var(--wiz-muted);

    line-height: 1.7;
}

.wiz-insurance-pagination {
    margin-top: 45px;
}


/* =========================================================
   Single Insurance Detail
========================================================= */

.wiz-plan-single {
    padding:
        64px 0 80px;

    background:
        var(--wiz-white);
}


/* =========================================================
   Plan Header / Hero
========================================================= */

.wiz-plan-hero {
    max-width: 920px;

    margin:
        0 auto 76px;

    padding:
        42px 46px;

    border:
        1px solid
        rgba(70, 169, 232, 0.12);

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            rgba(246, 251, 254, .95) 0%,
            rgba(250, 253, 247, .95) 100%
        );
}

.wiz-plan-hero__content {
    padding: 0;
}


/* =========================================================
   Plan Meta
========================================================= */

.wiz-plan-hero__meta {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 12px;

    margin-bottom: 13px;
}

.wiz-plan-company {
    color:
        var(--wiz-blue-dark);

    font-size: 14px;
    font-weight: 700;
}

.wiz-plan-badge {
    display: inline-flex;

    padding: 5px 10px;

    border-radius: 999px;

    background: #eef8e6;

    color: #5d9428;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   Plan Title
========================================================= */

.wiz-plan-title {
    margin:
        0
        0
        14px !important;

    color:
        var(--wiz-text);

    font-size:
        clamp(
            36px,
            4.5vw,
            54px
        );

    line-height: 1.15;
}


/* =========================================================
   Plan Description
========================================================= */

.wiz-plan-description {
    max-width: 760px;

    margin:
        0
        0
        18px;

    color:
        var(--wiz-muted);

    font-size: 17px;

    line-height: 1.75;
}


/* =========================================================
   Plan Categories
========================================================= */

.wiz-plan-categories {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 28px;
}

.wiz-plan-categories a {
    display: inline-flex;

    padding:
        6px 12px;

    border-radius:
        999px;

    background:
        #ffffff;

    color:
        var(--wiz-blue-dark);

    border:
        1px solid
        #dcebf4;

    font-size: 12px;
    font-weight: 600;

    text-decoration:
        none !important;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.wiz-plan-categories a:hover {
    border-color:
        var(--wiz-blue);

    background:
        var(--wiz-blue);

    color:
        #ffffff;
}


/* =========================================================
   Plan Highlights
========================================================= */

.wiz-plan-highlights {
    margin-top: 26px;

    padding-top: 26px;

    border-top:
        1px solid
        #ddeaf2;
}

.wiz-plan-highlights h2 {
    margin:
        0
        0
        14px !important;

    color:
        var(--wiz-text);

    font-size: 19px;
}

.wiz-plan-highlights ul {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap:
        0 26px;

    margin: 0;

    padding: 0;

    list-style: none;
}

.wiz-plan-highlights li {
    position: relative;

    padding:
        12px
        0
        12px
        28px;

    border-bottom:
        1px dashed
        #dbe8f0;

    color:
        var(--wiz-text);

    font-size: 14px;

    line-height: 1.6;
}

.wiz-plan-highlights li::before {
    content: '✓';

    position: absolute;

    left: 2px;
    top: 12px;

    color:
        var(--wiz-blue);

    font-weight: 700;
}


/* =========================================================
   Plan Header Actions
========================================================= */

.wiz-plan-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 28px;
}


/* =========================================================
   Detail Section
========================================================= */

.wiz-plan-detail {
    padding-top: 70px;

    border-top:
        1px solid
        #e4edf3;
}

.wiz-plan-detail__header {
    max-width: 720px;

    margin:
        0 auto 46px;

    text-align: center;
}

.wiz-plan-detail__eyebrow {
    display: block;

    margin-bottom: 7px;

    color:
        var(--wiz-blue-dark);

    font-size: 13px;
    font-weight: 700;
}

.wiz-plan-detail__header h2 {
    margin:
        0
        0
        12px !important;

    color:
        var(--wiz-text);

    font-size:
        clamp(
            28px,
            3vw,
            38px
        );
}

.wiz-plan-detail__header p {
    max-width: 550px;

    margin:
        0 auto;

    color:
        var(--wiz-muted);

    line-height: 1.7;
}


/* =========================================================
   WordPress Editor Content
========================================================= */

.wiz-plan-content {
    max-width: 920px;

    margin:
        0 auto;

    color:
        var(--wiz-text);

    font-size: 16px;

    line-height: 1.85;
}

.wiz-plan-content p {
    margin-bottom: 1.5em;
}

.wiz-plan-content h2 {
    margin:
        42px
        0
        18px;

    color:
        var(--wiz-text);
}

.wiz-plan-content h3 {
    margin:
        34px
        0
        14px;

    color:
        var(--wiz-text);
}

.wiz-plan-content h4 {
    margin:
        28px
        0
        12px;

    color:
        var(--wiz-text);
}

.wiz-plan-content ul,
.wiz-plan-content ol {
    margin-bottom: 26px;
}

.wiz-plan-content li {
    margin-bottom: 8px;
}


/* Images / Infographics */

.wiz-plan-content img {
    max-width: 100%;
    height: auto;
}

.wiz-plan-content
.wp-caption {
    max-width: 100% !important;

    margin:
        32px auto;

    text-align: center;
}

.wiz-plan-content figure img {
    margin:
        32px auto;
}


/* Tables */

.wiz-plan-content table {
    width: 100%;

    margin:
        30px 0;

    border-collapse: collapse;
}

.wiz-plan-content th,
.wiz-plan-content td {
    padding:
        12px 14px;

    border:
        1px solid
        #dbe7ef;
}

.wiz-plan-content th {
    background:
        var(--wiz-soft);

    color:
        var(--wiz-text);

    font-weight: 700;
}


/* =========================================================
   Final CTA
========================================================= */

.wiz-plan-cta {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 40px;

    margin-top: 80px;

    padding:
        42px 48px;

    border:
        1px solid
        rgba(70, 169, 232, .16);

    border-radius:
        24px;

    background:
        linear-gradient(
            135deg,
            #f1faff 0%,
            #f4faed 100%
        );
}

.wiz-plan-cta__content {
    max-width: 700px;
}

.wiz-plan-cta__eyebrow {
    display: block;

    margin-bottom: 6px;

    color:
        var(--wiz-blue-dark);

    font-size: 12px;
    font-weight: 700;
}

.wiz-plan-cta h2 {
    margin:
        0
        0
        8px !important;

    color:
        var(--wiz-text);

    font-size: 30px;
}

.wiz-plan-cta p {
    margin: 0;

    color:
        var(--wiz-muted);

    line-height: 1.7;
}

.wiz-plan-cta__actions {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    flex-shrink: 0;
}


/* =========================================================
   Tablet
========================================================= */

@media (max-width: 1024px) {

    .wiz-columns-3,
    .wiz-columns-4 {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .wiz-plan-hero {
        max-width: 860px;
    }

}


/* =========================================================
   Mobile
========================================================= */

@media (max-width: 767px) {

    .wiz-insurance-container {
        width:
            min(
                calc(100% - 28px),
                1180px
            );
    }


    /*
     * Grid
     */
    .wiz-columns-2,
    .wiz-columns-3,
    .wiz-columns-4 {
        grid-template-columns:
            1fr;
    }


    /*
     * Archive
     */
    .wiz-insurance-archive {
        padding:
            45px 0;
    }


    /*
     * Single
     */
    .wiz-plan-single {
        padding:
            36px 0 55px;
    }

    .wiz-plan-hero {
        margin-bottom:
            52px;

        padding:
            28px 22px;

        border-radius:
            18px;
    }

    .wiz-plan-title {
        font-size:
            34px;
    }

    .wiz-plan-description {
        font-size:
            16px;
    }


    /*
     * Highlights
     */
    .wiz-plan-highlights ul {
        grid-template-columns:
            1fr;
    }


    /*
     * Hero buttons
     */
    .wiz-plan-actions {
        flex-direction:
            column;
    }

    .wiz-plan-actions
    .wiz-insurance-button {
        width: 100%;
    }


    /*
     * Detail
     */
    .wiz-plan-detail {
        padding-top:
            50px;
    }

    .wiz-plan-detail__header {
        margin-bottom:
            32px;
    }


    /*
     * Content tables
     */
    .wiz-plan-content {
        overflow-wrap:
            break-word;
    }

    .wiz-plan-content table {
        display: block;

        overflow-x: auto;

        white-space: nowrap;
    }


    /*
     * Final CTA
     */
    .wiz-plan-cta {
        align-items:
            flex-start;

        flex-direction:
            column;

        gap: 24px;

        margin-top:
            55px;

        padding:
            28px 24px;
    }

    .wiz-plan-cta__actions {
        width: 100%;

        flex-direction:
            column;
    }

    .wiz-plan-cta__actions
    .wiz-insurance-button {
        width: 100%;
    }

}

/* =========================================================
   Insurance Subcategory Filter
========================================================= */

.wiz-insurance-filter {
    margin:
        0
        0
        42px;

    padding:
        22px
        24px;

    border:
        1px solid
        var(--wiz-border);

    border-radius:
        18px;

    background:
        linear-gradient(
            135deg,
            #f7fcff 0%,
            #f8fcf4 100%
        );
}


/* Heading */

.wiz-insurance-filter__heading {
    margin-bottom:
        14px;

    color:
        var(--wiz-text);

    font-size:
        14px;

    font-weight:
        700;
}


/* Buttons Container */

.wiz-insurance-filter__buttons {
    display:
        flex;

    flex-wrap:
        wrap;

    align-items:
        center;

    gap:
        10px;
}


/* Filter Button */

.wiz-insurance-filter__button {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    min-height:
        40px;

    padding:
        8px
        18px;

    border:
        1px solid
        #d5e8f3;

    border-radius:
        999px;

    background:
        #ffffff;

    color:
        var(--wiz-blue-dark);

    font-size:
        14px;

    font-weight:
        600;

    line-height:
        1.25;

    text-decoration:
        none !important;

    white-space:
        nowrap;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


/* Hover */

.wiz-insurance-filter__button:hover {
    border-color:
        var(--wiz-blue);

    background:
        #f2faff;

    color:
        var(--wiz-blue-dark);

    transform:
        translateY(-1px);

    box-shadow:
        0
        5px
        14px
        rgba(
            70,
            169,
            232,
            .10
        );
}


/* Active */

.wiz-insurance-filter__button.is-active {
    border-color:
        var(--wiz-blue);

    background:
        var(--wiz-blue);

    color:
        #ffffff;

    box-shadow:
        0
        5px
        15px
        rgba(
            70,
            169,
            232,
            .18
        );
}


/* Active Hover */

.wiz-insurance-filter__button.is-active:hover {
    background:
        var(--wiz-blue-dark);

    border-color:
        var(--wiz-blue-dark);

    color:
        #ffffff;
}


/* =========================================================
   Mobile Filter
========================================================= */

@media (max-width: 767px) {

    .wiz-insurance-filter {
        margin-bottom:
            30px;

        padding:
            18px 16px;
    }


    /*
     * Mobile ใช้ horizontal scroll
     * เพื่อไม่ให้ปุ่ม 4-7 ตัวกินพื้นที่หลายบรรทัด
     */

    .wiz-insurance-filter__buttons {
        flex-wrap:
            nowrap;

        overflow-x:
            auto;

        margin:
            0 -16px;

        padding:
            2px
            16px
            8px;

        scrollbar-width:
            none;

        -webkit-overflow-scrolling:
            touch;
    }


    .wiz-insurance-filter__buttons::-webkit-scrollbar {
        display:
            none;
    }


    .wiz-insurance-filter__button {
        flex:
            0 0 auto;

        min-height:
            38px;

        padding:
            7px
            16px;

        font-size:
            13px;
    }

}

/* =========================================================
   Shortcode Load More
========================================================= */

.wiz-insurance-load-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 36px;
    text-align: center;
}

.wiz-insurance-load-more__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    min-height: 46px;
    padding: 10px 24px;
    border: 1px solid var(--wiz-blue);
    border-radius: 999px;
    background: var(--wiz-white);
    color: var(--wiz-blue-dark);
    font: inherit;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease,
        opacity .2s ease;
}

.wiz-insurance-load-more__button:hover:not(:disabled) {
    border-color: var(--wiz-blue);
    background: var(--wiz-blue);
    color: var(--wiz-white);
    transform: translateY(-1px);
    box-shadow:
        0 7px 18px
        rgba(70, 169, 232, .16);
}

.wiz-insurance-load-more__button:disabled,
.wiz-insurance-load-more__button.is-loading {
    cursor: wait;
    opacity: .7;
}

.wiz-insurance-load-more__status {
    min-height: 20px;
    color: var(--wiz-muted);
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 767px) {

    .wiz-insurance-load-more {
        margin-top: 28px;
    }

    .wiz-insurance-load-more__button {
        width: 100%;
        max-width: 360px;
    }

}
