/*!
Theme Name: Hostinger AI theme
Author: Hostinger
Author URI: https://hostinger.com
Details URI: https://hostinger.com
Description: Hostinger AI theme built with SEO and mobile responsiveness in mind, this theme ensures optimal performance and a better online presence.
Version: 1.0.55
Tested up to: 6.5
Requires at least: 5.6
Requires PHP: 8.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: hostinger-ai-theme
Tags: ai-theme
*/

function steam_services_responsive_styles() {
    ?>
    <style>
        /* 列表格子 */
        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        /* 筛选表单 */
        .steam-services-container select,
        .steam-services-container input[type="text"] {
            width: auto;
            flex: 1;
            min-width: 120px;
        }

        /* 分页按钮 */
        .steam-services-pagination a {
            display: inline-block;
            margin: 0 5px 5px 5px;
            padding: 6px 12px;
            border-radius: 4px;
            border: 1px solid #ddd;
            text-decoration: none;
        }

        /* 高亮当前页 */
        .steam-services-pagination a.active,
        .steam-services-pagination a[style*="background:#0073aa"] {
            background: #0073aa !important;
            color: #fff !important;
        }

        /* 小屏幕优化 */
        @media (max-width: 768px) {
            .steam-services-container {
                padding: 20px;
            }

            .services-grid {
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
                gap: 20px;
            }

            .steam-services-container select,
            .steam-services-container input[type="text"] {
                width: 100%;
            }
        }

        @media (max-width: 480px) {
            .services-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .steam-services-pagination a {
                padding: 5px 10px;
                margin: 3px 3px;
            }
        }
    </style>
    <?php
}
add_action('wp_head', 'steam_services_responsive_styles');
