
    @media (max-width: 767px) {
        .custom-prei-container {
            display: none;
        }
    }

    .custom-prei-body {
        background-color: #1a2a44;
        color: #d3d8e8;
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .custom-prei-container {
        text-align: center;
        width: 100%;
        max-width: 1200px;
    }

    .custom-prei-navigation {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        width: 100%;
    }

    .custom-prei-nav-link {
        color: #d3d8e8;
        text-decoration: none;
        font-size: 16px;
        cursor: pointer;
    }

    .custom-prei-nav-link:hover {
        color: #a9b4d1;
    }

    .custom-prei-previous-btn,
    .custom-prei-next-btn {
        display: flex;
        gap: 10px;
        max-width: 40%;
    }

    .custom-prei-btn-text {
        text-align: left;
    }

    .custom-prei-btn-text h4 {
        margin: 5px 0;
        font-size: 16px;
    }

    .custom-prei-img-w {
        max-width: 110px !important;
        object-fit: contain;
        border-radius: 0px;
    }

    .custom-prei-next-btn .custom-prei-btn-text {
        text-align: right;
    }

    .custom-prei-related-posts {
        margin-top: 120px;
        text-align: center;
    }

    .custom-prei-related-posts h2 {
        font-size: 18px;
        color: #ffffffff;
        margin-bottom: 4px;
        text-align: left;
    }

    .custom-prei-post-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        margin: 0 auto;
    }

    .custom-prei-post-item {
        position: relative;
        text-align: center;
    }

    .custom-prei-post-item a {
        display: block;
        text-decoration: none;
        color: inherit;
    }

    .custom-prei-post-item img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 0px;
        display: block;
    }

    .custom-prei-post-caption {
        background: rgba(0, 0, 0, 0);
        color: #ffffffff;
        padding: 8px;
        font-size: 16px;
        border-top: 2px solid #b6afaf;
        margin-top: 16px;
    }

    .custom-prei-post-caption a {
        color: #ffffffff;
        text-decoration: none;
    }

    .custom-prei-post-caption a:hover {
        color: #a9b4d1;
    }

    .custom-prei-prev-title a,
    .custom-prei-next-title a {
        color: #d3d8e8;
        text-decoration: none;
    }

    .custom-prei-prev-title a:hover,
    .custom-prei-next-title a:hover {
        color: #a9b4d1;
    }

    @media (max-width: 1024px) {
        .custom-prei-post-grid {
            grid-template-columns: repeat(3, 1fr);
        }

        .custom-prei-prev-title,
        .custom-prei-next-title {
            margin-top: 10px;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: unset;
            max-width: 250px;
        }
    }

    @media (max-width: 768px) {
        .custom-prei-post-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .custom-prei-prev-title,
        .custom-prei-next-title {
            margin-top: 2px !important;
        }

        .custom-prei-navigation {
            margin-bottom: 30px;
        }

        .custom-prei-btn-text {
            width: 300px !important;
        }

        .custom-prei-related-posts {
            margin-top: 50px;
        }

        .custom-prei-previous-btn,
        .custom-prei-next-btn {
            max-width: 45%;
        }

        .custom-prei-img-w {
            width: 66px;
            height: 50px;
        }

        .custom-prei-post-item img {
            height: 150px;
        }
    }

    @media (max-width: 480px) {
        .custom-prei-navigation {
            flex-direction: column;
            gap: 20px;
        }

        .custom-prei-previous-btn,
        .custom-prei-next-btn {
            max-width: 100%;
        }

        .custom-prei-post-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .custom-prei-post-item img {
            height: 120px;
        }
    }

    .custom-prei-prev-title,
    .custom-prei-next-title {
        margin-top: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: unset;
        max-width: 250px;
    }
    .custom-prei-btn-text
    {
        margin-top: -4px;
    }


    /* Mobile REalted posts css here */
    .custom-gallery-image-container a{
        color: white;
    }
     .custom-gallery-next, .custom-gallery-prev
     {
        color: white !important;
     }
    .custom-gallery-container {
        position: relative;
        overflow: hidden;
        padding: 20px;
    }

    .custom-gallery-top-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 60px;
       
    }

    .custom-gallery-image-container {
        text-align: center;
        margin-bottom: 40px;
    }

    .custom-gallery-image-container img {
        width: 100%;
        max-width: 300px;
        height: auto;
        margin-bottom: 10px;
        border-bottom: 1px solid #b7b7b7;
        padding-bottom: 11px;
    }

    .custom-gallery-image-container p {
        margin: 0;
        font-size: 16px;
        margin-top: -5px;
    }

    .custom-gallery-image-row {
        margin-bottom: 20px;
    }

    #next-button,
    #prev-button {
        font-weight: bold;
    }

    .custom-gallery-image-row a {
        color: white !important;
        font-size: 18px;
        max-width: 300px;
    }

    .custom-gallery-image-row a p {
        padding-left: 25px;
        padding-right: 25px;
    }

    .custom-gallery-top-row .custom-gallery-image-container img {
        border-bottom: none !important;
        margin-bottom: 0px !important;
    }

    @media (min-width: 768px) {
        .custom-gallery-container {
            display: none !important;
        }
    }
