/*
Theme Name: 企业主题
Description: 企业官网Typecho主题，适用于产品展示和新闻发布
Version: 1.0.0
Author: Custom Theme
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    padding-top: 80px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #c8161d;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

.header {
    background: #c8161d;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    overflow: visible;
}

.header-main {
    padding: 15px 0;
    overflow: visible;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: visible;
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
}

.logo .site-title {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 2px;
}

.main-nav ul {
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav > ul {
    display: flex;
}

.main-nav a {
    font-size: 16px;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    color: #fff;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.current::after {
    width: 100%;
}

.header-search {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    margin-left: 20px;
}

.search-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.search-box {
    display: flex;
    align-items: center;
    margin-right: 10px;
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.search-box.active {
    width: 250px;
}

.search-box form {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0 15px;
    border: none;
    border-radius: 20px 0 0 20px;
    font-size: 14px;
    outline: none;
    width: 180px;
    height: 38px;
    line-height: 38px;
    background: rgba(255, 255, 255, 0.95);
    box-sizing: border-box;
}

.search-box input:focus {
    background: #fff;
}

.search-box button {
    background: #fff;
    color: #c8161d;
    border: none;
    padding: 0 15px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    height: 38px;
    line-height: 38px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: nowrap;
    display: inline-block;
}

.search-box button:hover {
    background: #f5f5f5;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li.has-dropdown > a {
    padding-right: 25px;
}

.main-nav ul li.has-dropdown > a i {
    font-size: 10px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.main-nav ul li.has-dropdown:hover > a i {
    transform: rotate(180deg);
}

.main-nav ul ul,
.main-nav ul .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 8px 0;
    margin: 8px 0 0 0;
    z-index: 10000;
    list-style: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.main-nav ul li.has-dropdown:hover > ul,
.main-nav ul li.has-dropdown:hover > .sub-menu {
    display: block !important;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.main-nav ul ul li,
.main-nav ul .sub-menu li {
    width: 100%;
    margin: 0;
    padding: 0;
}

.main-nav ul ul a,
.main-nav ul .sub-menu a {
    padding: 10px 24px;
    font-size: 14px;
    display: block;
    white-space: nowrap;
    color: #333;
    transition: all 0.25s ease;
    text-align: center;
    margin: 0;
    cursor: pointer;
    border-radius: 8px;
    margin: 2px 8px;
}

.main-nav ul ul a:hover,
.main-nav ul .sub-menu a:hover {
    background: linear-gradient(135deg, #c8161d 0%, #e63946 100%);
    color: #fff;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(200, 22, 29, 0.3);
}

.banner {
    margin-top: 0;
    position: relative;
    overflow: hidden;
    height: 300px;
    background-size: cover;
    background-position: center;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-text h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.banner-text p {
    font-size: 24px;
}

.section {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}

.section-title p {
    color: #666;
    font-size: 15px;
    margin-top: 15px;
}

.section-title::after {
    display: none;
}

.section-title-left {
    text-align: left;
}

.section-title-left::after {
    display: none;
}

.about-section {
    padding: 40px 0;
}

.products-section {
    padding: 40px 0;
}

.news-section {
    padding: 40px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(200, 22, 29, 0.6), rgba(255, 77, 79, 0.6));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    z-index: 1;
}

.product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(200, 22, 29, 0.15);
}

.product-item:hover::before {
    transform: scaleX(1);
}

.product-thumb {
    position: relative;
    overflow: hidden;
    padding-top: 75%;
}

.product-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-item:hover .product-thumb img {
    transform: scale(1.08);
}

.product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
}

.product-info h3 {
    font-size: 15px;
    color: #fff;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    font-weight: 500;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.news-grid-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.news-grid-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.news-grid-item a {
    display: flex;
    gap: 15px;
}

.news-grid-thumb {
    width: 80px;
    min-width: 80px;
    height: 80px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c8161d 0%, #e63946 100%);
    border-radius: 8px;
}

.news-grid-thumb .news-badge {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    letter-spacing: 2px;
}

.news-list-item .news-grid-thumb .news-badge {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    letter-spacing: 2px;
}

.news-grid-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.news-grid-content h3 {
    font-size: 15px;
    margin: 0 0 8px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-grid-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-grid-date {
    font-size: 12px;
    color: #999;
}

.news-list-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.news-list-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.news-list-item a {
    display: flex;
    gap: 30px;
}

.news-list-thumb {
    width: 140px;
    min-width: 140px;
    height: 90px;
    overflow: hidden;
    position: relative;
}

.news-index {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    background: #c8161d;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.news-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-list-item:hover .news-list-thumb img {
    transform: scale(1.05);
}

.news-list-content {
    flex: 1;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.news-list-content h3 {
    font-size: 16px;
    color: #333;
    line-height: 1.4;
    transition: color 0.3s ease;
    margin: 0;
    flex: 1;
}

.news-list-date {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    margin-left: 15px;
}

.news-list-date i {
    margin-right: 5px;
}

.news-list-item:hover .news-list-content h3 {
    color: #c8161d;
}

.news-list-content p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.about-section {
    background: #f5f5f5;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.about-text p {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #c8161d;
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #a01218;
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid #c8161d;
    color: #c8161d;
}

.btn-outline:hover {
    background: #c8161d;
    color: #fff;
}

.page-banner {
    margin-top: 0;
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-banner h1 {
    position: relative;
    color: #fff;
    font-size: 36px;
    z-index: 1;
}

.breadcrumb {
    background: #f5f5f5;
    padding: 15px 0;
    font-size: 14px;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb span {
    margin: 0 10px;
    color: #999;
}

.page-content {
    padding: 60px 0;
}

.company-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.feature-item {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #c8161d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 36px;
    color: #fff;
}

.feature-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.feature-item p {
    font-size: 14px;
    color: #666;
}

.footer {
    background: #222;
    color: #fff;
    padding: 40px 0 0;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
}

.footer-about h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-about p {
    font-size: 14px;
    line-height: 1.7;
    color: #aaa;
}

.footer-contact h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-contact ul li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #aaa;
}

.footer-contact i {
    margin-right: 8px;
    color: #c8161d;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 15px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: #aaa;
}

.footer-bottom a {
    color: #aaa;
    text-decoration: none;
    margin: 0 10px;
}

.footer-bottom a:hover {
    color: #c8161d;
}

.police-record {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.police-icon {
    height: 16px;
    width: auto;
    vertical-align: middle;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination ol,
.pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination li {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    background: #fff;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination a:hover {
    background: #c8161d;
    border-color: #c8161d;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 22, 29, 0.3);
}

.pagination .current {
    background: #c8161d;
    border-color: #c8161d;
    color: #fff;
    font-weight: 500;
}

.pagination .prev,
.pagination .next {
    padding: 0 16px;
}

.page-navigator {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-navigator li {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.page-navigator a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    background: #fff;
    transition: all 0.3s ease;
    text-decoration: none;
}

.page-navigator a:hover {
    background: #c8161d;
    border-color: #c8161d;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 22, 29, 0.3);
}

.page-navigator .current a {
    background: #c8161d;
    border-color: #c8161d;
    color: #fff;
    font-weight: 500;
}

.page-navigator .prev a,
.page-navigator .next a {
    padding: 0 16px;
}

.post-single,
.page-single {
    max-width: 900px;
    margin: 0 auto;
}

.post-title,
.page-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.post-meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.post-meta span {
    margin-right: 20px;
}

.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.page-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.post-content p,
.page-content p {
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-tags a {
    display: inline-block;
    padding: 5px 15px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.post-tags a:hover {
    background: #c8161d;
    color: #fff;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-nav a {
    color: #666;
}

.post-nav a:hover {
    color: #c8161d;
}

.related-posts {
    margin-top: 40px;
}

.related-posts h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.related-posts ul li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.related-posts ul li a {
    color: #666;
}

.related-posts ul li a:hover {
    color: #c8161d;
}

.comments-area {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.comments-title {
    font-size: 20px;
    margin-bottom: 20px;
}

.comment-list {
    margin-bottom: 30px;
}

.comment-list li {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.respond h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.respond form p {
    margin-bottom: 15px;
}

.respond label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.respond input[type="text"],
.respond input[type="email"],
.respond input[type="url"],
.respond textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.respond textarea {
    height: 150px;
    resize: vertical;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #c8161d;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #a01218;
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: repeat(2, 1fr);
    }

    .company-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    .logo .site-title {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .banner,
    .page-banner {
        height: 200px;
    }

    .banner-text h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .banner-text p {
        font-size: 12px;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: #c8161d;
        padding: 20px;
        z-index: 999;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav ul li a {
        padding: 15px 0;
        display: block;
        width: 100%;
    }

    .main-nav ul .sub-menu {
        position: static;
        display: none !important;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 0;
        width: 100%;
        border: none;
    }

    .main-nav ul li.has-dropdown.open > ul,
    .main-nav ul li.has-dropdown.open > .sub-menu {
        display: block !important;
    }

    .main-nav ul .sub-menu a {
        padding: 12px 20px;
        font-size: 14px;
        color: #fff;
    }

    .main-nav ul .sub-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .section {
        padding: 40px 0;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-grid-item a {
        flex-direction: column;
    }

    .news-grid-thumb {
        width: 100%;
        min-width: 100%;
        height: 120px;
    }

    .news-grid-content {
        padding: 15px;
    }

    .news-grid-excerpt {
        display: none;
    }

    .news-list-item a {
        flex-direction: column;
    }

    .news-list-thumb {
        width: 100%;
        min-width: 100%;
        height: 200px;
    }

    .news-list-content {
        padding: 20px;
    }

    .footer-main {
        grid-template-columns: 1fr;
    }

    .company-features {
        grid-template-columns: 1fr;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }
}
