.bg-primary {
    background-color: #4965d0;
    color: #fff;
}

.custom-modal {
    display: none;
    /* ซ่อนไว้ก่อน */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /* overflow: hidden; */
    background-color: rgba(0, 0, 0, 0.6);
}

.custom-modal .modal-content {
    display: flex;
    justify-content: center;
    width: 100%;
    align-items: center;
    height: 100%;
}

.custom-modal .modal-body {
    max-width: 900px;
    gap: 6px;
    width: 100%;
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

.custom-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.custom-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.custom-close:hover {
    color: #000;
}

/* Optional fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.close {
    width: 100%;
    background: none;
    color: aliceblue;
    border: unset;
    padding: 0px;
    margin: 0px;
    text-align: end;
    font-size: 50px;
    padding-right: 15px;
}

.close:hover {
    background: none;
    color: aliceblue;
}

#tb_data {
    min-height: 150px;
}

.single-product .review-comments .comment-list>li article {
    border: 1px solid #e1e3c7;
    background-color: #Fafafa;
    min-height: 100px;
    overflow: hidden;
}

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.w-100 {
    width: 100% !important;
}

.tms-carousel .tms-slide img {
    height: 200px !important;
}


p.small.text-muted {
    display: none;
}

.flex-column {
    flex-direction: column !important;
}

.align-items-center {
    align-items: center !important;
}

@media (min-width:576px) {
    .d-sm-none {
        display: none !important;
    }
}


:root {
    --card-bg: #ffffff;
    --card-radius: 12px;
    --card-padding: 16px;
    --card-shadow: 0 8px 20px rgba(18, 24, 40, 0.08);
    --card-accent: #2563eb;
    --text-color: #0f172a;
    --muted: #64748b;
    --transition: 220ms cubic-bezier(.2, .9, .3, 1);
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.card-body {
    padding: 15px;
    flex: 1;
}

.box-file-item {
    text-align: center;
}

.box-file-item a {
    display: block;
    text-decoration: none;
    color: #333;
    transition: 0.2s;
}

.box-file-item a:hover {
    color: #007bff;
}

.box-img {
    position: relative;
    width: auto;
    height: 394px;
    padding-top: 65%;
    /* keep ratio */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
}

.box-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.box-file-item a:hover .box-img img {
    transform: scale(1.05);
}

/* ===== File title ===== */
.box-file-item .name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 8px;
    line-height: 1.4;
    height: 2.8em;
    /* limit to 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Date & Views ===== */
.box-file-item .date {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px 12px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
}

.box-file-item .date svg {
    width: 18px;
    height: 18px;
    color: #888;
    vertical-align: middle;
}

/* ===== Card height option ===== */
.h-100 {
    height: 100%;
}

/* ===== Optional custom box-news-card style ===== */
.box-news-card {
    border: 1px solid #eee;
    transition: border-color 0.2s ease;
}

.box-news-card:hover {
    border-color: #007bff;
}

.box-file-filp {
    padding: 0.5rem 12px;
}

.box-news-detail {
    background: linear-gradient(180deg, #FFFFFF -38%, #E6E8FF 100%);
    padding: 16px
}

.box-news-item a {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    height: 100%;
}

.box-news-item .date {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 6px;
}

.box-news-detail .date {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 6px;
}

.box-news-detail .date span {
    font-size: 18px;
    font-weight: 500;
    color: #4F55A1;
}

.box-news-detail .date svg {
    color: #863300 !important;
}

.name-detail {
    font-size: 23px;
    font-weight: 600;
    color: #4F55A1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 33px;
}

a.file-download .badge {
    border-radius: 50px;
    border: 2px solid var(--PURPLE-LOGO, #4F55A1);
    background-color: #4F55A1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
    transition: transform .3s, filter .3s, box-shadow .3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    font-size: 20px;
    font-weight: 400;
    color: #ffffff;
    padding: 0px 12px;
}

.mySwiper_related_file {
    height: fit-content;
    padding: 16px;
    background-color: transparent;
    border-radius: 16px;
    border: none;
}



.box-news-item .name {
    min-height: 72px;
}

.box-news-item .name {
    font-size: 24px;
    font-weight: 600;
    color: #000000;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    min-height: 108px;
}

.box-news-item .date svg {
    color: #FFD60A;
}

.box-news-item .date span {
    font-size: 18px;
    font-weight: 500;
    color: #4F55A1;
}

.text-style {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0;
}