@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500;600&display=swap');

body {
    font-family: 'Kanit', sans-serif;
    background-color: #fff;
    margin: 0;
    padding: 0;
}

.business-tips {
    width: 80%;
    margin: 50px auto;
    font-family: 'Kanit', sans-serif;
    margin-top: 100px;
}

.business-tips h2 {
    border-bottom: 3px solid #009d65;
    color: #333;
    padding-bottom: 10px;
}

.tips-container {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 20px;
    flex-wrap: wrap;  /* อนุญาตให้การ์ดไหลไปตามบรรทัดถัดไป */
    justify-content: center;  /* จัดการ์ดให้อยู่กลาง */
}

.tip-card {
    border: 1px solid #ddd;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 10px;
    flex: 1;
    flex-basis: calc(33.33% - 20px); /* ปรับให้การ์ดแสดง 3 ใบต่อแถว */
    max-width: calc(33.33% - 20px);  /* ปรับให้การ์ดมีขนาดสูงสุดที่ 33.33% */
    min-width: 350px;  /* กำหนดขนาดต่ำสุดของการ์ดให้ใหญ่ขึ้น */
}



.image-box {
    position: relative;
    overflow: hidden;
}

.image-box img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.overlay {
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 16px;
}

.image-box:hover img {
    transform: scale(1.1);
}

.image-box:hover .overlay {
    opacity: 1;
}

.tip-content {
    padding: 15px;
}

.tip-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    color: #000;
}

.tip-desc {
    font-size: 14px;
    color: #555;
}

.read-all {
    text-align: right;
    margin-top: 30px;
}

.read-all button {
    background-color: #009d65;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    border-radius: 3px;
}

.read-all button:hover {
    background-color: #00764c;
}

.detail-container {
    margin-top: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    gap: 30px;
}

.image-content {
    flex: 1;
}

.image-content img {
    width: 100%;
    height: auto;
}

.text-content {
    flex: 1;
}

.text-content h1 {
    margin-bottom: 15px;
    color: #333;
}

.text-content p {
    color: #555;
    line-height: 1.8;
}

.btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.btn-back {
    padding: 10px 25px;
    background-color: #009d65;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-back:hover {
    background-color: #00764c;
}

/* สำหรับจอใหญ่แสดงการ์ด 4 ใบต่อแถว */
@media (min-width: 1025px) {
    .tip-card {
        flex-basis: calc(25% - 20px); /* จัดการให้แสดง 4 การ์ดต่อแถว */
        max-width: calc(25% - 20px);
    }
}

@media (max-width: 1024px) {
    .tip-card {
        flex-basis: calc(50% - 20px);  /* 2 การ์ดต่อแถว */
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .tip-card {
        flex-basis: 100%;  /* 1 การ์ดต่อแถว */
        max-width: 100%;
    }
}


        /* CSS สำหรับช่องค้นหา */
        .search-container {
            max-width: 800px;
            margin: 80px auto 40px auto;
            padding: 0 20px;
        }
        
        .search-form {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            align-items: center;
            flex-wrap: wrap;
        }
        
        .search-input {
            flex: 2;
            min-width: 250px;
            padding: 12px 20px;
            border: 2px solid #e1e5e9;
            border-radius: 25px;
            font-size: 16px;
            font-family: 'Kanit', sans-serif;
            outline: none;
            transition: border-color 0.3s ease;
        }
        
        .category-select {
            flex: 1;
            min-width: 180px;
            padding: 12px 20px;
            border: 2px solid #e1e5e9;
            border-radius: 25px;
            font-size: 16px;
            font-family: 'Kanit', sans-serif;
            outline: none;
            transition: border-color 0.3s ease;
            background-color: white;
            cursor: pointer;
        }
        
        .search-input:focus,
        .category-select:focus {
            border-color: #007bff;
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
        }
        
        .search-btn {
            padding: 12px 25px;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            font-family: 'Kanit', sans-serif;
            font-size: 16px;
            transition: background-color 0.3s ease;
            white-space: nowrap;
        }
        
        .search-btn:hover {
            background-color: #0056b3;
        }
        
        .clear-search {
            padding: 8px 15px;
            background-color: #6c757d;
            color: white;
            text-decoration: none;
            border-radius: 20px;
            font-family: 'Kanit', sans-serif;
            font-size: 14px;
            transition: background-color 0.3s ease;
            white-space: nowrap;
        }
        
        .clear-search:hover {
            background-color: #545b62;
            text-decoration: none;
            color: white;
        }
        
        .search-results {
            margin-bottom: 20px;
            text-align: center;
            color: #666;
            font-family: 'Kanit', sans-serif;
        }
        
        .search-highlight {
            background-color: #fff3cd;
            padding: 2px 4px;
            border-radius: 3px;
        }
        
        .no-results {
            text-align: center;
            padding: 60px 20px;
            color: #666;
            font-family: 'Kanit', sans-serif;
        }
        
        .no-results h3 {
            margin-bottom: 15px;
            color: #333;
        }
        
        .category-badge {
            display: inline-block;
            background-color: #007bff;
            color: white;
            padding: 4px 12px;
            border-radius: 15px;
            font-size: 12px;
            margin-left: 10px;
            font-weight: 400;
        }
        
        @media (max-width: 768px) {
            .search-form {
                flex-direction: column;
                align-items: stretch;
            }
            
            .search-input,
            .category-select {
                min-width: auto;
                width: 100%;
            }
            
            .search-btn,
            .clear-search {
                width: 100%;
                text-align: center;
            }
        }
