/*
Theme Name: 飞海智控 · 企业官网
Description: FH049 国内工业自动化企业官网，内置核心业务、项目案例、企业动态和咨询管理。
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Author: 飞海网络
Text Domain: feihai-zhikong
License: GPL-2.0-or-later
*/

:root {
    --ink: #18251f;
    --muted: #53635c;
    --line: #dce3df;
    --paper: #fff;
    --soft: #f2f6f3;
    --accent: #166343;
    --deep: #102b21;
    --lime: #d8efad;
    --display: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
    --gutter: 48px;
    --header-height: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--header-height) + 14px); }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font: 400 17px/1.7 var(--display);
    overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.26; letter-spacing: -.025em; }
:focus-visible { outline: 3px solid #19855b; outline-offset: 4px; }
::selection { background: #c9e5d4; color: var(--deep); }
.fh-wrap { width: min(1280px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.screen-reader-text {
    position: absolute; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
    width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
}
.screen-reader-text:focus {
    z-index: 200; left: 14px; top: 14px; width: auto; height: auto;
    clip-path: none; padding: 10px 14px; background: var(--paper); color: var(--deep);
}

.fh-header {
    position: sticky; top: 0; z-index: 50; background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.admin-bar .fh-header { top: 32px; }
.fh-header-inner { display: flex; min-height: var(--header-height); align-items: center; justify-content: space-between; gap: 30px; }
.fh-brand { flex: 0 0 auto; }
.fh-brand-link { display: inline-flex; align-items: center; gap: 11px; }
.fh-mark { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 8px 8px 8px 2px; color: white; background: var(--accent); }
.fh-mark svg { width: 30px; height: 30px; stroke: none; transform: translate(-1px, -1px); }
.fh-brand-name { color: var(--deep); font-size: 25px; font-weight: 800; letter-spacing: -.045em; line-height: 1.2; }
.custom-logo { width: auto; max-width: 170px; height: auto; max-height: 48px; object-fit: contain; }
.fh-nav ul { list-style: none; margin: 0; padding: 0; }
.fh-nav > ul, .fh-nav > div > ul { display: flex; align-items: center; gap: clamp(15px, 2vw, 32px); }
.fh-nav li { position: relative; }
.fh-nav a { display: block; padding-block: 27px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.fh-nav .current-menu-item > a, .fh-nav .current-menu-ancestor > a, .fh-nav .current_page_item > a, .fh-nav a:hover { color: var(--accent); }
.fh-nav .current-menu-item > a::after, .fh-nav .current_page_item > a::after {
    position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: var(--accent); content: "";
}
.fh-nav .sub-menu, .fh-nav .children {
    position: absolute; top: 100%; left: 0; z-index: 1; display: none; min-width: 156px;
    padding: 6px 12px; background: var(--paper); border: 1px solid var(--line);
}
.fh-nav li:hover > ul, .fh-nav li:focus-within > ul { display: block; }
.fh-nav li li a { padding: 9px 3px; }
.fh-menu-toggle {
    display: inline-flex; gap: 7px; align-items: center; padding: 7px 10px; color: var(--deep);
    background: var(--soft); border: 1px solid var(--line); border-radius: 5px; font-size: 16px; font-weight: 700;
}
.fh-menu-toggle svg { width: 20px; height: 20px; }

.fh-hero { position: relative; isolation: isolate; overflow: hidden; color: white; background: #102a20; }
.fh-hero-image { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 51%; animation: fh-hero-settle 1.8s cubic-bezier(.18,.7,.23,1) both; }
.fh-hero-has-image::before {
    position: absolute; z-index: -1; inset: 0;
    background: linear-gradient(90deg, rgba(7,29,21,.91) 0%, rgba(9,35,25,.78) 29%, rgba(9,30,23,.28) 63%, rgba(7,28,19,.04) 100%);
    content: "";
}
@keyframes fh-hero-settle { from { transform: scale(1.035); } to { transform: scale(1); } }
.fh-hero-inner { min-height: clamp(470px, 42vw, 570px); display: grid; align-items: center; }
.fh-hero-copy { width: min(100%, 600px); padding-block: 58px; }
.fh-kicker { color: var(--accent); font-size: 14px; font-weight: 750; letter-spacing: .08em; }
.fh-hero .fh-kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--lime); }
.fh-hero .fh-kicker::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.fh-hero h1 { margin-top: 19px; max-width: 10.8em; font-size: clamp(45px, 4.1vw, 70px); font-weight: 780; line-height: 1.16; letter-spacing: -.052em; text-wrap: balance; }
.fh-hero-intro { max-width: 29em; margin-top: 21px; color: #ecf4ed; font-size: clamp(17px, 1.35vw, 20px); }
.fh-hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 29px; }
.fh-button {
    display: inline-flex; min-height: 46px; align-items: center; justify-content: center;
    border: 1px solid var(--accent); border-radius: 5px; padding: 8px 20px; color: white;
    background: var(--accent); font-size: 16px; font-weight: 750; line-height: 1.5;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.fh-button:hover { background: #124d36; border-color: #124d36; color: white; }
.fh-button--bright { background: var(--lime); border-color: var(--lime); color: #14281d; }
.fh-button--bright:hover { background: #eff9df; border-color: #eff9df; color: #14281d; }
.fh-button--ghost { color: var(--accent); background: transparent; }
.fh-hero .fh-button--ghost { border-color: #dce8df; background: rgba(12,35,26,.37); color: white; }
.fh-hero .fh-button--ghost:hover { background: #fff; color: var(--deep); }
.fh-hero a:focus-visible { outline-color: #fff; }

.fh-section { padding-block: clamp(42px, 5vw, 76px); }
.fh-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 26px; }
.fh-heading h2, .fh-split-copy h2 { font-size: clamp(32px, 3.05vw, 48px); font-weight: 760; text-wrap: balance; }
.fh-heading .fh-kicker + h2, .fh-split-copy .fh-kicker + h2 { margin-top: 7px; }
.fh-section-intro { margin-top: 12px; color: var(--muted); }
.fh-text-link {
    display: inline-block; flex: 0 0 auto; border-bottom: 1px solid #95b2a4; padding: 0 0 4px;
    color: var(--accent); font-size: 16px; font-weight: 750; line-height: 1.5;
}
.fh-text-link:hover { border-color: var(--accent); }
.fh-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.fh-home-business { border-top: 4px solid #d4e6ce; }
.fh-home-company { background: var(--soft); }
.fh-home-split {
    display: grid; align-items: center; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: clamp(28px, 5.25vw, 83px);
}
.fh-home-split--text { grid-template-columns: minmax(0, 780px); }
.fh-split-media { overflow: hidden; border-radius: 8px; background: #e8efea; }
.fh-split-media img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .5s ease; }
.fh-split-media:hover img { transform: scale(1.035); }
.fh-split-copy .fh-button { margin-top: 22px; }
.fh-home-service { background: var(--deep); color: #fff; }
.fh-home-service .fh-home-split:not(.fh-home-split--text) { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.fh-home-service .fh-section-intro { color: #c7dbce; }
.fh-home-service .fh-kicker, .fh-home-service .fh-text-link { color: var(--lime); }
.fh-home-service .fh-text-link:hover { border-color: var(--lime); }
.fh-home-service a:focus-visible { outline-color: #fff; }
.fh-service-steps { list-style: none; margin: 18px 0 19px; padding: 0; }
.fh-service-steps li { display: flex; align-items: flex-start; gap: 13px; padding-block: 10px; border-top: 1px solid #426255; }
.fh-step-no { margin-top: 1px; color: var(--lime); font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; }
.fh-service-steps h3 { font-size: 18px; }
.fh-service-steps p { margin-top: 2px; color: #c7dbce; font-size: 16px; }
.fh-partner-logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 15px; }
.fh-partner-logos li { display: grid; place-items: center; width: 168px; height: 91px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; }
.fh-partner-logos img { width: 100%; height: 100%; object-fit: contain; }
.fh-home-editor { max-width: 920px; }

.fh-footer { padding: 35px 0 14px; color: #e1eee6; background: #13271f; }
.fh-footer-grid { display: grid; grid-template-columns: 1.3fr 1fr .9fr; gap: 26px 40px; }
.fh-footer .fh-brand-name { color: #fff; }
.fh-footer .fh-mark { background: #24654b; }
.fh-footer-brand p { margin-top: 10px; color: #c4d6ca; }
.fh-footer-label { color: #fff; font-size: 17px; font-weight: 750; margin-bottom: 6px; }
.fh-footer-links { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 14px; margin: 0; padding: 0; }
.fh-footer a:not(.fh-brand-link):hover { text-decoration: underline; }
.fh-footer a:focus-visible { outline-color: #fff; }
.fh-footer-contact a { display: block; width: fit-content; }
.fh-footer-phone { font-size: 22px; font-weight: 740; font-variant-numeric: tabular-nums; }
.fh-footer-bottom { margin-top: 23px; padding-top: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; border-top: 1px solid #3a5146; color: #c4d6ca; font-size: 14px; }

.fh-contact-rail {
    position: fixed; z-index: 45; right: 12px; top: 58%; transform: translateY(-50%);
    display: flex; flex-direction: column; width: 62px; padding: 4px;
    border: 1px solid #d6e1da; border-radius: 10px; background: var(--paper); color: var(--deep);
    box-shadow: 0 7px 24px rgba(21,52,37,.13);
}
.fh-contact-rail a, .fh-contact-rail summary {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px;
    min-height: 51px; padding: 4px 2px; border-radius: 5px; font-size: 14px; font-weight: 650;
}
.fh-contact-rail summary { cursor: pointer; list-style: none; }
.fh-contact-rail summary::-webkit-details-marker { display: none; }
.fh-contact-rail a:hover, .fh-contact-rail summary:hover, .fh-rail-details[open] summary { color: var(--accent); background: var(--soft); }
.fh-contact-rail svg { width: 19px; height: 19px; }
.fh-contact-rail .fh-rail-top { min-height: 41px; color: var(--muted); }
.fh-rail-popup {
    position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%);
    width: 212px; padding: 11px; border: 1px solid var(--line); border-radius: 9px;
    background: var(--paper); box-shadow: 0 8px 24px rgba(18,44,31,.13); text-align: center;
}
.fh-rail-popup p { margin-bottom: 5px; font-size: 16px; font-weight: 700; }
.fh-rail-popup img { width: 184px; height: auto; margin-inline: auto; }

@media (min-width: 1051px) and (max-width: 1480px) { :root { --gutter: 84px; } }
@media (max-width: 1050px) {
    :root { --gutter: 28px; }
    body:has(.fh-contact-rail) { padding-bottom: calc(59px + env(safe-area-inset-bottom)); }
    .fh-contact-rail { top: auto; bottom: max(6px, env(safe-area-inset-bottom)); right: 11px; flex-direction: row; width: auto; transform: none; }
    .fh-contact-rail a, .fh-contact-rail summary { min-width: 55px; min-height: 44px; padding: 2px 4px; }
    .fh-rail-popup { top: auto; right: 0; bottom: calc(100% + 7px); transform: none; }
}
@media (max-width: 900px) {
    :root { --header-height: 63px; }
    .fh-header-inner { flex-wrap: wrap; gap: 0 16px; }
    .fh-nav { flex: 1 0 100%; border-top: 1px solid var(--line); }
    .fh-nav > ul, .fh-nav > div > ul { flex-wrap: wrap; gap: 0; padding-block: 7px; }
    .fh-nav li { flex: 0 0 50%; }
    .fh-nav a { padding: 9px 10px; white-space: normal; }
    .fh-nav .current-menu-item > a::after, .fh-nav .current_page_item > a::after { content: none; }
    .fh-nav .sub-menu, .fh-nav .children { position: static; display: block; min-width: 0; border: 0; padding: 0 10px; }
    .fh-hero-inner { min-height: 478px; }
    .fh-hero h1 { font-size: clamp(39px, 7.15vw, 57px); }
    .fh-home-grid { gap: 15px; }
}
@media (max-width: 650px) {
    :root { --gutter: 18px; }
    body { font-size: 16px; }
    .fh-brand-name { font-size: 22px; }
    .fh-mark { width: 36px; height: 36px; }
    .fh-mark svg { width: 27px; height: 27px; }
    .fh-hero-inner { min-height: 398px; align-items: end; }
    .fh-hero-copy { padding-block: 35px; }
    .fh-hero-image { object-position: 61% 50%; }
    .fh-hero-has-image::before { background: linear-gradient(0deg, rgba(8,29,21,.94), rgba(8,30,22,.71) 63%, rgba(8,29,21,.23)); }
    .fh-hero h1 { margin-top: 11px; font-size: clamp(32px, 9.6vw, 44px); }
    .fh-hero-intro { margin-top: 12px; font-size: 16px; }
    .fh-hero-actions { margin-top: 19px; }
    .fh-section { padding-block: 37px; }
    .fh-heading { display: grid; align-items: start; margin-bottom: 17px; }
    .fh-heading .fh-text-link { justify-self: start; }
    .fh-heading h2, .fh-split-copy h2 { font-size: clamp(27px, 7.2vw, 34px); }
    .fh-section-intro { margin-top: 8px; }
    .fh-home-grid, .fh-home-split, .fh-home-service .fh-home-split:not(.fh-home-split--text) { grid-template-columns: minmax(0, 1fr); gap: 17px; }
    .fh-home-company .fh-split-copy { grid-row: 1; }
    .fh-footer-grid { grid-template-columns: 1fr 1fr; gap: 19px; }
    .fh-footer-brand { grid-column: 1 / -1; }
    .fh-footer-links { grid-template-columns: 1fr; }
}
@media (max-width: 782px) { .admin-bar .fh-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .fh-header { top: 0; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
