/* ============================================
   Theme Name: 双圆
   Author: akwisiu
   Description: 山东双圆独立站1
   Version: 1.0
   ============================================ */

/* ========== 颜色变量定义 ========== */
:root {
    /* 主色调 */
    --primary-color: #179744;
    --primary-hover: #0f7a38;
    --primary-light: #2bdca0;
    /* 辅助色 */
    --secondary-color: #2563eb;
    --secondary-hover: #1d4ed8;
    /* 背景色 */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f5f5f5;
    --bg-dark: #1e293b;
    /* 文字色 */
    --text-dark: #1f2937;
    --text-gray: #475569;
    --text-light: #64748b;
    --text-white: #ffffff;
    --text-black: #000000;
    /* 边框色 */
    --border-light: #e2e8f0;
    /* 导航栏 */
    --navbar-bg-scrolled: #179744e6;
    /* 按钮 */
    --btn-primary-bg: #179744;
    --btn-primary-hover: #0f7a38;
    --btn-outline-border: #179744;
    --btn-outline-text: #179744;
    /* Logo 滚动后效果 */
    --logo-filter-scrolled: grayscale(100%) brightness(453%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-dark);
}
html {
  scroll-padding-top: 90px; /* 全局锚点偏移 */
}
/* ========== 导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: padding 0.3s ease;
}

/* Logo */
.logo a {
    display: inline-block;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.logo-img,
.custom-logo {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.navbar.scrolled .logo-img,
.navbar.scrolled .custom-logo {
    max-width: 80px;
    max-height: 80px;
    transition: all 0.3s ease;
    /* filter: var(--logo-filter-scrolled); */
}

.logo-text {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

/* 桌面菜单 */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 0;
}

.nav-menu li a {
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
    color: var(--text-dark);
    padding: 0.5rem 0;
    display: inline-block;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

.btn-outline {
    border: 1.5px solid var(--btn-outline-border);
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

/* 滚动后导航栏 */
.navbar.scrolled {
    /* background-color: var(--navbar-bg-scrolled); */
    background-color: var(--bg-white);
}

.navbar.scrolled .nav-container {
    padding-top: 8px;
    padding-bottom: 8px;
}

.navbar.scrolled .logo a {
    /* color: var(--text-white); */
    color: var(--text-dark);
    font-size: 1.3rem;
}

.navbar.scrolled .logo-text {
    font-size: 1.2rem;
}

.navbar.scrolled .nav-menu li a {
    /* color: var(--text-white); */
    color: var(--text-dark);
}

.navbar.scrolled .nav-menu li a:hover {
    color: #94a3b8;
}

.navbar.scrolled .btn-outline {
    border-color: var(--text-white);
    color: var(--text-white);
}

.navbar.scrolled .btn-outline:hover {
    background-color: var(--text-white);
    color: var(--bg-dark);
}

/* ========== 移动端菜单 ========== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar.scrolled .hamburger-line {
    /* background-color: var(--text-white); */
    background-color: var(--bg-dark);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background-color: var(--bg-white);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    padding: 80px 24px 24px;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-container {
    right: 0;
}

.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu li {
    margin-bottom: 20px;
}

.mobile-menu li a {
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-dark);
    display: block;
    padding: 8px 0;
    transition: color 0.2s;
}

.mobile-menu li a:hover {
    color: var(--primary-color);
}

.mobile-menu .btn-outline {
    display: inline-block;
    border: 1.5px solid var(--btn-outline-border);
    padding: 8px 20px;
    border-radius: 40px;
    text-align: center;
}

.mobile-menu .btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.navbar.scrolled .mobile-menu-container {
    background-color: var(--primary-light);
}

.navbar.scrolled .mobile-menu li a {
    color: var(--text-white);
}

.navbar.scrolled .mobile-menu li a:hover {
    color: #94a3b8;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 14px 20px;
    }
    
    .desktop-menu {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .navbar.scrolled .nav-container {
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

@media (min-width: 769px) {
    .mobile-menu-overlay {
        display: none !important;
    }
}


@media (max-width: 768px) {
    /* 移动端导航栏始终有背景色 */
    .navbar {
        background-color: var(--bg-white) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    /* 滚动后移动端导航栏 */
    .navbar.scrolled {
        /* background-color: var(--navbar-bg-scrolled) !important;
         */
         background-color: var(--bg-white);
    }
    
    /* 移动端 logo 缩小 */
    .logo-img,
    .custom-logo {
        max-width: 50px;
        max-height: 50px;
    }
    
    /* 移动端主内容区添加顶部内边距，避免被导航栏遮挡 */
    .site-main {
        padding-top: 70px;
    }
    
    /* 轮播图容器调整 */
    .Hbanner {
        margin-top: 75px;
    }
}

@media (min-width: 769px) {

    .site-main {
        padding-top: 0;
    }
}
/* ===== 桌面端菜单包装器 ===== */
.desktop-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 桌面端搜索按钮 */
.header-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-dark, #1f2937);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 38px;
    height: 38px;
}

.header-search-toggle:hover {
    background: rgba(23, 151, 68, 0.1);
    color: var(--primary-color, #179744);
}

.header-search-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
}
/* ===== 搜索弹窗 ===== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-modal.open {
    display: flex;
}

/* 遮罩层 */
.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* 弹窗内容 */
.search-modal-content {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 600px;
    background: var(--bg-white, #ffffff);
    border-radius: 16px;
    padding: 40px 32px 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    animation: searchFadeIn 0.3s ease;
}

@keyframes searchFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 关闭按钮 */
.search-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: var(--text-light, #64748b);
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px 8px;
    line-height: 1;
}

.search-modal-close:hover {
    color: var(--text-dark, #1f2937);
    transform: rotate(90deg);
}

/* 搜索表单 */
.search-modal-content .search-form {
    display: flex;
    gap: 12px;
}

.search-modal-content .search-form input[type="search"] {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-light, #e2e8f0);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    background: var(--bg-light, #f8fafc);
}

.search-modal-content .search-form input[type="search"]:focus {
    border-color: var(--primary-color, #179744);
    background: var(--bg-white, #ffffff);
}

.search-modal-content .search-form button[type="submit"] {
    padding: 14px 28px;
    background: var(--primary-color, #179744);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-modal-content .search-form button[type="submit"]:hover {
    background: var(--primary-hover, #0f7a38);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .search-modal-content {
        padding: 30px 20px 24px;
    }
    
    .search-modal-content .search-form {
        flex-direction: column;
    }
    
    .search-modal-content .search-form button[type="submit"] {
        padding: 12px;
        width: 100%;
    }
}

/* ===== 移动端隐藏搜索按钮 ===== */
@media (max-width: 768px) {
    .header-search-toggle {
        display: none !important;
    }
}
/* ========== 主内容区 ========== */
.site-main {
    padding-top: 100px;
    background-color: var(--bg-gray);
}
@media(max-width:768px){
    .site-main{
        padding-top: 0px;
    }
}
.page-banner {
    width: 100%;
    min-height: 500px;
    background-size: cover;
    background-position: center 70%;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    /* padding: 60px 20px; */
}
/* 遮罩层，保证文字可读 */
.banner-overlay {
    width: 100%;
    min-height: 500px;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    padding: 60px 20px;
    /* margin: -60px -20px; */
}
.banner-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    display: flex;           /* 添加 */
    flex-direction: column;  /* 添加 */
    text-align: center;
    align-items: center;
}
.banner-content {
    max-width: 700px;
}
.banner-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom:16px;
    align-self: center;
}

/* ========== 回到顶部按钮 ========== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}
/* ============================================
   Footer 样式
   ============================================ */

.site-footer {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 60px 0 0;
    /* margin-top: 60px; */
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.footer-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-row .logo-img{
    /* height: ; */
    color: grayscale(100%) brightness(453%);
}
.footer-logo{
    filter: var(--logo-filter-scrolled);
    max-width: 80px;
    max-height: 80px;
}
.footer-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color, #179744);
}
.footer-title a{
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.2s ease;
}
.footer-title a:hover{
    padding-left: 5px;
}
.footer-desc {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-white);
    margin: 0;
}
.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col ul li a {
    display: inline-block;
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.footer-col ul li a:hover {
    /* color: var(--primary-hover); */
    padding-left: 5px;
}
.footer-contact ul li {
    color: var(--text-white);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-contact ul li a {
    color: var(--text-white);
    text-decoration: none;
    /* transition: color 0.2s; */
}
/* .footer-contact ul li a:hover {
    color: var(--primary-hover);
} */
/* 版权信息 */
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
    color: var(--text-white);
}
.footer-bottom a {
    color: var(--text-white);
    text-decoration: none;
}
.footer-bottom a:hover {
    /* color: var(--primary-hover); */
    color: var(--bg-dark);
}
/* 移动端适配 */
@media (max-width: 1024px) {
    .footer-row {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0 0;
        margin-top: 40px;
    }
    .footer-container {
        padding: 0 20px;
    }
    .footer-row {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-bottom: 30px;
    }
    .footer-title {
        font-size: 1rem;
    }
    .footer-desc {
        font-size: 0.85rem;
    }
    .footer-col ul li a {
        font-size: 0.85rem;
    }
    .footer-contact ul li {
        font-size: 0.85rem;
    }
}
/* ============================================
   Footer 社交媒体图标（联系我们下方）
   ============================================ */

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.25s ease;
}

.footer-social a:hover {
    background-color: #ffffff;
    color: var(--primary-color, #179744);
    transform: translateY(-3px);
}

.footer-social a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}
/* ============================================
   微信二维码 hover 浮层
   ============================================ */

/* 包裹层，用于定位浮层 */
.wechat-wrap {
    position: relative;
    display: inline-flex;
}

/* 二维码浮层：默认隐藏 */
.wechat-qr {
    position: absolute;
    bottom: calc(100% + 12px);   /* 显示在图标上方 */
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #ffffff;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 20;
}

/* 小三角箭头 */
.wechat-qr::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #ffffff;
}

.wechat-qr img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.wechat-qr span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #333;
    line-height: 1;
}

/* hover 时显示 */
.wechat-wrap:hover .wechat-qr {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* 移动端：屏幕窄，浮层改为居中且宽度自适应，避免溢出 */
@media (max-width: 768px) {
    .wechat-qr {
        left: 0;
        transform: translateX(-50%) translateY(6px);
    }
    .wechat-wrap:hover .wechat-qr {
        transform: translateX(-50%) translateY(0);
    }
    .wechat-qr img {
        width: 100px;
        height: 100px;
    }
    .footer-social a {
    width: 37px;
    height: 37px;
    }
}
/* ===== WhatsApp 角标 ===== */
.whatsapp-float {
    position: fixed;
    top: 80%;
    right: 0px;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: #ffffff;
    border-radius: 12px;
}
.whatsapp-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.whatsapp-float svg {
    width: 28px;
    height: 28px;
    display: block;
    fill: #25D366;
    transition: fill 0.3s ease;
}

.whatsapp-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: #25D366;
    letter-spacing: 0.3px;
    line-height: 1.2;
    text-align: center;
    transition: color 0.3s ease;
}

/* ===== 悬停效果 ===== */
.whatsapp-float:hover .whatsapp-content {
    background-color: #25D366;
}

.whatsapp-float:hover svg {
    fill: #ffffff; 
}

.whatsapp-float:hover .whatsapp-label {
    color: #ffffff;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    .whatsapp-float {
        right: 12px;
    }
    .whatsapp-float svg {
        width: 22px;
        height: 22px;
    }
    .whatsapp-label {
        font-size: 0.5rem;
    }
    .whatsapp-content {
        padding: 6px 4px;
    }
}
/* ===== 下拉选择框样式 ===== */
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light, #e2e8f0);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--bg-white, #ffffff);
    font-family: inherit;
    transition: border-color 0.3s ease;
    appearance: auto;
    cursor: pointer;
    color: var(--text-dark, #1f2937);
}

.form-select:focus {
    border-color: var(--primary-color, #179744);
    outline: none;
}

.form-select option {
    padding: 8px;
}

/* 占位选项样式（可选） */
.form-select option[value=""] {
    color: var(--text-light, #64748b);
}   
/* ===== 404 页面 ===== */
.error-404 {
    padding: 100px 0 120px;
    background: var(--bg-light, #f8fafc);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-404 .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--primary-color, #179744);
    line-height: 1;
    margin-bottom: 10px;
}

.error-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--bg-dark, #1e293b);
    margin-bottom: 16px;
}

.error-desc {
    font-size: 1.05rem;
    color: var(--text-gray, #475569);
    line-height: 1.6;
    margin-bottom: 30px;
}

.error-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.error-btn {
    display: inline-block;
    padding: 14px 40px;
    background: var(--primary-color, #179744);
    color: #ffffff;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.error-btn:hover {
    background: var(--primary-hover, #0f7a38);
    transform: translateY(-2px);
}

.error-actions .search-form {
    width: 100%;
    max-width: 400px;
}

.error-actions .search-form input[type="search"] {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid var(--border-light, #e2e8f0);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.error-actions .search-form input[type="search"]:focus {
    border-color: var(--primary-color, #179744);
}

@media (max-width: 768px) {
    .error-404 {
        padding: 60px 0 80px;
    }
    .error-code {
        font-size: 5rem;
    }
    .error-title {
        font-size: 1.5rem;
    }
}
