/* ========================================
   南通宇格金属制品有限公司 - 网站样式
   ======================================== */

/* CSS 变量定义 */
:root {
    /* 品牌色彩 */
    --primary: #00475d;
    --primary-dark: #003544;
    --primary-light: #006080;
    --secondary: #00c7ff;
    --accent: #ff6a00;

    /* 中性色 */
    --black: #000000;
    --white: #ffffff;
    --gray-1: #666666;
    --gray-2: #cccccc;
    --gray-3: #f2f2f2;
    --gray-4: #fafafa;

    /* 字体 */
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-1);
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    transition: var(--transition-normal);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

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

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    transition: var(--transition-normal);
}

.navbar.scrolled .logo-text {
    color: var(--primary);
}

.logo-sub {
    font-size: 0.7rem;
    color: var(--secondary);
    letter-spacing: 3.8px;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
    position: relative;
    padding: 0.5rem 0;
}

.navbar.scrolled .nav-link {
    color: var(--gray-1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition-normal);
}

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

.nav-link:hover {
    color: var(--secondary);
}

.navbar.scrolled .nav-link:hover {
    color: var(--primary);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition-normal);
}

.navbar.scrolled .bar {
    background: var(--primary);
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   按钮样式
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

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

.btn-white {
    background: var(--white);
    color: var(--primary);
}

.btn-white:hover {
    background: var(--gray-3);
}

.btn-full {
    width: 100%;
}

/* ========================================
   区域标题样式
   ======================================== */
.section-header {
    margin-bottom: var(--spacing-lg);
}

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

.section-tag {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-xs);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

.section-header.light .section-title {
    color: var(--white);
}

.section-desc {
    font-size: 1.1rem;
    color: var(--gray-1);
    max-width: 600px;
}

.section-header.light .section-desc {
    color: rgba(255, 255, 255, 0.8);
}

.section-header.center .section-desc {
    margin: 0 auto;
}

/* ========================================
   主视觉区域
   ======================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 71, 93, 0.9) 0%, rgba(0, 71, 93, 0.7) 50%, rgba(0, 71, 93, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 80px;
}

.hero-text {
    max-width: 700px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    margin-bottom: var(--spacing-md);
}

.title-line {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: 4px;
}

.title-sub {
    display: block;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--secondary);
    margin-top: var(--spacing-xs);
    letter-spacing: 8px;
}

.hero-desc {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-xs);
}

.hero-subdesc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-md);
    letter-spacing: 4px;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    animation: bounce 2s infinite;
}

.scroll-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--secondary), transparent);
}

/* ========================================
   关于我们区域
   ======================================== */
.about {
    padding: var(--spacing-xl) 0;
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-image {
    position: relative;
}

.image-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.image-frame:hover img {
    transform: scale(1.05);
}

.image-accent {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--secondary);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: 20px;
    background: var(--primary);
    color: var(--white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.badge-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.badge-text {
    font-size: 0.875rem;
    opacity: 0.9;
}

.about-content {
    padding-left: var(--spacing-md);
}

.about-text {
    font-size: 1.05rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.8;
}

.about-text .highlight {
    color: var(--primary);
    font-weight: 600;
}

.feature-list {
    display: grid;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--gray-3);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 0.9rem;
    color: var(--gray-1);
}

/* ========================================
   产品中心区域
   ======================================== */
.products {
    padding: var(--spacing-xl) 0;
    background: var(--gray-4);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 71, 93, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: var(--spacing-sm);
    text-align: center;
}

.product-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.product-info p {
    font-size: 0.9rem;
    color: var(--gray-1);
}

.product-cta {
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.cta-content {
    text-align: center;
    padding: var(--spacing-md);
    color: var(--white);
}

.cta-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.cta-content p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-sm);
}

.btn-contact{
    padding: 0.5rem 1.2rem;;
}

/* ========================================
   企业实力
   ======================================== */
.strength {
    position: relative;
    padding: var(--spacing-xl) 0;
    overflow: hidden;
}

.strength-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.strength-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.strength-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 55, 69, 0.92);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1;
}

.stat-unit {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--white);
    margin-top: 4px;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--spacing-xs);
}

.advantages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.advantage-item {
    text-align: center;
    padding: var(--spacing-md);
}

.advantage-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-sm);
    background: rgba(0, 199, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

.advantage-icon svg {
    width: 28px;
    height: 28px;
}

.advantage-item h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--spacing-xs);
}

.advantage-item p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}


/* ========================================
   联系我们区域
   ======================================== */
.contact {
    padding: var(--spacing-xl) 0;
    background: var(--gray-4);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.contact-desc {
    font-size: 1.05rem;
    color: var(--gray-1);
    margin-bottom: var(--spacing-md);
}

.contact-list {
    display: grid;
    gap: var(--spacing-md);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

.contact-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.contact-text p {
    font-size: 0.95rem;
    color: var(--gray-1);
}

.contact-form-wrapper {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: grid;
    gap: var(--spacing-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-2);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 199, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: var(--spacing-lg) 0 var(--spacing-sm);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-sm);
}

.footer-logo .logo-text {
    font-size: 1.75rem;
    color: var(--white);
}

.footer-logo .logo-sub {
    color: var(--secondary);
}

.footer-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--white);
}

.footer-links ul {
    display: grid;
    gap: 8px;
}

.footer-links a {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-contact p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-sm);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   动画
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-content {
        padding-left: 0;
    }

    .about-image {
        max-width: 600px;
        margin: 0 auto;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantages {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card.featured {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px var(--spacing-md) var(--spacing-md);
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        color: var(--primary);
        font-size: 1.1rem;
        padding: var(--spacing-sm) 0;
    }

    .hamburger {
        display: flex;
    }

    .title-line {
        font-size: 2.5rem;
    }

    .title-sub {
        font-size: 1.25rem;
        letter-spacing: 4px;
    }

    .hero-desc {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-title {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm);
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .title-line {
        font-size: 2rem;
    }

    .title-sub {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .experience-badge {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: var(--spacing-sm);
    }
}

/* ========================================
   滚动显示动画
   ======================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------*/
/* 遮罩层样式 */
.custom-alert-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* 弹窗显示时的状态 */
.custom-alert-mask.show {
    opacity: 1;
    visibility: visible;
}

/* 弹窗主体样式 */
.custom-alert-box {
    width: 90%;
    max-width: 400px;
    background: var(--primary-light);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 24px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.custom-alert-mask.show .custom-alert-box {
    transform: translateY(0);
}

/* 弹窗标题 */
.custom-alert-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
}

/* 弹窗内容 */
.custom-alert-content {
    font-size: 14px;
    color: var(--white);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 按钮容器 */
.custom-alert-btn-wrap {
    display: flex;
    justify-content: flex-end;
}

.btn-alert{
    padding: 0.25rem 1rem;;
}