.box-title-content {
    background: white;
    padding-left: 25px;
    /* border-left: 8px solid #166031;
    border-end-end-radius: 15px; */
    padding: 6px;
}

.img-title-home-page {
    width: 100%;
    object-position: center center;
    border-radius: 7px;
    object-fit: cover;
    box-shadow: rgba(22, 96, 49, 0.3) 5px 5px, rgba(22, 96, 49, 0.2) 10px 10px,
        rgba(22, 96, 49, 0.1) 15px 15px;
}

.seemore:hover {
    text-decoration: underline;
    cursor: pointer;
    margin-top: auto;
}

.img-container {
    width: 110%;
    height: 110%;
}

.about-img img {
    position: relative;
    z-index: 2;
}

.about-img::before {
    position: absolute;
    content: "";
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: #166031;
    transform: skew(20deg);
}

.box-img-servince {
    display: flex;
    justify-content: center;
    width: 100%;
    max-height: 200px;
    overflow: hidden;
    box-shadow: -45px -45px 0 -40px #166031, 45px 45px 0 -40px #166031;
}

.box-img-blog {
    display: flex;
    justify-content: center;
    width: 100%;
    max-height: 200px;
}

.img-blog {
    width: 100%;
    object-fit: cover;
    object-position: center top;
    box-shadow: rgba(22, 96, 49, 0.3) 5px 5px, rgba(22, 96, 49, 0.2) 10px 10px,
        rgba(22, 96, 49, 0.1) 15px 15px;
}

.img-servince {
    width: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
    height: auto;
}

.box-img-servince:hover .img-servince {
    transform: scale(1.1);
}

.text-truncation-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-truncation-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card:hover {
    text-decoration: none;
}

.card:hover .blog-img-in {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.truncate-3-lines {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
}

.truncate-2-lines {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
}

.truncate-1-lines {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 1;
}

.pin {
    position: absolute;
    top: 8px;
    right: 1px;
}

.owl-stage {
    padding: 0 !important;
}

.blog-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* บังคับให้เป็นสี่เหลี่ยมจัตุรัส */
    overflow: hidden;
    border-radius: 0.25rem;
}

.blog-img-in {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
}

.card-body-blog {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* ทำให้ date อยู่ด้านล่าง */
    height: 200px;
}

.blog-img:hover .blog-img-in {
    transform: scale(1.1); /* ขยายภาพ 10% */
}

.date {
    margin-top: auto; /* ดัน date ลงล่าง */
    font-size: 14px;
    color: gray;
}
/* sm (576px - 767px, Tablet แนวตั้ง + มือถือขนาดใหญ่) */
@media (min-width: 768px) and (max-width: 992px) {
    .blog-img {
        position: relative;
        height: auto;
        aspect-ratio: 1/1; /* บังคับให้เป็นสี่เหลี่ยมจัตุรัส */
        overflow: hidden;
        flex-shrink: 0; /* ป้องกันการบีบรูป */
        border-top-left-radius: 0.25rem;
        border-bottom-left-radius: 0.25rem;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .blog-img-in {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    .card-body-blog {
        flex-grow: 1; /* ให้เนื้อหาขยายตามพื้นที่ */
        min-height: auto;
    }
}
@media (min-width: 576px) and (max-width: 767px) {
    .truncate-3-lines {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 2;
    }

    .blog-img {
        position: relative;
        height: auto;
        aspect-ratio: 1/1; /* บังคับให้เป็นสี่เหลี่ยมจัตุรัส */
        overflow: hidden;
        flex-shrink: 0; /* ป้องกันการบีบรูป */
        border-top-left-radius: 0.25rem;
        border-bottom-left-radius: 0.25rem;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .blog-img-in {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    .card-body-blog {
        flex-grow: 1; /* ให้เนื้อหาขยายตามพื้นที่ */
        min-height: auto;
        height: unset !important;
    }

    #content_aboutcom {
        display: -webkit-box;
        -webkit-line-clamp: 4;
        /* จำกัดที่ 3 บรรทัด */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
    }
}

/* xs (< 576px, มือถือเล็ก) */
@media (max-width: 575px) {
    .truncate-3-lines {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 2;
    }
    .blog-img {
        position: relative;
        height: auto;
        aspect-ratio: 1/1; /* บังคับให้เป็นสี่เหลี่ยมจัตุรัส */
        overflow: hidden;
        flex-shrink: 0; /* ป้องกันการบีบรูป */
        border-top-left-radius: 0.25rem;
        border-bottom-left-radius: 0.25rem;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .blog-img-in {
        width: 100%;
        height: 100%;
        object-fit: cover; /* ป้องกันการบีบภาพ */
        object-position: center center;
    }

    .card-body-blog {
        flex-grow: 1; /* ให้เนื้อหาขยายตามพื้นที่ */
        min-height: auto;
        height: unset !important;
    }

    #content_aboutcom {
        display: -webkit-box;
        -webkit-line-clamp: 4;
        /* จำกัดที่ 3 บรรทัด */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
    }
}

@media (max-width: 470px) {
    .truncate-2-lines {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 1;
        margin: 0 !important;
    }
}

@media (max-width: 400px) {
    .truncate-3-lines {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 1;
        margin: 0 !important;
    }
}

@media (max-width: 306px) {
    .date {
        display: none;
    }
}
