/* 顶部标志增强自适应样式 */
.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 100%;
    overflow: hidden;
}

.responsive-logo {
    max-width: 100%;
    height: auto !important;
    width: auto;
    max-height: 48px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.main-header.fixed .responsive-logo {
    max-height: 40px;
}

/* 大屏幕设备 */
@media (min-width: 1200px) {
    .responsive-logo {
        max-height: 50px;
    }
    
    .main-header.fixed .responsive-logo {
        max-height: 45px;
    }
}

/* 平板设备 */
@media (max-width: 992px) {
    .responsive-logo {
        max-height: 42px;
    }
    
    .main-header.fixed .responsive-logo {
        max-height: 38px;
    }
}

/* 小型平板和大型手机 */
@media (max-width: 768px) {
    .responsive-logo {
        max-height: 38px;
    }
    
    .main-header.fixed .responsive-logo {
        max-height: 34px;
    }
    
    .footer-about .responsive-logo {
        max-height: 40px;
    }
}

/* 手机设备 */
@media (max-width: 480px) {
    .responsive-logo {
        max-height: 32px;
    }
    
    .main-header.fixed .responsive-logo {
        max-height: 30px;
    }
    
    .footer-about .responsive-logo {
        max-height: 36px;
    }
    
    .contact-info {
        max-width: 300px;
    }
    
    .icon {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group textarea {
        max-width: 280px;
    }
    
    /* 确保联系表单全宽展示 */
    .contact-form {
        width: 100%;
        padding: 15px;
    }
    
    #contact-form {
        width: 100%;
    }
}

/* 小型手机设备 */
@media (max-width: 360px) {
    .responsive-logo {
        max-height: 28px;
    }
    
    .main-header.fixed .responsive-logo {
        max-height: 26px;
    }
    
    .footer-about .responsive-logo {
        max-height: 32px;
    }
    
    .contact-info {
        max-width: 260px;
    }
    
    .icon {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .form-group input,
    .form-group textarea {
        max-width: 240px;
    }
    
    /* 确保联系表单全宽展示 */
    .contact-form {
        padding: 10px;
    }
}

/* 联系我们部分居中显示 */
.contact-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 768px;
    margin: 0 auto;
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

/* 新的联系信息布局样式 */
.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-direction: column;
    text-align: center;
}

.icon {
    font-size: 24px;
    color: #3d70ff;
    margin-bottom: 10px;
    text-align: center;
}

.info-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.info-text p {
    margin: 5px 0 0;
    color: #555;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 15px;
}

/* 表单样式 */
#contact-form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.form-group label {
    text-align: center;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    width: 100%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #3d70ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(61, 112, 255, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

[style*="text-align: center"] {
    text-align: center !important;
    margin-top: 10px;
    width: 100%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .contact-info {
        max-width: 400px;
    }
    
    .contact-grid {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .contact-form {
        padding: 25px 20px;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    .icon {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group textarea {
        max-width: 380px;
    }
}

/* 微信二维码弹窗样式 */
.wechat-modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1200;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

/* 页脚中的彩色logo样式 */
.footer .footer-about .logo img {
    background-color: white;
    padding: 8px;
    border-radius: 5px;
    max-height: 42px;
}

@media (max-width: 768px) {
    .footer .footer-about .logo img {
        max-height: 36px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .footer .footer-about .logo img {
        max-height: 32px;
        padding: 5px;
    }
}

.wechat-modal-content {
    background-color: white;
    max-width: 400px;
    width: 90%;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

.qrcode-container {
    margin: 20px auto;
    border: 1px solid #eee;
    padding: 10px;
    display: inline-block;
    background-color: white;
}

.qrcode-container img {
    width: 250px;
    height: 250px;
    display: block;
}

.wechat-modal-content h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.wechat-modal-content p {
    font-size: 18px;
    margin-top: 20px;
    color: #555;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .wechat-modal-content {
        padding: 30px;
        max-width: 350px;
    }
    
    .qrcode-container img {
        width: 200px;
        height: 200px;
    }
    
    .wechat-modal-content h3 {
        font-size: 20px;
    }
    
    .wechat-modal-content p {
        font-size: 16px;
    }
}

/* 微信弹窗样式覆盖 */
.wechat-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

/* 轮播图样式优化 */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 500px;
    margin-bottom: 30px;
}

.carousel-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
}

.carousel-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.3);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-btn:hover {
    background-color: rgba(255,255,255,0.5);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* 轮播点样式优化 */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    margin: 0 5px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .carousel {
        height: 400px;
    }
    
    .carousel-content h3 {
        font-size: 20px;
    }
}

/* 底部订阅邮箱输入框样式 */
.newsletter-form {
    display: flex;
    margin-top: 15px;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form input[type="email"] {
    height: 50px;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.newsletter-form button {
    height: 46px;
    background-color: #3d70ff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-form button:hover {
    background-color: #2a5ceb;
}

.newsletter-form button i {
    margin-left: 5px;
}

/* 确保在所有设备上保持一致的样式 */
@media (max-width: 992px), (max-width: 768px), (max-width: 480px) {
    .newsletter-form {
        max-width: 400px;
        width: 100%;
    }
    
    .newsletter-form input[type="email"],
    .newsletter-form button {
        width: 100%;
        font-size: 16px;
    }
    
    .newsletter-form input[type="email"] {
        height: 50px;
    }
    
    .newsletter-form button {
        height: 46px;
    }
}
