/* 业务办理 */
.business-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(240px,1fr));
    grid-template-rows: repeat(2, auto);
    gap: 1px;
    background-color: #e3e3e3;
    border: 1px solid #e3e3e3;
}

.biz-item {
    background-color: #fff;
    padding: 20px;
}

.biz-item h4 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.biz-item h4 i {
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-right: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.biz-item ul {
    list-style: none;
    padding-left: 0;
}

.biz-article-list.two-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.biz-article-list.two-columns li {
    width: calc(50% - 10px);
}

.biz-article-list.one-column-centered {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 50%;
    margin: 0 auto;
}

.biz-article-list.one-column-centered li {
    width: auto; /* 宽度自适应内容 */
}

.biz-item ul li a {
    font-size: 14px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.biz-item ul li::before {
    content: '>';
    color: #999;
    position: absolute;
    margin-left: -15px;
    line-height: 20px;
}


/* 业务办理模块悬停效果 */
.biz-item:hover {
    background-color: #BD2B2E;
}

.biz-item:hover h4,
.biz-item:hover ul li a,
.biz-item:hover ul li a::before {
    color: #fff;
}

.biz-item .icon-active {
    display: inline-block;
}

.biz-item .icon-inactive {
    display: none;
}

.biz-item:hover .icon-active {
    display: none;
}

.biz-item:hover .icon-inactive {
    display: inline-block;
}


/* 通知公告 */
.notice-list {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.notice-list li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed #e3e3e3;
}

.notice-list li:last-child {
    border-bottom: none;
}

.notice-list li a {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.notice-list li span {
    font-size: 14px;
    color: #999;
}

/* 特色应用 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.app-item {
    position: relative;
    display: block;
    height: 180px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: #fff;
    text-decoration: none;
}

.app-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color 0.3s;
}

.app-item:hover:before {
    background-color: rgba(0, 0, 0, 0.6);
}

.app-item span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    width: 100%;
}

/* 业务系统 */
.system-flex-container {
    display: flex;
}

.system-tabs {
    flex: 0 0 442px; /* 固定宽度 */
    margin-right: 20px;
}

.system-tab {
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e3e3e3;
    margin-bottom: -1px; /* 边框合并 */
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
    font-size: 24px;
    font-weight: bold;
}
.system-tab:not(:first-child) {
    margin-top: 20px;
}


.system-tab:hover {
    background-color: #efefef;
}

.system-tab.active {
    background-color: #BD2B2E;
    color: #fff;
    border-color: #BD2B2E;
}

.system-tab i {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Icon switching logic */
.system-tab .icon-active {
    display: none;
}
.system-tab .icon-inactive {
    display: inline-block;
}
.system-tab.active .icon-active {
    display: inline-block;
}
.system-tab.active .icon-inactive {
    display: none;
}

.system-content {
    flex-grow: 1;
    border: 1px solid #e3e3e3;
    padding: 10px;
    min-height: 250px; /* Set a fixed height for the content area */
    background: url('/static/images/bg-biz.png') no-repeat;
    background-size: cover;
}

.system-pane {
    display: none;
}

.system-pane.active {
    display: flex; /* Use flexbox for layout */
    align-items: stretch; /* Stretch items to fill the container height */
    gap: 20px;
    height: 100%;
}

.system-promo-img {
    flex: 0 0 240px;
    height: 100%;
}

.system-promo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.service-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Changed to 2 columns to match prototype */
    grid-template-rows: repeat(4, auto); /* Changed to 4 rows */
    gap: 15px;
}

.service-item {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Vertically center content */
    padding-left:8px;
    background-color: #f5f5f5;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.service-item:hover {
    background-color: #e0e0e0;
}

.service-item i {
    margin-right: 8px;
}



/* 资讯中心 */
.news {
    background: url(/static/images/bg-news.png) no-repeat;
    padding-top: 30px;
    color: white;
    background-size: 100% 100%;
}

.news .panel-header {
    padding-bottom: 0;
}

.news .panel-header h4 {
    font-size: 26px;
    font-weight: bold;
    padding-left: 85px
}

.news-container {
    display: flex;
    justify-content: space-between; /* 让元素左右分布 */
    align-items: flex-start; /* 顶部对齐 */
    height: 330px;
}

.news-tabs {
    display: flex;
    justify-content: space-around;
    border-bottom: 2px solid #FEFBCD;
}

.news-tab {
    padding: 8px 20px;
    cursor: pointer;
    font-size: 26px;
    font-weight: bold;
    color: white;
}

.news-tab.active {
    color: #FEFBCD;
    border-color: #e3e3e3;
    border-radius: 5px 5px 0 0;
}

.news-main-content {
    flex-basis: 50%; /* 左侧占据50% */
    min-width: 0;
    padding-right: 10px; /* 增加一些间距 */
    box-sizing: border-box;
}

.news-content-panes {
    padding-top: 15px;
}

.news-pane {
    display: none;
}

.news-pane.active {
    display: block;
}

.news-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0 5px 20px;
    background: url('/static/images/diamond.png') no-repeat left center;
}

.news-list li a {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
    color: white;
}

.news-list li span {
    font-size: 14px;
    color: #999;
    padding-left: 20px;
    min-width: 100px;
}

.news-promo {
    flex-basis: 50%; /* 右侧占据50% */
    padding-left: 10px; /* 增加一些间距 */
    box-sizing: border-box;
    margin-top: 40px;
}

.news-promo .carousel,
.news-promo .carousel-inner,
.news-promo .carousel-item {
    height: 300px;
    width: 100%;
    overflow: hidden;
}

.news-promo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image covers the area without distortion */
    border-radius: 5px;
}

/* 外贸工具 */
.tools-panel {
    display: flex;
    background-color: #3a65b3;
    padding: 20px;
    border-radius: 5px;
    color: #fff;
    height: 350px;
}

.tools-icon-area {
    flex: 0 0 240px; /* Increased width */
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.5); /* More visible border */
    padding-right: 20px;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
}

.tools-icon-area h3 {
    font-size: 20px;
    margin-top: 20px;
}

.tools-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Set to 3 columns to match the layout */
    grid-template-rows: repeat(4, auto);
    gap: 15px;
    padding-left: 20px;
}

.tool-item {
    background-color: #fff !important; /* White background for items */
    padding: 10px 25px !important; /* Increased horizontal padding */
    border-radius: 5px !important; /* Reduced border radius */
    color: #333 !important; /* Dark text */
    text-decoration: none !important;
    transition: background-color 0.3s;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}

.tool-item:hover {
    background-color: #f0f0f0 !important; /* Slightly darker on hover */
}

/* 常见问题 */
.faq .panel-header {
    border-bottom: 3px solid #BD2B2E;
}

.faq-list ul {
    padding: 0 15px;
}

/* 为资讯中心 panel-body 设置最小高度，彻底防止切换tab时布局跳动 */
.news-panel-body {
    min-height: 250px;
}

.category-item {
    margin-bottom: 20px;
}
