/**
 * ============================================
 * 安徽叁友软件技术有限公司 官方网站样式
 * 主题：深蓝色 + 白色商务简约风格
 * ============================================
 */

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

:root {
    /* 主题色 */
    --primary-color: #1a365d;        /* 深蓝色 */
    --primary-dark: #0f2744;         /* 深海军蓝 */
    --primary-light: #2c5282;        /* 浅海军蓝 */
    --accent-color: #3182ce;         /* 强调蓝 */
    
    /* 辅助色 */
    --text-color: #2d3748;           /* 主要文字 */
    --text-light: #718096;           /* 次要文字 */
    --text-muted: #a0aec0;           /* 弱化文字 */
    
    /* 背景色 */
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-gray: #edf2f7;
    --bg-dark: #1a202c;
    
    /* 边框 */
    --border-color: #e2e8f0;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
}

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

ul, ol {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   顶部信息栏
   ============================================ */
.top-bar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    padding: 10px 0;
    font-size: 14px;
}

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

.top-bar-left span,
.top-bar-right span {
    margin-right: 25px;
}

.top-bar i {
    margin-right: 5px;
    color: #63b3ed;
}

/* ============================================
   导航栏
   ============================================ */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    display: block;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
}

.logo span {
    font-size: 13px;
    color: var(--text-light);
    display: block;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    gap: 5px;
}

.nav-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-menu li a:hover,
.nav-menu li.active a {
    color: var(--accent-color);
    background: var(--bg-light);
}

.nav-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.mobile-menu.active {
    max-height: 400px;
}

.mobile-menu ul {
    padding: 10px 0;
}

.mobile-menu li a {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu li a:hover {
    background: var(--bg-light);
    color: var(--accent-color);
}

/* ============================================
   轮播图
   ============================================ */
.banner {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.banner-slider {
    position: relative;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.banner-slide.active {
    opacity: 1;
    visibility: visible;
}

.banner-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.banner-slide-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>');
    background-size: 100px 100px;
}

.banner-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.banner-text {
    flex: 1;
    max-width: 600px;
    color: var(--bg-white);
}

.banner-image {
    flex: 0 0 auto;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
}

.banner-text h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.banner-text p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.banner-btn {
    display: inline-block;
    padding: 14px 35px;
    background: var(--bg-white);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.banner-btn:hover {
    background: var(--accent-color);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.banner-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.banner-dot.active {
    background: var(--bg-white);
    width: 30px;
    border-radius: 6px;
}

.banner-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
    z-index: 10;
}

.banner-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all var(--transition-fast);
}

.banner-arrow:hover {
    background: rgba(255,255,255,0.4);
}

/* ============================================
   首页板块通用样式
   ============================================ */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-header p {
    font-size: 16px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.section-header .line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 20px auto 0;
    border-radius: 2px;
}

/* ============================================
   服务特色
   ============================================ */
.services-section {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px 25px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon i {
    font-size: 32px;
    color: var(--bg-white);
}

.service-card h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   产品展示
   ============================================ */
.products-section {
    background: var(--bg-white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

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

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

.product-image {
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.product-image i {
    font-size: 60px;
    color: rgba(255,255,255,0.3);
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    pointer-events: none;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.product-tag {
    padding: 4px 10px;
    background: var(--bg-light);
    color: var(--accent-color);
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.product-btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-color);
    color: var(--bg-white);
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.product-btn:hover {
    background: var(--accent-color);
}

/* ============================================
   新闻资讯
   ============================================ */
.news-section {
    background: var(--bg-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
}

.news-image {
    height: 180px;
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--border-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-image i {
    font-size: 50px;
    color: var(--text-muted);
}

.news-content {
    padding: 25px;
}

.news-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.news-meta i {
    margin-right: 5px;
}

.news-content h3 {
    font-size: 17px;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-content p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ============================================
   数据统计
   ============================================ */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    color: var(--bg-white);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    opacity: 0.8;
}

/* ============================================
   关于我们页面
   ============================================ */
.page-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
    text-align: center;
    color: var(--bg-white);
}

.page-banner h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.page-banner p {
    font-size: 16px;
    opacity: 0.9;
}

.about-content {
    padding: 60px 0;
}

.about-section {
    margin-bottom: 60px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.about-section p {
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-section strong {
    color: var(--primary-color);
}

/* ============================================
   产品展示页面
   ============================================ */
.product-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

/* ============================================
   新闻资讯页面
   ============================================ */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.news-item {
    display: flex;
    gap: 25px;
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.news-item:hover {
    box-shadow: var(--shadow-md);
}

.news-date {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: var(--bg-white);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.news-date .day {
    font-size: 28px;
    font-weight: 700;
}

.news-date .month {
    font-size: 14px;
}

.news-item-content {
    flex: 1;
}

.news-item-content h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.news-item-content p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.pagination a:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.pagination span.current {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.pagination span.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ============================================
   联系我们页面
   ============================================ */
.contact-section {
    padding: 60px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

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

.contact-icon i {
    font-size: 20px;
}

.contact-text h4 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.contact-text p {
    font-size: 15px;
    color: var(--text-color);
}

/* 留言表单 */
.contact-form {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-form h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-group label .required {
    color: #e53e3e;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

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

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: var(--bg-white);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-submit:hover {
    background: var(--accent-color);
}

.btn-submit:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* 表单提示 */
.form-message {
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: none;
}

.form-message.success {
    background: #c6f6d5;
    color: #22543d;
    display: block;
}

.form-message.error {
    background: #fed7d7;
    color: #742a2a;
    display: block;
}

/* ============================================
   底部区域
   ============================================ */
.footer {
    background: var(--bg-dark);
    color: var(--bg-white);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--bg-white);
}

.footer-section p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
}

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

.footer-section ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--accent-color);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.footer-contact i {
    color: var(--accent-color);
    margin-top: 3px;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

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

/* ============================================
   返回顶部按钮
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .banner {
        height: 400px;
    }
    
    .banner-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .banner-image {
        max-width: 300px;
        order: -1;
    }
    
    .banner-image img {
        max-height: 200px;
    }
    
    .banner-text h2 {
        font-size: 28px;
    }
    
    .banner-text p {
        font-size: 16px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .services-grid,
    .products-grid,
    .news-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .page-banner h1 {
        font-size: 32px;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-date {
        width: 100%;
        height: 60px;
        flex-direction: row;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .banner-text h2 {
        font-size: 24px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .contact-form {
        padding: 25px;
    }
}
