/* 
  大连天乙刀具有限公司网站样式表
  版本：2.0
  日期：2026年2月
*/

/* ============ CSS重置 ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* ============ CSS变量 ============ */
:root {
    --primary-color: #000000;
    --secondary-color: #1868e1;
    --accent-color: #34a853;
    --dark-color: #202124;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-light: #666;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* ============ 基础样式 ============ */
body {
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ 顶部导航栏样式 ============ */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 8px;
}

.logo-img {
    width: 40px;
    height: 40px;
    margin-right: 8px;
    object-fit: contain;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}

/* ============ 英雄区域样式 ============ */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    padding: 160px 0 100px;
    margin-top: 70px;
    text-align: center;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 30px;
}

/* ============ 按钮样式 ============ */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 14px 32px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 15px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ============ 特色服务区域样式 ============ */
.services {
    padding: 100px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 40px 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.service-icon {
    background-color: rgba(26, 115, 232, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.service-icon i {
    font-size: 36px;
    color: var(--primary-color);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* ============ 产品展示区域样式 ============ */
.products {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 220px;
    background: linear-gradient(135deg, #e4edf5 0%, #f5f7fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    text-align: center;
    color: var(--primary-color);
}

.image-placeholder i {
    font-size: 80px;
    margin-bottom: 15px;
    display: block;
}

.image-placeholder span {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
}

.product-content {
    padding: 25px;
}

.product-content h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.product-subtitle {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.product-description {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.product-features span {
    background-color: rgba(36, 95, 245, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-features i {
    font-size: 0.8rem;
}

.text-center {
    text-align: center;
}

/* ============ 关于我们区域样式 ============ */
.about {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 25px;
    color: var(--text-light);
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============ 页脚样式 ============ */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 70px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: white;
}

.footer-column p {
    color: #b0b7c3;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
    color: #b0b7c3;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-links li i {
    margin-top: 3px;
    color: #b0b7c3;
}

.footer-links a {
    color: #b0b7c3;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #2d3748;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #2d3748;
    color: #b0b7c3;
    font-size: 0.9rem;
}

/* ============ 子页面通用样式 ============ */

/* 面包屑导航 */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 50px;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb span {
    color: var(--text-light);
    margin: 0 10px;
}

/* 页面标题区域 - 通用样式，具体图片在各页面单独设置 */
.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
    color: white;
    padding: 140px 0 80px;
    margin-top: 70px;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: white;
}

/* 产品页面表格容器 */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* 材料选型部分特有样式 */
.material-guide {
    padding: 80px 0;
    background-color: white;
}

.material-table {
    margin-bottom: 50px;
}

.material-notes {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
}

.material-notes h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.material-notes ul {
    list-style-type: none;
    padding-left: 0;
}

.material-notes li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.material-notes li::before {
    content: '•';
    color: var(--primary-color);
    font-size: 1.2rem;
    position: absolute;
    left: 0;
}

/* 咨询卡片样式增强 */
.consult-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(26, 115, 232, 0.3);
    transition: var(--transition);
}

.consult-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(26, 115, 232, 0.4);
}

.consult-card h3 {
    color: white;
    margin-bottom: 15px;
}

.consult-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.consult-btn {
    background-color: white;
    color: var(--primary-color);
    border: none;
}

.consult-btn:hover {
    background-color: #f0f0f0;
}

/* ============ 响应式设计 ============ */

/* 平板设备（宽度小于992px） */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-header h1 {
        font-size: 2.8rem;
    }
}

/* 移动设备（宽度小于768px） */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        flex-direction: column;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 0;
        text-align: center;
        padding: 10px 0;
        width: 100%;
    }
    
    /* 移动端下拉菜单样式 - 新增/修改 */
    .dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        display: none; /* 默认隐藏 */
        position: static; /* 静态定位，不脱离文档流 */
        width: 100%;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        background-color: #f8f9fa;
        border-radius: 0;
        margin-top: 5px;
    }
    
    .dropdown.active .dropdown-menu {
        display: block; /* 激活时显示 */
    }
    
    .dropdown-item {
        padding: 12px 20px 12px 40px; /* 增加左边距，显示层级关系 */
        color: #333;
        text-decoration: none;
        display: block;
        text-align: left;
        border-top: 1px solid #eee;
    }
    
    .dropdown-item:hover {
        background-color: #e9ecef;
    }
    
    .nav-links .dropdown-toggle .fa-chevron-down {
        display: inline-block; /* 在移动端也显示 */
        margin-left: 5px;
        transition: transform 0.3s ease;
    }
    
    .dropdown.active .dropdown-toggle .fa-chevron-down {
        transform: rotate(180deg); /* 展开时旋转箭头 */
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* 其他现有样式保持不变 */
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero .btn-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-outline {
        margin-left: 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .product-image {
        height: 180px;
    }
    
    .image-placeholder i {
        font-size: 60px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
}

/* 小屏幕移动设备（宽度小于576px） */
@media (max-width: 576px) {
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .about-text h2 {
        font-size: 1.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        padding: 100px 0 60px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
}
/* 在style.css中添加触摸友好的按钮 */
@media (max-width: 768px) {
    .btn, .category-btn, .nav-links a {
        min-height: 44px; /* iOS可点击区域标准 */
        min-width: 44px;
    }
}

/* ============ 下拉菜单样式 ============ */
.nav-links .dropdown {
    position: relative;
}

.nav-links .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links .dropdown-toggle .fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-links .dropdown:hover .dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: #2c5282;
    padding-left: 25px;
}

/* 防止下拉菜单在移动设备上显示 */
@media (max-width: 768px) {
    .dropdown-menu {
        display: none;
    }
    
    .nav-links .dropdown-toggle .fa-chevron-down {
        display: none;
    }
}

/* ============ 服务卡片链接样式 ============ */
.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: var(--transition);
}

.service-card-link:hover .service-card {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

/* 确保卡片链接在移动设备上有良好的触摸体验 */
@media (max-width: 768px) {
    .service-card-link {
        min-height: 44px; /* iOS可点击区域标准 */
    }
}

/* 更新原有的服务卡片样式，确保与链接样式兼容 */
.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 40px 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    height: 100%;
}

/* 移除原服务卡片的悬停效果，现在由父级链接控制 */
.service-card:hover {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

/* 在刀具修磨页面的style标签中添加以下样式 */

/* 服务卡片图片样式 */
.service-image {
    position: relative;
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 15px;
    text-align: center;
}

.image-overlay span {
    font-size: 1rem;
    font-weight: 600;
}

/* 应用标签样式 */
.service-applications {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.application-tag {
    background-color: rgba(26, 115, 232, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .service-image {
        height: 180px;
    }
    
    .application-tag {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}
/* ============ 图片轮播样式 ============ */
.image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.carousel-images {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 导航按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    z-index: 10;
    font-size: 16px;
}

.carousel-btn:hover,
.carousel-btn:focus {
    background-color: rgba(0, 0, 0, 0.8);
    outline: 2px solid white;
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

/* 鼠标悬停时显示按钮 */
.variant-image:hover .carousel-btn {
    opacity: 1;
}

/* 触摸设备始终显示按钮 */
@media (hover: none) and (pointer: coarse) {
    .carousel-btn {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.7);
        width: 36px;
        height: 36px;
    }
}

/* 指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    padding: 0;
}

.indicator.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.indicator:hover,
.indicator:focus {
    background-color: rgba(255, 255, 255, 0.8);
    outline: none;
}

/* 图片计数器 */
.image-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 10;
}

/* 加载状态 */
.carousel-slide img.loading {
    background-color: #f0f0f0;
    animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-btn {
        opacity: 1;
        width: 36px;
        height: 36px;
    }
    
    .carousel-btn i {
        font-size: 0.9rem;
    }
    
    .prev-btn {
        left: 8px;
    }
    
    .next-btn {
        right: 8px;
    }
    
    .carousel-indicators {
        bottom: 10px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
    
    .image-counter {
        bottom: 10px;
        right: 10px;
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}

/* 无障碍访问改进 */
.carousel-btn:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

.indicator:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}