/* แยกออกจาก template/Blog/content.php เมื่อ 2026-08-19 */
* {
            box-sizing: border-box;
        }

        /* Search Bar Responsive */
        .search-container {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 20px;
        }

        .input-group {
            display: flex;
            width: 100%;
            max-width: 400px;
        }

        .input-group input {
            flex: 1;
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 4px 0 0 4px;
            font-size: 14px;
        }

        .btn-search {
            padding: 10px 20px;
            background-color: #ff9900;
            color: white;
            border: none;
            border-radius: 0 4px 4px 0;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        .btn-search:hover {
            background-color: #e68a00;
        }

        /* Blog Grid Container - Responsive */
        .content-news {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 25px;
            margin-top: 20px;
            align-items: stretch;
        }

        /* Blog Box Styling */
        .box-news {
            border: 1px solid #ddd;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
            background-color: #fcfcfc;
            display: flex;
            flex-direction: column;
        }

        .box-news:hover {
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
            transform: translateY(-5px);
        }

        .box-image {
            width: 100%;
            height: 200px;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #e6e6e6;
        }

        .box-image img, 
        .box-image iframe {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .box-content {
            padding: 15px;
            background-color: #ffffff;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
        }

        .box-content h5 {
            font-size: 1.1em;
            font-weight: bold;
            margin-bottom: 8px;
            min-height: 50px;
            overflow: hidden;
            color: #333;
        }

        .box-content p {
            font-size: 0.9em;
            color: #666;
            min-height: 40px;
            overflow: hidden;
            margin: 0;
        }

        .text-news {
            text-decoration: none;
            color: inherit;
            display: block;
        }

        .line-clamp {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Pagination Styling */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 5px;
            margin-top: 30px;
            flex-wrap: wrap;
        }

        .pagination a {
            padding: 8px 12px;
            text-decoration: none;
            border: 1px solid #ddd;
            color: #555;
            border-radius: 4px;
            transition: background-color 0.3s, color 0.3s;
        }

        .pagination a:hover {
            background-color: #ff9900;
            color: white;
            border-color: #ff9900;
        }

        .pagination a.active {
            background-color: #ff9900;
            color: white;
            border-color: #ff9900;
            font-weight: bold;
        }

        /* ========== RESPONSIVE DESIGN ========== */
        
        /* Tablet (768px - 1024px) */
        @media (max-width: 1024px) {
            .content-news {
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
                gap: 20px;
            }

            .input-group {
                max-width: 350px;
            }
        }

        /* Mobile (จอเล็กกว่า 768px) */
        @media (max-width: 768px) {
            .content-news {
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
                gap: 15px;
            }

            .box-image {
                height: 180px;
            }

            .box-content h5 {
                font-size: 1em;
                min-height: 45px;
            }

            .box-content p {
                font-size: 0.85em;
                min-height: 35px;
            }

            .input-group {
                max-width: 100%;
            }

            .search-container {
                padding: 0 10px;
            }

            .pagination a {
                padding: 6px 10px;
                font-size: 0.9em;
            }
        }

        /* Small Mobile (จอเล็กกว่า 480px) */
        @media (max-width: 480px) {
            .content-news {
                grid-template-columns: 1fr;
                gap: 15px;
                padding: 0 10px;
            }

            .box-image {
                height: 200px;
            }

            .box-content {
                padding: 12px;
            }

            .box-content h5 {
                font-size: 0.95em;
                min-height: 40px;
            }

            .box-content p {
                font-size: 0.8em;
                min-height: 30px;
            }

            .input-group input {
                font-size: 13px;
                padding: 8px 12px;
            }

            .btn-search {
                padding: 8px 15px;
            }

            .pagination {
                gap: 3px;
            }

            .pagination a {
                padding: 5px 8px;
                font-size: 0.85em;
            }
        }

        /* Extra Small Mobile (จอเล็กกว่า 360px) */
        @media (max-width: 360px) {
            .content-news {
                padding: 0 5px;
                gap: 10px;
            }

            .box-content h5 {
                font-size: 0.9em;
            }

            .box-content p {
                font-size: 0.75em;
            }
        }
