body {
    line-height: 20px;
}
.thumb-info img {
    transition: all 0.3s ease;
    border-radius: 50%;
    border: solid 8px #f4f4f4;
}
.thumb-info .thumb-info-title {
    bottom: 10%;
}
.text-3 {
    font-size: 1.1em !important;
}

/* ---------------------------------------
 * CMS Gallery (content from TinyMCE)
 * - ใช้ grid แบบ auto-fit
 * - รองรับทั้ง markup ใหม่ (.cms-gallery__item/.cms-gallery__img)
 *   และ markup เก่า (.cms-gallery.row + col-*)
 * --------------------------------------- */
.cms-gallery {
    display: grid;
    /* thumbnail แบบเล็กและคงที่ (ไม่ขยายเป็นการ์ดใหญ่เต็มแถว) */
    grid-template-columns: repeat(auto-fill, minmax(120px, 120px));
    justify-content: start;
    gap: 10px;
    margin: 16px 0;
}

.cms-gallery__item {
    display: block;
    text-decoration: none;
}

.cms-gallery__img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
}

/* รองรับแกลเลอรีแบบเก่าที่เป็น bootstrap row/col */
.cms-gallery.row {
    display: grid;
    /* รองรับแกลเลอรีแบบเก่าที่เป็น bootstrap row/col */
    grid-template-columns: repeat(auto-fill, minmax(120px, 120px));
    justify-content: start;
    gap: 10px;
    margin: 16px 0;
}

.cms-gallery.row > [class*="col-"] {
    float: none !important;
    width: auto !important;
    padding: 0 !important;
}

.cms-gallery.row img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
}

/* มือถือ: ลดขนาด thumbnail ลงอีกเล็กน้อย */
@media (max-width: 576px) {
    .cms-gallery,
    .cms-gallery.row {
        grid-template-columns: repeat(auto-fill, minmax(96px, 96px));
        gap: 8px;
    }
}