/* 广西优睿网络科技有限公司官网 - 响应式样式 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

a:hover {
    color: #0066cc;
}

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

/* 头部导航 */
.header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo img {
    height: 50px;
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-left: 10px;
    vertical-align: middle;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    padding: 10px 0;
    font-weight: 500;
}

.nav a.active {
    color: #0066cc;
    border-bottom: 2px solid #0066cc;
}

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

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* Banner */
.banner {
    background: linear-gradient(135deg, #0066cc 0%, #003d7a 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.banner h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.banner p {
    font-size: 20px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ff6600;
    color: #fff;
    border-radius: 5px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn:hover {
    background: #e55a00;
    color: #fff;
}

/* Section */
.section {
    padding: 60px 0;
    background: #fff;
}

.section:nth-child(even) {
    background: #f5f5f5;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #0066cc;
}

/* 列表网格 */
.list-grid, .service-list, .product-list, .case-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.list-item, .service-item, .product-item, .case-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.list-item:hover, .service-item:hover, .product-item:hover, .case-item:hover {
    transform: translateY(-5px);
}

.item-img, .service-img, .product-img, .case-img {
    position: relative;
    overflow: hidden;
}

.item-img img, .service-img img, .product-img img, .case-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.list-item h3, .service-item h3, .product-item h3, .case-item h3 {
    padding: 15px;
    font-size: 18px;
}

.more {
    display: inline-block;
    padding: 8px 20px;
    margin: 0 15px 15px;
    background: #0066cc;
    color: #fff;
    border-radius: 3px;
    font-size: 14px;
}

/* 新闻列表 */
.news-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.news-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-img {
    flex: 0 0 200px;
}

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

.news-info {
    flex: 1;
    padding: 20px;
}

.news-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.date, .click {
    color: #999;
    font-size: 14px;
    margin-top: 5px;
}

/* 详情页 */
.page-section, .detail-section, .list-section {
    padding: 40px 0;
    background: #fff;
    min-height: 60vh;
}

.breadcrumb {
    padding: 15px 0;
    color: #666;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #0066cc;
}

.page-content, .detail-content {
    line-height: 2;
}

.detail-meta {
    color: #999;
    margin-bottom: 20px;
}

.article-nav {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 联系我们 */
.contact-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.contact-card {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.company-info {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.company-info p {
    margin: 10px 0;
    font-size: 16px;
}

.contact-form h2, .contact-info h2 {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

/* 底部 */
.footer {
    background: #333;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer h3 {
    margin-bottom: 15px;
}

.footer-links {
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid #555;
}

.footer-links a {
    color: #ccc;
    margin-right: 15px;
}

.copyright {
    text-align: center;
    color: #999;
    padding-top: 20px;
    border-top: 1px solid #555;
}

.copyright .icp {
    margin-top: 10px;
}

.copyright .icp a {
    color: #999;
    text-decoration: none;
}

.copyright .icp a:hover {
    color: #fff;
}

/* 分页 */
.pagination {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 36px;
    text-align: center;
    line-height: 1.5;
}

.pagination li a:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.pagination li.active span,
.pagination li.current span {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.pagination li.disabled span,
.pagination li.disabled a {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
    pointer-events: none;
}

.pagination li.disabled a:hover {
    background: #f5f5f5;
    color: #ccc;
    border-color: #ddd;
}

/* 兼容直接输出a和span的情况 */
.pagination > a,
.pagination > span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 36px;
    text-align: center;
    line-height: 1.5;
}

.pagination > a:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.pagination > .current,
.pagination > span.current {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.pagination > .disabled,
.pagination > span.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
    pointer-events: none;
}

/* 地区筛选 */
.area-filter {
    margin-bottom: 30px;
}

.area-filter a {
    display: inline-block;
    padding: 8px 20px;
    margin-right: 10px;
    background: #f5f5f5;
    border-radius: 5px;
}

.area-filter a.active {
    background: #0066cc;
    color: #fff;
}

.area-tag, .tui-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #0066cc;
    color: #fff;
    font-size: 12px;
    border-radius: 3px;
    margin: 0 15px 15px;
}

.tui-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6600;
}

/* 响应式设计 - 平板 */
@media (max-width: 992px) {
    .list-grid, .service-list, .product-list, .case-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-list {
        grid-template-columns: 1fr;
    }
    
    .contact-page {
        grid-template-columns: 1fr;
    }
    
    .banner h1 {
        font-size: 36px;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .nav.active {
        display: block;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .nav li {
        border-bottom: 1px solid #eee;
    }
    
    .nav a {
        display: block;
        padding: 15px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .list-grid, .service-list, .product-list, .case-list {
        grid-template-columns: 1fr;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-img {
        flex: none;
        height: 200px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .banner {
        padding: 60px 0;
    }
    
    .banner h1 {
        font-size: 28px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        margin: 0 2px;
        min-width: 32px;
        font-size: 14px;
    }
}

/* 防止内容溢出 */
body {
    overflow-x: hidden;
}

.container {
    overflow-x: hidden;
}

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

/* 图片懒加载样式 */
img.lazyload {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

img.lazyloaded {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 图片容器加载占位符 */
.service-img, .product-img, .case-img, .news-img {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.service-img::before, .product-img::before, .case-img::before, .news-img::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #e0e0e0;
    border-top-color: #999;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.service-img.loading::before, .product-img.loading::before, .case-img.loading::before, .news-img.loading::before {
    opacity: 1;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
