/* 南通家纺创新之家 - 主样式文件 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* 全局样式 */
:root {
    --primary-color: #1e88e5;
    --secondary-color: #ff6f00;
    --accent-color: #f57c00;
    --dark-color: #333333;
    --light-color: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #212529;
    --text-muted: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --gradient-light: linear-gradient(135deg, #e6f7ff 0%, #e3f2fd 50%, #bbdefb 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* 平滑滚动效果 */
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 滚动动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* 动画类 */
.animate-fadeInUp {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fadeInLeft {
    opacity: 0;
    animation: fadeInLeft 0.6s ease forwards;
}

.animate-fadeInRight {
    opacity: 0;
    animation: fadeInRight 0.6s ease forwards;
}

.animate-zoomIn {
    opacity: 0;
    animation: zoomIn 0.6s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* 添加动画延迟 */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-800 {
    animation-delay: 0.8s;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-image: linear-gradient(135deg, #e6f7ff 0%, #e3f2fd 50%, #bbdefb 100%);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* 添加点击效果 */
a:active,
button:active,
.btn:active {
    transform: scale(0.95);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.btn:hover:before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background-color: #1565c0;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(21, 101, 192, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.section {
    padding: 60px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    color: var(--dark-color);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title::after {
    content: '';
    display: block;
    width: 0;
    height: 4px;
    background-color: var(--accent-color);
    margin: 15px auto;
    border-radius: 2px;
    transition: width 0.8s ease;
}

.section-title.visible::after {
    width: 80px;
}

.text-center {
    text-align: center;
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 5px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--dark-color);
}

.logo img {
    height: 50px;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.logo:hover img {
    transform: rotate(5deg);
}

.logo h1 {
    font-size: 22px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.logo:hover h1 {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-link {
    color: var(--dark-color);
    font-weight: 500;
    font-size: 16px;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 60px 0 0;
    position: relative;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    padding: 0 20px;
    min-width: 300px;
    margin-bottom: 20px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-section.about p {
    margin-bottom: 20px;
}

.footer-section .contact span {
    display: block;
    margin-bottom: 10px;
}

.footer-section.links ul li {
    margin-bottom: 10px;
}

.footer-section.links a {
    color: #ddd;
}

.footer-section.links a:hover {
    color: var(--accent-color);
    margin-left: 5px;
}

.contact-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #555;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    margin-bottom: 10px;
}

.contact-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

textarea.contact-input {
    height: 80px;
    resize: none;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    text-align: center;
    padding: 15px 0;
    color: #ddd;
}

/* 轮播图样式 */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 500px;
    margin-bottom: 40px;
}

.carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 20%;
    left: 0;
    width: 100%;
    color: #fff;
    text-align: center;
    padding: 20px;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.carousel-caption h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.carousel-buttons {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 3;
}

.carousel-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn.active {
    background-color: #fff;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    z-index: 3;
    padding: 0 20px;
    transform: translateY(-50%);
}

.carousel-control {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 首页功能模块样式 */
.features {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
}

.feature-card {
    flex: 1;
    min-width: 0;
    max-width: none;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-card:active {
    transform: translateY(-5px) scale(0.98);
}

.feature-icon {
    font-size: 30px;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--accent-color);
}

.feature-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-title {
    color: var(--primary-color);
}

.feature-desc {
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 14px;
}

/* 产品展示样式 */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.product-card {
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: translateY(30px);
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.product-card:active {
    transform: translateY(-5px) scale(0.98);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.product-info {
    padding: 20px;
    position: relative;
    z-index: 1;
}

.product-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(30, 136, 229, 0.05);
    z-index: -1;
    transition: all 0.4s ease;
}

.product-card:hover .product-info::before {
    height: 100%;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.product-card:hover .product-title {
    color: var(--primary-color);
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.product-meta span {
    padding: 4px 10px;
    background-color: rgba(240, 240, 240, 0.7);
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.product-card:hover .product-meta span {
    background-color: rgba(30, 136, 229, 0.1);
}

.product-desc {
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .footer-section {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: #fff;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 20px;
        transition: all 0.5s ease;
        z-index: 999;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .nav-links li a {
        font-size: 18px;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        text-align: center;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .carousel {
        height: 300px;
    }

    .carousel-caption h3 {
        font-size: 20px;
    }

    .footer-section {
        min-width: 100%;
    }

    .feature-card,
    .product-card {
        min-width: 100%;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 24px;
    }
}

/* 合作伙伴样式 */
.partners {
    margin: 30px 0;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.partner-logo {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.partner-logo img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

/* 联系我们样式 */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.contact-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.contact-text {
    color: var(--text-color);
    margin-bottom: 8px;
}

.map-container {
    margin-top: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 400px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 设备卡片样式 */
.equipment-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.category-btn {
    padding: 10px 20px;
    background-color: #f0f0f0;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
    background-color: var(--primary-color);
    color: #fff;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.equipment-card {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
}

.equipment-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.equipment-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.equipment-info {
    padding: 20px;
}

.equipment-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.equipment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-muted);
}

.equipment-description {
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.6;
}

.equipment-feature {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 15px;
}

.equipment-feature i {
    color: var(--accent-color);
    margin-right: 10px;
}

/* 合作伙伴登记弹窗样式 */
#partnerFormModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

#partnerFormModal .partner-modal-content {
    background-color: #fff;
    padding: 30px 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
}

#partnerFormModal h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 2;
}

#partnerFormModal form>div {
    margin-bottom: 18px;
}

#partnerFormModal label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

#partnerFormModal input,
#partnerFormModal select,
#partnerFormModal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 0;
    background: #fafbfc;
    box-sizing: border-box;
}

#partnerFormModal textarea {
    resize: vertical;
}

#partnerFormModal button[type="submit"] {
    padding: 12px 30px;
    background-color: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

#partnerFormModal button[type="submit"]:hover {
    background-color: #1565c0;
}

#partnerFormModal .close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    z-index: 3;
}

@media (max-width: 600px) {
    #partnerFormModal .partner-modal-content {
        padding: 18px 6px;
        max-width: 98vw;
    }

    #partnerFormModal h3 {
        font-size: 20px;
        padding-bottom: 10px;
    }

    #partnerFormModal button[type="submit"] {
        font-size: 15px;
        padding: 10px 0;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex !important;
}

/* 新弹窗样式 */
#customPartnerModal {
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    display: none;
}

#customPartnerModal.active {
    display: block;
}

.custom-modal-mask {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
}

.custom-modal-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    padding: 32px 24px;
    width: 90vw;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.custom-modal-close {
    position: absolute;
    right: 16px;
    top: 12px;
    font-size: 28px;
    color: #888;
    cursor: pointer;
}

#customPartnerForm label {
    display: block;
    margin-bottom: 16px;
    font-weight: 500;
}

#customPartnerForm input,
#customPartnerForm select,
#customPartnerForm textarea {
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}

#customPartnerForm button[type=submit] {
    width: 100%;
    padding: 10px 0;
    background: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    margin-top: 10px;
    cursor: pointer;
}