/*
Theme Name: GeneratePress Child
Template: generatepress
*/

/* ---------- 页眉整体结构 ---------- */
#custom-site-header {
    position: relative;
    z-index: 200;
    font-family: inherit;
}

.header-row {
    width: 100%;
}
.header-top {
    background-color: #002b45;
}
.header-middle {
    background-color: #ffffff;
}
.header-bottom {
    background-color: #0070ad;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* ---------- 上栏：Logo + 主菜单 ---------- */
.header-logo {
    flex-shrink: 0;
}
.header-logo img {
    max-height: 48px;
    width: auto;
    display: block;
}
.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #222;
}

.main-nav ul,
.secondary-nav ul {
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-nav li,
.secondary-nav li {
    margin: 0;
}
.main-nav a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    padding: 8px 0;
    transition: color 0.2s;
}
.main-nav a:hover {
    text-decoration: underline;
}

.header-middle .header-container {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.middle-title {
    font-size: 1rem;
    font-weight: 600;
    color: #025b8c;
}
.secondary-nav a {
    font-size: 1rem;
    font-weight: 600;
    color: #002b45;
}
.middle-title {
    letter-spacing: -0.02em;
    margin: 0;
}

.arrow-icon {
    display: inline-block;
    width: 1px;
    height: 18px;
    background-color: #d0d5dc;
    margin: 0 12px;
    vertical-align: middle;
}

.secondary-nav ul {
    display: flex;
    gap: 35px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.secondary-nav a {
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}
.secondary-nav a:hover {
    color: #025b8c;
}
.secondary-nav ul li:last-child a:hover {
    color: #cf202f;
}

.header-search {
    flex-shrink: 0;
    margin-left: 80px;
}
.header-search .search-form {
    position: relative;
    background-color: #f0f2f5;
    border-radius: 0;
    padding: 0;
}
.header-search .search-field {
    border: none;
    background: transparent;
    padding: 6px 36px 6px 12px;
    font-size: 0.9rem;
    outline: none;
    width: 100%;
    border-radius: 10px;
    box-sizing: border-box;
}
.header-search .search-field:focus {
    width: 100%;
}
.header-search .search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}
.header-search .search-submit svg {
    fill: #5a6e7c;
    transition: fill 0.2s;
    width: 18px;
    height: 18px;
}
.header-search .search-submit:hover svg {
    fill: #cf202f;
}

/* ---------- 下栏：促销信息 ---------- */
.promo-text {
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}
.promo-link {
    color: #ffffff;
    text-decoration: underline;
    margin-left: 8px;
    font-weight: 500;
}
.promo-link:hover {
    color: #ede8e8;
}

/* ========== 主导航下拉菜单（桌面端） ========== */
.main-nav ul li {
    position: relative;
}

.main-nav ul ul {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background-color: #ffffff;
    min-width: 220px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 999;
    display: block !important;
}

.main-nav ul ul li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.main-nav ul ul a {
    display: block;
    padding: 8px 20px;
    color: #002b45 !important;
    background-color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.main-nav ul ul a:hover {
    background-color: #f0f2f5;
    color: #025b8c !important;
    text-decoration: none;
}

.main-nav ul li:hover > ul,
.main-nav ul li:focus-within > ul {
    opacity: 1;
    visibility: visible;
}

.main-nav .menu-item-has-children > a::after {
    content: " ▼";
    font-size: 10px;
    vertical-align: middle;
    margin-left: 4px;
}

.main-nav li.menu-item-has-children > a[href="#"] {
    cursor: default;
    pointer-events: none;
}

/* ========== 自定义页脚（桌面端） ========== */
#custom-site-footer {
    background-color: #002b45;
    color: #eaeaea;
    padding: 40px 0;
    position: relative;
    overflow-x: clip;
}

#custom-site-footer .footer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
    position: relative;
    z-index: 2;
}

#custom-site-footer .footer-col {
    padding: 0 15px;
}
#custom-site-footer .footer-col-1 {
    padding-left: 0;
    position: relative;
    background-color: transparent;
}
#custom-site-footer .footer-col-4 {
    padding-right: 0;
}
.footer-col-1::before {
    content: '';
    position: absolute;
    top: -40px;
    bottom: -40px;
    left: -100vw;
    right: 0;
    background-color: #0c405f;
    z-index: -1;
    pointer-events: none;
}

.footer-subscribe-form .input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.footer-subscribe-form input[type="email"] {
    width: 100%;
    padding: 12px 80px 12px 15px;
    border: 1px solid #4a4a4a;
    background-color: #eaeaea;
    color: #333;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 14px;
}

.footer-subscribe-form .inline-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #002b45;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 10px;
    transition: background-color 0.2s;
}

.footer-subscribe-form .inline-submit:hover {
    color: #025b8c;
}

.form-disclaimer {
    font-size: 12px;
    color: #ccc;
    line-height: 1.4;
    margin: 15px 0 20px 0;
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}
.social-icon:hover {
    opacity: 0.7;
}

#custom-site-footer .footer-widget-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

#custom-site-footer .footer-nav ul,
#custom-site-footer .contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}
#custom-site-footer .footer-nav li,
#custom-site-footer .contact-info li {
    margin-bottom: 10px;
}
#custom-site-footer .footer-nav a,
#custom-site-footer .contact-info a {
    color: #eaeaea;
    text-decoration: none;
}
#custom-site-footer .footer-nav a:hover,
#custom-site-footer .contact-info a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-col-2,
.footer-col-3,
.footer-col-4 {
    font-size: 13px;
}

/* ========== 版权区域 ========== */
.copyright-wrapper {
    background-color: #002b45;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    overflow-x: clip;
}

.copyright-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    text-align: center;
}

.full-width-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1px;
    background-color: #3a3a3a;
    top: 0;
    margin: 0;
    border: none;
}

.copyright-text {
    font-size: 14px;
    color: #aaa;
    line-height: 1.5;
    padding-top: 20px;
    padding-bottom: 20px;
}

/* ========== 表单状态 ========== */
.form-success {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}
.form-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}


/* ========== 移动端统一优化（≤ 768px） ========== */
@media (max-width: 768px) {

    /* ---------- 页眉：汉堡菜单 ---------- */
    .header-middle {
        display: none !important;
    }

    .header-top .header-container {
        position: relative;
        display: block;
        padding: 8px 16px;
        min-height: 50px;
    }

    .header-logo {
        display: inline-block;
        max-width: 70%;
    }
    .header-logo img {
        max-height: 40px;
        width: auto;
        display: block;
    }

    .mobile-menu-toggle {
        position: absolute;
        top: 50%;
        right: 16px;
        transform: translateY(-50%);
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 28px;
        height: 22px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 20;
    }
    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background: #ffffff;
        border-radius: 2px;
        transition: 0.3s;
    }
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .main-nav {
        display: none !important;
        margin-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.1);
        clear: both;
    }
    .main-nav.open {
        display: block !important;
    }

    .main-nav ul {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        background: #002b45;
        padding: 6px 0 !important;
        margin: 0 !important;
        list-style: none;
    }
    .main-nav ul li {
        border-bottom: 1px solid rgba(255,255,255,0.08);
        margin: 0 !important;
    }
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    .main-nav a {
        display: block;
        padding: 10px 16px;
        font-size: 0.95rem;
        color: #fff;
        text-decoration: none;
        text-align: left;
    }
    .main-nav a:hover {
        background: rgba(255,255,255,0.1);
    }

    .main-nav ul ul {
        position: static !important;
        box-shadow: none !important;
        background: #003855 !important;
        padding-left: 20px !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        top: auto !important;
        left: auto !important;
    }
    .main-nav ul ul a {
        color: #ddd !important;
        background: transparent !important;
        font-weight: 400;
        padding: 8px 16px;
    }
    .main-nav ul ul a:hover {
        background: rgba(255,255,255,0.05) !important;
    }
    .main-nav .menu-item-has-children > a::after {
        content: " ▼";
        font-size: 0.7rem;
    }

    .header-bottom .promo-text {
        font-size: 0.8rem;
        padding: 6px 0;
    }

    /* ---------- 页脚：精简为两列 ---------- */
    #custom-site-footer .footer-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    #custom-site-footer .footer-col-2,
    #custom-site-footer .footer-col-3 {
        display: none !important;
    }
    #custom-site-footer .footer-col-1 {
        padding-left: 16px !important;
        padding-right: 16px !important;
        background-color: transparent !important;
    }
    .footer-col-1::before {
        display: none !important;
    }
    .footer-col-1 .footer-widget-title,
    .footer-col-1 p {
        text-align: left;
    }

    .footer-subscribe-form .input-wrapper {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .footer-subscribe-form input[type="email"] {
        padding: 12px 15px;
        border-radius: 6px;
    }
    .footer-subscribe-form .inline-submit {
        position: static;
        transform: none;
        width: 100%;
        background: #007cba;
        color: #fff;
        border-radius: 6px;
        padding: 10px;
        font-weight: 600;
        text-align: center;
    }
    .footer-subscribe-form .inline-submit:hover {
        background: #005a87;
        color: #fff;
    }

    .copyright-text {
        font-size: 12px;
        padding-top: 15px;
        padding-bottom: 15px;
    }
}

/* 桌面端强制隐藏汉堡 */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    .main-nav {
        display: block !important;
    }
}

/* 桌面端中等屏幕页眉微调 */
@media (max-width: 860px) {
    .header-middle .header-container {
        gap: 16px;
    }
    .arrow-icon {
        margin: 0 4px;
    }
    .secondary-nav ul {
        gap: 16px;
    }
    .header-search .search-field {
        width: 120px;
    }
    .header-container {
        flex-direction: column;
        text-align: center;
        padding: 12px 20px;
    }
    .main-nav ul,
    .secondary-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    .middle-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 600px) {
    .header-middle .header-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .arrow-icon {
        display: none;
    }
    .header-search .search-field {
        width: 100%;
    }
}


/* ==========================================
   全站浮动联系按钮
   ========================================== */
.floating-contact {
    position: fixed;
    right: 24px;
    bottom: 120px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.floating-contact .contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #002b45;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    cursor: pointer;
    position: relative;
}

.floating-contact .contact-btn:hover {
    transform: translateY(-4px) scale(1.04);
    background: #0070ad;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.floating-contact .contact-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    display: block;
}

/* ----- 回到顶部按钮（默认隐藏） ----- */
.floating-contact .back-to-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.9);
    background: rgba(0, 43, 69, 0.8);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.floating-contact .back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.floating-contact .back-to-top:hover {
    background: #cf202f;
    transform: translateY(-4px) scale(1.04);
}

/* ----- 悬浮提示（Tooltip） ----- */
.floating-contact .contact-btn .tooltip {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    background: #002b45;
    color: #fff;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    pointer-events: none;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.floating-contact .contact-btn .tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #002b45;
}

.floating-contact .contact-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* ----- 移动端适配 ----- */
@media (max-width: 768px) {
    .floating-contact {
        right: 14px;
        bottom: 100px;
        gap: 10px;
    }
    .floating-contact .contact-btn {
        width: 44px;
        height: 44px;
    }
    .floating-contact .contact-btn svg {
        width: 20px;
        height: 20px;
    }
    .floating-contact .contact-btn .tooltip {
        display: none;  /* 移动端无 hover，直接隐藏 */
    }
}