/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

a {
    text-decoration: none;
    color: #0066cc;
    transition: color 0.2s ease;
}

a:hover {
    color: black;
}

ul, ol {
    list-style: none;
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* 头部样式 */
/* header {
    background: linear-gradient(90deg, rgba(6,53,164,.8) 0%, #004d99 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
} */

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 15px;
}

.logo span {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 500;
}

/* 导航菜单 */
.main-nav ul {
    display: flex;
    gap: 5px;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: white;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    color: #ffcc00;
}

.main-nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffcc00;
    transition: width 0.3s ease;
}

.main-nav a:hover:after {
    width: 100%;
}

/* 用户信息 */
.user-profile {
    display: flex;
    align-items: center;
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-profile img:hover {
    border-color: #ffcc00;
    transform: scale(1.05);
}


/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-right: 10px;
    min-width: 100px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #0088ff 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0055aa 0%, #0077dd 100%);
    box-shadow: 0 6px 12px rgba(0, 102, 204, 0.3);
    color: white;
}

.btn-secondary {
    background-color: #f5f7fa;
    color: #0066cc;
    border: 1px solid #d0e0f5;
}

.btn-secondary:hover {
    background-color: #e6f0ff;
    border-color: #0066cc;
}

/* 添加detail-toggle按钮样式 */
.detail-toggle {
    background-color: #ffffff;
    color: #0066cc;
    border: 1px solid #0066cc;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.1);
}

.detail-toggle:hover {
    background-color: #f0f8ff;
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.2);
}

/* 业务操作按钮容器 */
.business-actions {
    display: flex;
    margin-top: 15px;
    gap: 10px;
}

/* 确保按钮在小屏幕上也保持一致 */
@media (max-width: 768px) {
    .business-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn {
        margin-bottom: 10px;
        flex: 1;
        min-width: 120px;
    }
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.card-header {
    padding: 15px 20px;
    background: linear-gradient(90deg, rgba(6,53,164,.8) 0%, #004d99 100%);
    color: white;
    font-size: 18px;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0e0f5;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e7edf8;
}

.table th {
    background-color: #f9fbfd;
    font-weight: 500;
    color: rgba(6,53,164,.8);
}

.table tr:hover {
    background-color: #f5f9ff;
}

/* 页脚样式 */
footer {
    background-color: rgba(6,53,164,.8);
    color: rgba(255, 255, 255, 0.8);
    padding: 30px 0;
    margin-top: 50px;
}

footer p {
    text-align: center;
    margin: 0;
    font-size: 14px;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav ul {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .main-nav a:after {
        display: none;
    }

    .logo {
        flex-direction: column;
        text-align: center;
    }

    .logo img {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 10px;
}

.mt-2 {
    margin-top: 20px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 10px;
}

.mb-2 {
    margin-bottom: 20px;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 10px;
}

.p-2 {
    padding: 20px;
}

/* 特殊元素样式 */
.tag {
    display: inline-block;
    padding: 4px 8px;
    background-color: #e6f0ff;
    color: #0066cc;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #ff3b30;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    padding: 0 6px;
}

.divider {
    height: 1px;
    background-color: #e7edf8;
    margin: 20px 0;
}

/* 社保政策模块分隔线 */
.separator-line {
    height: 2px;
    background: linear-gradient(90deg, #e0e6ed 0%, #c1c7d0 50%, #e0e6ed 100%);
    margin: 20px 0;
    border-radius: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 提示框样式 */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    position: relative;
}

.alert-info {
    background-color: #e6f7ff;
    border-left: 4px solid #1890ff;
    color: #0066cc;
}

.alert-success {
    background-color: #f6ffed;
    border-left: 4px solid #52c41a;
    color: #389e0d;
}

.alert-warning {
    background-color: #fffbe6;
    border-left: 4px solid #faad14;
    color: #d48806;
}

.alert-danger {
    background-color: #fff2f0;
    border-left: 4px solid #ff4d4f;
    color: #cf1322;
}

/* 业务列表 */
.business-list {
    margin-bottom: 30px;
}

.business-item {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
    display: flex;
    transition: transform 0.2s, box-shadow 0.2s;
}

.business-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.business-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(6,53,164,.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
    flex-shrink: 0;
    color: white;
    font-size: 24px;
}

.business-content {
    flex: 1;
}

.business-title {
    font-size: 18px;
    color: rgba(6,53,164,.8);
    margin-bottom: 10px;
}

.business-desc {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.business-actions {
    display: flex;
    justify-content: flex-end;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: rgba(6,53,164,.8);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-left: 10px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #cc0000;
}

.btn:hover {
    background-color: #1a5ba0;
    color: white;
}

.btn-primary:hover {
    background-color: #ff3333;
}

/* 业务详情页 */
.business-detail {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-title {
    font-size: 24px;
    color: rgba(6,53,164,.8);
    margin-bottom: 15px;
}

.detail-info {
    display: flex;
    color: #666;
    font-size: 14px;
}

.detail-info span {
    margin-right: 20px;
}

.detail-content {
    line-height: 1.8;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h3 {
    font-size: 18px;
    color: rgba(6,53,164,.8);
    margin-bottom: 10px;
}

.detail-steps {
    list-style-type: none;
}

.detail-steps li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
}

.detail-steps li::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    background-color: rgba(6,53,164,.8);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

/* 政策匹配功能 */
.policy-matcher {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.matcher-intro {
    text-align: center;
    margin-bottom: 30px;
}

.matcher-title {
    font-size: 24px;
    color: rgba(6,53,164,.8);
    margin-bottom: 15px;
}

.matcher-desc {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.matcher-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    font-size: 18px;
    color: rgba(6,53,164,.8);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
}

.radio-group {
    display: flex;
}

.radio-option {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.radio-option input {
    margin-right: 8px;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
}

/* 政策匹配结果 */
.match-results {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-title {
    font-size: 24px;
    color: rgba(6,53,164,.8);
    margin-bottom: 15px;
}

.results-count {
    color: #cc0000;
    font-weight: bold;
}

.results-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-options {
    display: flex;
}

.filter-option {
    margin-right: 15px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-option:last-child {
    margin-right: 0;
}

.filter-option.active {
    background-color: rgba(6,53,164,.8);
    color: white;
    border-color: rgba(6,53,164,.8);
}

.sort-options {
    display: flex;
    align-items: center;
}

.sort-label {
    margin-right: 10px;
    color: #666;
}

.sort-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.results-list {
    margin-bottom: 30px;
}

.result-item {
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.2s;
}

.result-item:hover {
    transform: translateY(-3px);
}

.result-title {
    font-size: 18px;
    color: rgba(6,53,164,.8);
    margin-bottom: 10px;
}

.result-tags {
    display: flex;
    margin-bottom: 10px;
}

.result-tag {
    background-color: #e6f0ff;
    color: rgba(6,53,164,.8);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin-right: 10px;
}

.result-desc {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 14px;
}

.result-meta {
    display: flex;
    color: #999;
    font-size: 12px;
}

.result-meta span {
    margin-right: 15px;
}

.pagination {
    display: flex;
    justify-content: center;
}

.pagination a {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a.active {
    background-color: rgba(6,53,164,.8);
    color: white;
    border-color: rgba(6,53,164,.8);
}

.pagination a:hover:not(.active) {
    background-color: #f5f5f5;
}

/* 底部样式 */
footer {
    background-color: rgba(6,53,164,.8);
    color: white;
    padding: 20px 0;
    text-align: center;
}

footer p {
    font-size: 14px;
    opacity: 0.8;
}

/* 响应式样式 */
@media (max-width: 1200px) {
    .container, .header-container {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .business-item {
        flex-direction: column;
    }

    .business-icon {
        margin: 0 auto 20px;
    }

    .business-content {
        text-align: center;
    }

    .business-actions {
        justify-content: center;
    }

    .detail-info {
        flex-direction: column;
    }

    .detail-info span {
        margin-bottom: 10px;
    }

    .form-section {
        padding: 0 20px;
    }

    .results-filter {
        flex-direction: column;
    }

    .filter-options {
        margin-bottom: 15px;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-option {
        margin-bottom: 10px;
    }
}

/* 长文本卡片特殊样式 */
.long-text-card {
    position: relative;
    cursor: pointer;
}

.long-text-card .sub-icon-text {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.5 !important;
    max-height: 4.5em !important; /* 3行的高度 */
    transition: all 0.3s ease !important;
    word-break: break-word !important;
    word-wrap: break-word !important;
    /* 强制确保只显示3行 */
    height: 4.5em !important;
    min-height: 4.5em !important;
    /* 确保容器背景透明 */
    background: transparent !important;
}

.long-text-card:hover .sub-icon-text {
    -webkit-line-clamp: unset !important;
    max-height: none !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    background: transparent !important;
}

/* 气泡提示样式 */
.tooltip-bubble {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 300px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}



.tooltip-bubble.show {
    opacity: 1;
    visibility: visible;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .tooltip-bubble {
        max-width: 250px;
        font-size: 13px;
    }
}

/* 社保政策模块小卡片固定大小样式 */
.detail-item.small-card {
    width: 180px;
    /* height: 160px; */
    min-height: 120px; /* 如果想要最小高度一致，可以用 min-height */
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.detail-item.small-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.detail-item.small-card .detail-icon {
    margin-right: 0;
    margin-bottom: 8px;
    width: 30px;
    height: 30px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    background: #dbeafe;
    border-radius: 50%;
}

.detail-item.small-card .detail-text {
    font-size: 13px;
    text-align: center;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    max-height: 80px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* 出国前在国内工作但未缴纳社保按钮标题字体减小样式 */
.subcategory-main-title.smaller-font {
    font-size: calc(1em - 3px);
}

.subcategory-main-title.smaller-font + .subcategory-sub-title {
    font-size: calc(1em - 1px);
}

/* 特定卡片字体减小样式 */
.detail-item.small-card.smaller-text-card .detail-text {
    font-size: calc(1em - 5px);
}

/* 出国前未在国内工作卡片字体减小样式 */
.detail-item.small-card.smaller-text-card-2 .detail-text {
    font-size: calc(1em - 6px);
}
