/*
Theme Name: HapaxTrace
Theme URI: https://hapaxtrace.com
Author: Hapax Developer
Author URI: https://hapaxtrace.com
Description: HapaxTrace 追溯系统官网主题 - AI智能商品追溯系统，便宜稳定，Vibe Coding 成果
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hapaxtrace
Tags: one-column, custom-logo, custom-menu, featured-images, theme-options, translation-ready
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
    line-height: 1.6;
    color: #333;
}

.custom-logo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background-color: #00b96b;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 9999px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #009258;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background-color: white;
    color: #00b96b;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 9999px;
    border: 1px solid #00b96b;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: #edfff5;
}

.feature-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #f3f4f6;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: #d5ffea;
    box-shadow: 0 10px 25px -5px rgba(0, 185, 107, 0.1);
}

.icon-circle {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    list-style: none;
}

nav ul li a {
    text-decoration: none;
}

.current_page_item > a span,
.current-menu-item > a span {
    color: #00b96b;
}

/* iPhone 屏幕自动滚动动画 */
@keyframes phoneScroll {
    0%   { object-position: top; }
    40%  { object-position: bottom; }
    50%  { object-position: bottom; }
    90%  { object-position: top; }
    100% { object-position: top; }
}

.animate-phone-scroll {
    animation: phoneScroll 16s ease-in-out infinite;
}

/* ============================================
   移动端 / 平板适配增强
   ============================================ */

/* 防止图片溢出 */
img {
    max-width: 100%;
    height: auto;
}

/* 移动端导航菜单动画 */
#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}
#mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* 平板端 feature 卡片间距优化 */
@media (min-width: 768px) and (max-width: 1023px) {
    .feature-tab .tab-desc,
    .more-tab .tab-desc {
        max-height: 0 !important;
        opacity: 0 !important;
    }
    .feature-tab.active .tab-desc,
    .more-tab.active .tab-desc {
        max-height: 300px !important;
        opacity: 1 !important;
    }
}

/* 手机端文本适配 */
@media (max-width: 639px) {
    .text-4xl {
        font-size: 2rem !important;
    }
    .text-3xl {
        font-size: 1.75rem !important;
    }
    h1 {
        word-break: break-word;
    }
}

/* PC 端核心功能 / 更多功能图片容器放大 */
@media (min-width: 1024px) {
    .feature-image-container {
        min-height: 520px !important;
    }
}

/* 社交图标品牌色悬停效果 */
.social-icon {
    transition: background-color 0.3s ease;
}
.social-icon:hover {
    background-color: var(--hover-bg) !important;
}
