/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue', Helvetica, 'Hiragino Sans GB', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #333;
    overflow-x: hidden;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 导航栏样式 */
:root {
    --navbar-height: 70px;
    --navbar-height-scrolled: 60px;
    --navbar-height-mobile: 59px;
    --navbar-height-mobile-sm: 50px;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--navbar-height);
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 10px 50px;
    background-color: rgba(255, 255, 255, 0.98);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #0A5C7A;
    white-space: nowrap;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}

.logo-image {
    height: 40px;
    width: auto;
    margin-right: 10px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #0A5C7A;
    font-family: 'Microsoft YaHei', 'SimHei', 'Arial', sans-serif;
    white-space: nowrap;
}

.logo i {
    margin-right: 10px;
    font-size: 28px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #0A5C7A;
}

.nav-links a.active,
.nav-links a.nav-tech.active,
.nav-links a.nav-fermentation.active,
.nav-links a.nav-home.active,
.nav-links a.nav-about.active,
.nav-links a.nav-products.active,
.nav-links a.nav-rd.active,
.nav-links a.nav-cooperate.active,
.nav-links a.nav-serve.active,
.nav-links a.nav-contact.active,
.nav-links a.nav-news.active {
    color: #0A5C7A !important;
    font-weight: 600 !important;
}

.nav-links a.active::after {
    width: 100%;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #0A5C7A;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 滚动进度栏样式 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #0A5C7A, #27AE60);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* 回到顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #0A5C7A 0%, #074560 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(10, 92, 122, 0.3);
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.back-to-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.back-to-top:hover {
    background: linear-gradient(135deg, #074560 0%, #0A5C7A 100%);
    transform: translateY(-8px) scale(1.15) rotate(5deg);
    box-shadow: 0 12px 30px rgba(10, 92, 122, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.back-to-top:hover::before {
    transform: translateX(100%);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    animation: bounceIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05) rotate(2deg);
    box-shadow: 0 4px 15px rgba(10, 92, 122, 0.4);
    transition: all 0.1s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(10, 92, 122, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(10, 92, 122, 0.6), 0 0 0 10px rgba(10, 92, 122, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(10, 92, 122, 0.3);
    }
}

/* 页脚样式 */
footer {
    background-color: #0A5C7A;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20px;
}

.footer-section {
    width: 23%;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-logo-image {
    width: 36px;
    height: 36px;
    margin-right: 10px;
    border-radius: 50%;
}

.footer-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: white;
    font-family: 'Microsoft YaHei', 'SimHei', 'Arial', sans-serif;
}

.footer-logo i {
    margin-right: 10px;
    font-size: 24px;
}

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 15px;
}

.footer-links li {
    margin-bottom: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: block;
    padding: 4px 0;
}

.footer-links a:hover {
    color: white;
}

.contact-item-footer {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-item-footer i {
    margin-right: 10px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-text-footer {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.social-icons {
    display: flex;
    margin-top: 20px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.social-icon i {
    font-size: 16px;
    color: white;
}

/* 通用动画类 */
.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* 隐藏元素的初始状态 */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].show {
    opacity: 1;
    transform: translateY(0);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
}

/* 移动端响应式样式 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #0A5C7A;
    margin: 3px 0;
    transition: 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* 移动端样式 */
@media screen and (max-width: 768px) {
    /* 英雄区域响应式 */
    .hero {
        height: 30vh;
        margin-top: 60px;
    }
    
    .hero-title {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .navbar {
        padding: 15px 20px;
    }
    
    .navbar.scrolled {
        padding: 10px 20px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 59px; /* 768px以下导航栏实际高度 */
        left: -100%;
        width: 100%;
        max-height: calc(100vh - 59px);
        background-color: rgba(255, 255, 255, 0.98);
        padding: 10px;
        transition: left 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        display: grid; /* 使用网格布局 */
        grid-template-columns: repeat(2, 1fr); /* 两列布局 */
        gap: 8px; /* 网格间距 */
        align-content: flex-start;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        text-align: center;
        margin: 0; /* 网格布局不需要margin */
    }
    
    .nav-links a {
        font-size: 15px;
        padding: 10px 12px;
        display: block;
        transition: all 0.3s ease;
        background-color: transparent;
        border: none;
        margin: 0;
    }
    
    .nav-links a:hover {
        color: #0A5C7A;
        transform: translateY(-1px);
    }
    
    .nav-links a.active {
        background-color: transparent;
        border: none;
        color: #0A5C7A;
        font-weight: 600;
        box-shadow: none;
    }
    
    footer {
        padding: 40px 20px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        padding: 0 15px;
    }
    
    .footer-section {
        width: 100%;
        max-width: 400px;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .footer-section:last-child {
        margin-bottom: 0;
    }
    
    .footer-logo {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .footer-description {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .footer-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-links {
        grid-template-columns: 1fr 1fr;
        gap: 6px 12px;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .footer-links a {
        font-size: 13px;
        padding: 3px 0;
    }
    
    .contact-item-footer {
        justify-content: center;
        margin-bottom: 12px;
    }
    
    .contact-item-footer i {
        font-size: 14px;
        margin-right: 8px;
    }
    
    .contact-text-footer {
        font-size: 13px;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .social-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    
    .social-icon i {
        font-size: 14px;
    }
    
    .footer-bottom {
        padding-top: 20px;
        margin-top: 20px;
    }
    
    .footer-bottom p {
        font-size: 12px;
        padding: 0 10px;
    }
}

@media screen and (max-width: 480px) {
    /* 移动端菜单小屏优化 */
    .nav-links {
        top: 50px; /* 480px以下导航栏实际高度 */
        max-height: calc(100vh - 50px);
        grid-template-columns: 1fr; /* 单列布局 */
        padding: 8px;
    }
    
    .nav-links a {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    /* 英雄区域响应式 */
    .hero {
        height: 25vh;
        margin-top: 50px;
    }
    
    .hero-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo i {
        font-size: 24px;
    }
    
    .nav-links {
        grid-template-columns: 1fr; /* 超小屏幕使用单列布局 */
        gap: 6px;
        padding: 8px;
    }
    
    .nav-links a {
        font-size: 14px;
        padding: 8px 10px;
        background-color: transparent;
        border: none;
        margin: 0;
    }
    
    footer {
        padding: 30px 15px 15px;
    }
    
    .footer-content {
        padding: 0 10px;
    }
    
    .footer-section {
        max-width: 100%;
        margin-bottom: 25px;
    }
    
    .footer-logo {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-logo-image {
        width: 32px;
        height: 32px;
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .footer-logo-text {
        font-size: 18px;
    }
    
    .footer-description {
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    .footer-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .footer-links {
        grid-template-columns: 1fr 1fr;
        gap: 4px 8px;
        max-width: 240px;
        margin: 0 auto;
    }
    
    .footer-links a {
        font-size: 11px;
        padding: 2px 0;
    }
    
    .footer-links li {
        margin-bottom: 0;
    }
    
    .contact-item-footer {
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .contact-item-footer i {
        font-size: 12px;
        margin-right: 6px;
    }
    
    .contact-text-footer {
        font-size: 12px;
    }
    
    .social-icon {
        width: 28px;
        height: 28px;
        margin-right: 6px;
    }
    
    .social-icon i {
        font-size: 12px;
    }
    
    .footer-bottom {
        padding-top: 15px;
        margin-top: 15px;
    }
    
    .footer-bottom p {
        font-size: 11px;
        line-height: 1.4;
    }
    
    /* CTA区域超小屏幕响应式 */
    .cta-section {
        padding: 30px 15px;
    }
    
    .cta-title {
        font-size: 24px;
    }
    
    .cta-description {
        font-size: 15px;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* CTA区域样式 */
.cta-section {
    padding: 60px 40px;
    background: url('../images/yingxiong/yx01.jpg') center/cover fixed;
    position: relative;
    color: white;
    text-align: center;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 92, 122, 0.85), rgba(39, 174, 96, 0.85));
    z-index: 1;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.cta-button {
    display: inline-block;
    padding: 18px 35px;
    background: linear-gradient(135deg, #00D4AA, #0A5C7A);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
    position: relative;
    overflow: hidden;
    animation: buttonFadeIn 1s ease-out 0.9s both;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: linear-gradient(135deg, #0A5C7A, #00D4AA);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 212, 170, 0.5);
}

@keyframes buttonFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 英雄区域样式 */
.hero {
    height: 45vh;
    margin-top: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(10, 92, 122, 0.85), rgba(39, 174, 96, 0.75)), url('../images/yingxiong/yx01.jpg') no-repeat center center/cover;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,0L100,100M0,100L100,0" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>') repeat;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    padding: 0 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.8s;
}

/* 通用标题样式 */
.section-title {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    color: #0A5C7A;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #27AE60;
    border-radius: 2px;
}

/* 动画 */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 响应式设计 */
@media (max-width: 992px) {
    :root {
        --navbar-height: var(--navbar-height-scrolled);
    }
    
    .footer-section {
        width: 48%;
        margin: 0 1% 30px;
    }
    
    /* 英雄区域响应式 */
    .hero {
        height: 35vh;
        margin-top: var(--navbar-height);
    }
    
    .hero-title {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    /* CTA区域响应式 */
    .cta-section {
        padding: 40px 20px;
    }
    
    .cta-title {
        font-size: 28px;
    }
    .cta-description {
        font-size: 16px;
    }
    
    .cta-button {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: var(--navbar-height-mobile);
    }
    
    /* 导航栏移动端优化 */
    .navbar {
        padding: 0 20px;
        height: var(--navbar-height);
    }
    
    .logo-image {
        height: 35px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    /* 移动端菜单精确定位 */
    .nav-links {
        position: fixed;
        top: var(--navbar-height);
        left: -100%;
        width: 100%;
        max-height: calc(100vh - var(--navbar-height));
        background-color: rgba(255, 255, 255, 0.98);
        padding: 0;
        margin: 0;
        transition: left 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    /* 英雄区域移动端优化 */
    .hero {
        height: 50vh;
        margin-top: var(--navbar-height);
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    :root {
        --navbar-height: var(--navbar-height-mobile-sm);
    }
    
    /* 导航栏超小屏优化 */
    .navbar {
        padding: 0 15px;
        height: var(--navbar-height);
    }
    
    .logo-image {
        height: 30px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    /* 移动端菜单小屏优化 */
    .nav-links {
        top: var(--navbar-height);
        max-height: calc(100vh - var(--navbar-height));
        grid-template-columns: 1fr; /* 单列布局 */
        padding: 0;
    }
    
    .nav-links a {
        font-size: 14px;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    /* 英雄区域超小屏优化 */
    .hero {
        height: 55vh;
        margin-top: var(--navbar-height);
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 28px;
        margin-bottom: 10px;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 12px;
    }
}