/* 案例展示列表页和详情页样式 */

/* 导航栏 - 参考 services.css */
.cases-nav {
    position: relative;
    background: #003561 url('../img/cases-nav.jpg') no-repeat center center;
    background-size: 100% 100%;
    min-height: 80px;
    padding:50px 0 45px;
    z-index: 1000;
}

.cases-nav .navbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    position: relative;
}

.cases-nav .navbar-nav {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

.cases-nav .navbar-nav li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    position: relative;
}

.cases-nav .navbar-nav li a:hover {
    color: #ffc107;
}

.cases-nav .navbar-nav li a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #ffc107;
    transition: width 0.3s;
}

.cases-nav .navbar-nav li.active a::after {
    width: 40px;
}

.cases-nav .navbar-nav li.active a {
    color: #ffc107;
}

.cases-nav .navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.cases-nav .navbar-toggle .toggle-bar {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

/* 案例头部 - 居中显示 */
.cases-header {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 70px 0 100px;
}

.cases-header-content {
    display: flex;
    justify-content: center;
    width: 100%;
}

.cases-header-text {
    text-align: left;
}

.cases-header-content h1 {
    font-size: 42px;
    font-weight: 300;
    margin-bottom: 10px;
    letter-spacing: 4px;
    color: #ffc107;
}

.cases-header-text p {
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    opacity: 1.0;
    line-height: 1.2;
    margin: 5px 0;
    color: #ffc107;
}

/* 筛选区域 */
.cases-filter-section {
    padding: 60px 0 0px;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 15px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.filter-tab:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;
    background: #ddd;
}

.filter-tab:hover,
.filter-tab.active {
    color: #ffc107;
}

/* 案例列表 */
.cases-list-section {
    padding: 60px 0 120px;
}

.cases-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.case-list-item {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

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

.case-list-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 2px;
    background: #e0e0e0;
}

.case-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-list-item:hover .case-list-img img {
    transform: scale(1.05);
}

.case-list-item h3 {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    margin-top: 12px;
    text-align: left;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 50px;
}

.page-btn {
    padding: 5px 8px;
    font-size: 9px;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.page-btn:hover,
.page-btn.active {
    background: #ff9100;
    color: #fff;
    border-color: #ff9100;
}

.page-ellipsis {
    display: inline-block;
    padding: 5px 8px;
    color: #999;
    font-size: 9px;
}

/* 案例详情页 */
.case-detail-section {
    padding: 60px 0 15px;
}

.case-detail-content {
    max-width: 900px;
    margin: 20px auto 0;
}

.case-detail-title {
    font-size: 28px;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
}

.case-detail-subtitle {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
}

.case-detail-tags {
    text-align: center;
    margin-bottom: 30px;
}

.tag-item {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f0f0;
    color: #666;
    font-size: 13px;
    border-radius: 15px;
    margin: 0 5px;
}

.case-detail-image {
    text-align: center;
    margin-bottom: 40px;
}

.case-detail-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.case-detail-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.case-detail-image-item {
    text-align: center;
    width: 100%;
}

.case-detail-image-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.case-detail-body {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

.case-detail-body p {
    margin-bottom: 15px;
}

.case-detail-body img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* 上下篇导航 */
.case-detail-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 5px;
    border-top: 1px solid #eee;
}

.case-nav-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    max-width: 45%;
    padding: 15px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.case-nav-link:hover {
    background: #f8f8f8;
}

.case-nav-link.disabled {
    color: #999;
    cursor: default;
}

.nav-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.nav-title {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prev-link {
    text-align: left;
    padding-left: 20%;
}

.next-link {
    text-align: right;
    padding-right: 20%;
}

/* 返回列表按钮 */
.case-detail-back {
    text-align: center;
    margin-top: 30px;
}

.back-btn {
    display: inline-block;
    padding: 10px 30px;
    background: transparent;
    color: #ffb02c;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: #ffb02c;
    opacity: 0.8;
}

/* Footer 样式 - 参考 services.css */
.footer-content {
    display: flex;
    flex-direction: column;
}

.image-underline {
    width: 180px;
    height: 3px;
    background: #333;
    margin: 0 auto;
    margin: -10px auto 60px;
}

.footer-desc {
    text-align: left;
    color: #fff;
    font-size: 14px;
    margin-bottom: 30px;
    margin-left: 60px;
    opacity: 0.8;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* 响应式 */
@media (max-width: 1200px) {
    .cases-list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .cases-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cases-header-content h1 {
        font-size: 32px;
    }

    .cases-nav {
        padding: 20px 0 10px;
    }
}

@media (max-width: 768px) {
        .cases-nav {
        padding: 5px 0 ;
    }
    .cases-nav .navbar {
        flex-wrap: wrap;
    }

    .cases-nav .navbar-toggle {
        display: flex;
    }

    .cases-nav .navbar-nav {
        display: none;
        flex-direction: column;
        width: auto;
        gap: 0;
        background: rgba(0, 53, 97, 0.95);
        padding: 15px 0;
        position: absolute;
        top: calc(100% + 5px);
        right: 10px;
        border-radius: 8px;
        min-width: 150px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        z-index: 1001;
    }

    .cases-nav .navbar-nav.active {
        display: flex;
    }

    .cases-nav .navbar-nav li {
        text-align: center;
        padding: 10px 20px;
    }

    .cases-nav .navbar-nav li a {
        display: block;
        font-size: 16px;
        padding: 5px 0;
    }

    .cases-nav .navbar-nav li a::after {
        bottom: 0;
    }

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

    .cases-nav .navbar-toggle.active .toggle-bar:nth-child(2) {
        opacity: 0;
    }

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

    .cases-header {
        padding: 35px 15px 60px;
    }
    
    .cases-header-content {
        display: flex;
        gap: 13px;
        justify-content: center;
    }
    
    .cases-header-content h1 {
        font-size: 28px;
    }
    
    .cases-header-text p {
        font-size: 12px;
        text-align: left;
    }
    
    .filter-tabs {
        gap: 10px;
    }
    
    .filter-tab {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    .cases-list-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 15px;
    }
    
    .case-list-img {
        height: 150px;
    }
    
    .case-detail-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .case-nav-link {
        max-width: 100%;
    }
    
    .prev-link,
    .next-link {
        text-align: left;
    }

    .footer-main {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-desc {
        font-size: 13px;
        margin-bottom: 20px;
        margin-left: 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cases-list-grid {
        grid-template-columns: 1fr;
    }
    
    .case-list-img {
        height: 200px;
    }
}
