/**
 * 医保卡变现服务平台 - 全局样式表
 * 主题颜色：浅蓝深蓝配色 (#0d6efd, #0dcaf0)
 * 框架：Bootstrap 5 + AOS动画库
 */

/* ==================== 基础变量定义 ==================== */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0b5ed7;
    --primary-light: #0dcaf0;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-bg: #ffffff;
    --text-color: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --transition-base: all 0.3s ease;
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==================== 基础重置与全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-base);
    color: var(--text-color);
    background-color: var(--body-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* ==================== 工具类 ==================== */
.hover-shadow {
    transition: var(--transition-base);
}

.hover-shadow:hover {
    box-shadow: var(--box-shadow-lg) !important;
}

.hover-shadow-lg {
    transition: var(--transition-base);
}

.hover-shadow-lg:hover {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform 0.5s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-primary:hover {
    color: var(--primary-color) !important;
}

.hover-white:hover {
    color: #fff !important;
}

.hover-opacity {
    transition: opacity 0.3s ease;
}

.hover-opacity:hover {
    opacity: 0.8;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.object-fit-cover {
    object-fit: cover;
}

.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.transform-rotate-2 {
    transform: rotate(2deg);
}

.transform-rotate-3 {
    transform: rotate(3deg);
}

.transition-all {
    transition: var(--transition-base);
}

/* ==================== 顶部信息栏 ==================== */
.top-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    font-size: 0.875rem;
}

.top-bar .badge {
    font-weight: 500;
}

/* ==================== 导航栏样式 ==================== */
#mainNav {
    transition: all 0.3s ease;
    padding: 1rem 0;
}

#mainNav.navbar-scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.3);
}

.nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(13, 110, 253, 0.1);
}

.nav-link.active {
    color: #fff !important;
    background-color: var(--primary-color);
}

.btn-consult {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
}

.btn-consult:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.4);
}

.wechat-trigger .wechat-popup {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.wechat-trigger:hover .wechat-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==================== 移动端导航 ==================== */
.mobile-nav {
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1030;
}

.mobile-nav a {
    transition: all 0.2s ease;
}

.mobile-nav a:active {
    transform: scale(0.95);
}

/* ==================== 页面标题区 ==================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== 首页英雄区 ==================== */
.hero-section {
    min-height: 600px;
    position: relative;
}

.hero-title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section .carousel-item {
    min-height: 600px;
}

.hero-section .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
}

.hero-section .carousel-indicators button.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* ==================== 统计数字动画 ==================== */
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== 服务卡片 ==================== */
.service-card-hover {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(13, 110, 253, 0.1);
}

.feature-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.service-card-hover:hover .feature-icon-box {
    transform: scale(1.1) rotate(5deg);
}

/* ==================== 流程步骤 ==================== */
.process-step::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    z-index: 0;
}

.process-step:last-child::after {
    display: none;
}

@media (max-width: 767.98px) {
    .process-step::after {
        display: none;
    }
}

/* ==================== 城市标签 ==================== */
.city-tag {
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.city-tag:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.3);
}

/* 1.5列网格 */
.col-xl-1-5 {
    flex: 0 0 auto;
    width: 20%;
}

@media (max-width: 1199.98px) {
    .col-xl-1-5 {
        width: 25%;
    }
}

@media (max-width: 767.98px) {
    .col-xl-1-5 {
        width: 33.333333%;
    }
}

/* ==================== 文章卡片 ==================== */
.content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--dark-color);
}

.content h2 {
    font-size: 1.75rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.content h3 {
    font-size: 1.5rem;
}

.content p {
    margin-bottom: 1.5rem;
}

.content ul,
.content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    box-shadow: var(--box-shadow);
}

.content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.content th,
.content td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
}

.content th {
    background-color: var(--light-color);
    font-weight: 600;
}

.content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.content a:hover {
    color: var(--primary-dark);
}

/* ==================== 时间线样式 ==================== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

@media (max-width: 767.98px) {
    .timeline-line {
        left: 30px;
    }
    
    .timeline-item .col-5,
    .timeline-item .col-5.text-end {
        width: 100%;
        padding-left: 80px !important;
        padding-right: 15px !important;
        text-align: left !important;
    }
    
    .timeline-item .col-5.pe-4,
    .timeline-item .col-5.ps-4 {
        display: none;
    }
    
    .timeline-item .col-2 {
        position: absolute;
        left: 0;
        width: 60px;
    }
}

/* ==================== 手风琴样式 ==================== */
.accordion-button {
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    background-color: #fff;
    border: none;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.05);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(13, 110, 253, 0.25);
}

.accordion-body {
    padding: 1.5rem;
    background-color: #fff;
}

/* ==================== 表单样式 ==================== */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control.rounded-pill {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.form-control.rounded-4 {
    border-radius: var(--border-radius-lg);
}

.input-group-text {
    background-color: var(--light-color);
    border-color: var(--border-color);
}

/* ==================== 按钮样式增强 ==================== */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #0a58ca);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.4);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* ==================== 卡片样式增强 ==================== */
.card {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--box-shadow-sm);
    transition: all 0.3s ease;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* ==================== 徽章样式 ==================== */
.badge {
    font-weight: 500;
    padding: 0.5em 1em;
}

.badge.rounded-pill {
    padding-left: 1em;
    padding-right: 1em;
}

/* ==================== 分页样式 ==================== */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: var(--border-radius);
    border: none;
    padding: 0.5rem 1rem;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    color: #fff;
}

.page-item.disabled .page-link {
    opacity: 0.5;
}

/* ==================== 列表组样式 ==================== */
.list-group-item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.02);
    padding-left: 1.5rem;
}

.list-group-item-action {
    color: var(--text-color);
}

/* ==================== 警告框样式 ==================== */
.alert {
    border: none;
    border-radius: var(--border-radius-lg);
}

.alert-rounded {
    border-radius: var(--border-radius-xl);
}

/* ==================== 返回顶部按钮 ==================== */
.btn-back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}

/* ==================== 页脚样式 ==================== */
.footer {
    background: linear-gradient(135deg, #1a1a2e, #16213e) !important;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.footer-links a {
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #fff !important;
    transform: translateX(5px);
}

.footer .badge {
    transition: all 0.2s ease;
}

.footer .badge:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

/* ==================== 分隔线 ==================== */
.divider {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: 500px;
    }
    
    .hero-section .carousel-item {
        min-height: 500px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        min-height: 400px;
    }
    
    .hero-section .carousel-item {
        min-height: 400px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .top-bar {
        display: none !important;
    }
    
    .page-content {
        padding-bottom: 80px;
    }
    
    .btn-back-to-top {
        bottom: 100px;
    }
}

@media (max-width: 575.98px) {
    .stat-number {
        font-size: 1.75rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    .top-bar,
    #mainNav,
    .mobile-nav,
    .btn-back-to-top,
    .footer,
    .page-header {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ==================== 动画关键帧 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ==================== 加载动画 ==================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== 模态框样式 ==================== */
.modal-content {
    border: none;
    border-radius: var(--border-radius-xl);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

/* ==================== 工具提示样式 ==================== */
.tooltip {
    font-size: 0.875rem;
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==================== 选中文字样式 ==================== */
::selection {
    background-color: rgba(13, 110, 253, 0.2);
    color: var(--primary-dark);
}

/* ==================== 焦点样式 ==================== */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==================== 图片懒加载占位 ==================== */
.img-placeholder {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    position: relative;
    overflow: hidden;
}

.img-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}