/* BODY  ใช้รวม*/
.card-body {
    background: #f8faf9;
}

/********** SERVICE CARD **********/
.service-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card a {
    text-decoration: none !important;
}

.service-card img {
    height: 120px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.service-card p {
    margin: 0;
    font-size: 25px;
    font-weight: 500;
    color: #925709;
}

.block-text {
    text-decoration: none !important;
}

.service-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.service-card:hover img {
    transform: scale(1.15);
}

/* ข่าวสารประชาสัมพันธ์ */
.custom-tabs {
    border-bottom: 2px solid #eaeaea;
}

.custom-tabs .nav-link {
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: #555;
    padding: 12px 25px;
    transition: all 0.3s ease;
    position: relative;
}

.custom-tabs .nav-link:hover {
    color: #0d6efd;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.custom-tabs .nav-link.active {
    color: #0d6efd;
    background-color: #fff;
}

.custom-tabs .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 3px;
    background: #0d6efd;
    border-radius: 5px;
}

.director-img {
    width: 100%;
    max-width: 350px;

    height: 450px;

    object-fit: cover;

    border-radius: 20px;
    align-items: right;
}

/* 🔥 card ข่าว */
/* card ต้องเป็น relative */

.news-card {
    position: relative;
    padding-bottom: 70px;
    /* 🔥 เพิ่มตรงนี้ */
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

/* 🔥 ปุ่มอยู่กลางล่าง */
.read-more-btn {
    margin-top: auto;
    /* 🔥 ดันลงล่าง */
    align-self: center;
    /* 🔥 อยู่กลาง */
}

/* 🔥 รูป */
.news-img {
    height: 180px;
    object-fit: cover;
    transition: 0.3s;
}

/* 🔥 Facebook ไม่ล้น */
.fb-wrapper {
    width: 100%;
    overflow: hidden;
    /* 🔥 กันล้น */
}

.fb-page {
    width: 100% !important;
}

/* 🔥 มือถือ */
@media (max-width: 768px) {
    .news-img {
        height: 160px;
    }

    .fb-page {
        width: 100% !important;
    }
}

/* รูป */
.hero-img {
    width: 100%;
    height: 70vh;
    /* desktop */
    object-fit: contain;
    /* ไม่ crop หน้า */
}

@media (max-width: 768px) {
    .hero-img {
        height: 35vh;
        /* mobile */
    }
}

/* ลูกศร */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 60px;
    height: 60px;
    background-size: 50% 50%;
    background-color: rgba(175, 173, 173, 0.25);
    border-radius: 50%;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.4));
}

/* Hover เข้ม */
.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

/********** BUTTON **********/
.btn {
    font-weight: 700;
    transition: 0.5s;
}

.btn:hover {
    box-shadow: 0 8px 6px -6px #555;
}

.btn-primary {
    color: #fff;
}

/* 🔥 card */
.procurement-card {
    background: #fff;
    transition: all 0.25s ease;
    border: 1px solid #eee;
}

.procurement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* 🔥 title */
.procurement-link {
    color: #000000;
    display: -webkit-box;

    /* 🔥 ของเดิม (ยังต้องใช้) */
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    /* ✅ เพิ่มตัวมาตรฐาน */
    line-clamp: 3;

    overflow: hidden;
    text-overflow: ellipsis;

    line-height: 1.5;
    max-height: calc(1.5em * 3);
}

.procurement-link:hover {
    color: #0d6efd;
    text-decoration: underline;
}

/* 🔥 mobile spacing */
@media (max-width: 768px) {
    .procurement-card {
        padding: 16px !important;
    }
}






/* Froms */
.form-table {
    table-layout: fixed;
    width: 100%;
}

.form-table th,
.form-table td {
    vertical-align: middle;
    padding: 14px 12px;
}

/* กำหนดความกว้างแต่ละคอลัมน์ */
.col-no {
    width: 60px;
    text-align: center;
}

.col-title {
    width: 28%;
}

.col-desc {
    width: 42%;
}

.col-download,
.col-sample {
    width: 150px;
    text-align: center;
}

/* ตัดข้อความให้สวย */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* หัวตาราง */
.form-table thead th {
    background: #f8fafc;
    font-weight: 700;
    border-bottom: 2px solid #dee2e6;
}

/* hover */
.form-table tbody tr:hover {
    background: #f8fbff;
    transition: .2s;
}

/* ปุ่ม */
.btn-action {
    min-width: 120px;
    border-radius: 999px;
    font-weight: 600;
}


.text-left-td {
    text-align: left;
}

@media (max-width: 768px) {
    .table thead {
        display: none;
    }

    .card-body h6 {
        font-size: 0.95rem;
    }

    .btn-sm {
        font-size: 0.85rem;
    }
}