@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Open+Sans:wght@400;600&display=swap');

/* --- 主题色切换支持 --- */
:root {
    --primary-color: #0D47A1; /* 默认主色调：深邃海军蓝 */
    --accent-color: #D4AC0D;  /* 默认点缀色：优雅暗金 */
    
    --bg-color: #F8F9FA;      /* 背景色：柔和灰 */
    --surface-color: #f8f9fa; /* 表面/卡片色 - 柔和米白 */
    --background-color: #e9ecef; /* 主背景色 - 更明显的浅灰 */
    
    --text-primary: #212529;   /* 主文本：深灰 */
    --text-secondary: #6c757d; /* 次要文本：中灰 */
    --text-color: #343a40;     /* 主要正文颜色 */

    --border-color: #dee2e6; /* 边框颜色，比背景稍深一点以保证可见性 */
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
    --border-radius: 4px; /* 较小的圆角，更显硬朗 */
}
[data-theme="1"]:root {
    --primary-color: #0D47A1; --accent-color: #D4AC0D; --bg-color: #F8F9FA; --surface-color: #f8f9fa; --background-color: #e9ecef; --text-primary: #212529; --text-secondary: #6c757d;
}
[data-theme="2"]:root {
    --primary-color: #C62828; --accent-color: #FFB300; --bg-color: #FFF3E0; --surface-color: #fff; --background-color: #ffe0b2; --text-primary: #222; --text-secondary: #b71c1c;
}
[data-theme="3"]:root {
    --primary-color: #2E7D32; --accent-color: #FFD600; --bg-color: #F1F8E9; --surface-color: #fff; --background-color: #dcedc8; --text-primary: #1b5e20; --text-secondary: #388e3c;
}
[data-theme="4"]:root {
    --primary-color: #1565C0; --accent-color: #00B8D4; --bg-color: #E3F2FD; --surface-color: #fff; --background-color: #b3e5fc; --text-primary: #0d47a1; --text-secondary: #0288d1;
}
[data-theme="5"]:root {
    --primary-color: #6A1B9A; --accent-color: #F06292; --bg-color: #F3E5F5; --surface-color: #fff; --background-color: #e1bee7; --text-primary: #4a148c; --text-secondary: #ad1457;
}
[data-theme="6"]:root {
    --primary-color: #FF6F00; --accent-color: #FFD600; --bg-color: #FFF8E1; --surface-color: #fff; --background-color: #ffe082; --text-primary: #e65100; --text-secondary: #ff8f00;
}
[data-theme="7"]:root {
    --primary-color: #00897B; --accent-color: #80CBC4; --bg-color: #E0F2F1; --surface-color: #fff; --background-color: #b2dfdb; --text-primary: #004d40; --text-secondary: #00695c;
}
[data-theme="8"]:root {
    --primary-color: #3949AB; --accent-color: #FFB300; --bg-color: #E8EAF6; --surface-color: #fff; --background-color: #c5cae9; --text-primary: #1a237e; --text-secondary: #5c6bc0;
}
[data-theme="9"]:root {
    --primary-color: #795548; --accent-color: #FFD54F; --bg-color: #EFEBE9; --surface-color: #fff; --background-color: #d7ccc8; --text-primary: #3e2723; --text-secondary: #8d6e63;
}
[data-theme="10"]:root {
    --primary-color: #607D8B; --accent-color: #FFAB91; --bg-color: #ECEFF1; --surface-color: #fff; --background-color: #b0bec5; --text-primary: #263238; --text-secondary: #78909c;
}
[data-theme="11"]:root {
    --primary-color: #F44336; --accent-color: #FFEB3B; --bg-color: #FFEBEE; --surface-color: #fff; --background-color: #ffcdd2; --text-primary: #b71c1c; --text-secondary: #f44336;
}
[data-theme="12"]:root {
    --primary-color: #212121; --accent-color: #FFD600; --bg-color: #FAFAFA; --surface-color: #fff; --background-color: #bdbdbd; --text-primary: #212121; --text-secondary: #757575;
}
[data-theme="13"]:root {
    --primary-color: #222;
    --accent-color: #888;
    --bg-color: #f5f5f5;
    --surface-color: #fff;
    --background-color: #e0e0e0;
    --text-primary: #111;
    --text-secondary: #666;
}

/* --- 全局样式 --- */
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 600;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
a:hover {
    color: var(--accent-color);
}

/* --- 头部与导航 --- */
header {
    background: var(--primary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 20px;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--surface-color);
    font-weight: 700;
}

header nav {
    flex-grow: 1; /* 让导航占据剩余空间 */
    text-align: right; /* 让导航项靠右对齐 */
}

header nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 30px;
}

header nav a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 600;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

header nav a:hover {
    color: var(--surface-color);
}
header nav a.active {
    color: var(--surface-color);
    border-bottom-color: var(--accent-color);
}

/* --- 主要内容区域 --- */
main {
    padding: 20px 0 50px;
}

main h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 50px;
}

/* --- 新增：通用内容卡片增强样式 --- */
.content-card,
.calculator-main,
.fee-schedule,
.calculation-notes {
    width: 90%;
    max-width: 800px;
    margin: 0 auto 30px auto;
    box-sizing: border-box;
}

.content-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.content-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    display: block;
}

/* Home page article sections */
.home-articles {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}
.home-articles:last-child {
    border-bottom: none;
}
.home-articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.home-articles-header h2 {
    font-size: 2rem;
    color: var(--heading-color);
    margin: 0;
    display: flex;
    align-items: center;
}
.home-articles-header h2 svg {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    color: var(--primary-color);
}
.btn-outline-sm {
    font-size: 0.9rem;
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-outline-sm:hover {
    background-color: var(--primary-color);
    color: var(--surface-color);
}

.article-list-container {
    border-radius: var(--border-radius);
    background-color: var(--surface-color);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
.article-grid .card {
    flex-direction: row;
    align-items: center;
    padding: 15px 20px;
    display: flex; /* Ensure flex layout */
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}
.article-grid .card:hover {
    background-color: rgba(13, 71, 161, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
}
.article-grid .card:last-child {
    border-bottom: none;
}
.home-article-number {
    flex-shrink: 0;
    margin-right: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    width: 38px;
    height: 38px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    transition: all 0.2s ease-in-out;
}

/* --- Highlight Top 3 --- */
.article-grid article:nth-of-type(-n+3) .home-article-number {
    border-width: 3px;
    font-weight: 700;
}

.article-grid .card:hover .home-article-number {
    background: var(--primary-color);
    color: var(--surface-color);
    transform: scale(1.1);
}

.article-grid .card .card-content {
    flex-grow: 1;
    min-width: 0; /* Important for ellipsis to work in flexbox */
}
.article-grid .card .card-content h3 {
    font-size: 1.2rem;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease-in-out;
}
.article-grid .card:hover .card-content h3 {
    color: var(--primary-color);
}
.article-grid .card .card-content .meta-info {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-secondary);
}

.card-action-date {
    text-align: right;
    flex-shrink: 0;
    margin-left: 20px;
}
.card-action-date span {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}
.read-more-link {
    font-size: 0.95rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}
.read-more-link:hover {
    text-decoration: underline;
}

/* 卡片式设计 */
.card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 85px;
    justify-content: center;
}
.card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.card-counter {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: var(--bg-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    border: 2px solid var(--border-color);
}
.card:hover .card-counter {
    border-color: var(--accent-color);
    color: var(--accent-color);
}
.card-content {
    flex-grow: 1;
    padding: 10px 0;
}
.card h3 {
    margin-top: 0;
    font-size: 1.4rem;
    line-height: 1.4;
}
.card p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.card a.read-more {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-color);
}
.card a.read-more:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* --- Card Business Style Enhancements --- */
.card .meta-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.card .card-action {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}
.btn-outline {
    display: inline-block;
    padding: 8px 18px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}
.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}
/* Hide the old link style */
a.read-more {
    display: none !important;
}

/* --- 幻灯片样式 (高大上重构版) --- */
.slideshow-container {
    position: relative;
    margin-bottom: 0; /* 全宽元素，不再需要外边距 */
    height: 550px; /* 调整为更适中的高度 */
    background: #212529;
    border-radius: 0; /* 移除圆角以实现边缘贴合 */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.mySlides {
    display: none; /* JS控制显示 */
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.mySlides.active-slide {
    display: block;
}

/* 背景图片与Ken Burns效果 */
.slide-image {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    animation: kenburns 20s infinite;
}
.active-slide .slide-image {
    animation-name: kenburns; /* 激活时播放动画 */
}

@keyframes kenburns {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.1) translate(-2%, 2%); }
    100% { transform: scale(1) translate(0, 0); }
}

/* 图片上的深色蒙版 */
.slide-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(10, 20, 30, 0.4);
}

/* 内容区域 */
.slide-content {
    position: relative;
    color: #fff;
    text-align: center;
    width: 80%;
    max-width: 800px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.slide-content h3, .slide-content p, .slide-content .btn {
    opacity: 0;
    transform: translateY(20px);
    animation-fill-mode: forwards;
}
.active-slide .slide-content h3 {
    animation: slideUpFadeIn 0.8s 0.3s ease forwards;
}
.active-slide .slide-content p {
    animation: slideUpFadeIn 0.8s 0.5s ease forwards;
}
.active-slide .slide-content .btn {
    animation: slideUpFadeIn 0.8s 0.7s ease forwards;
}

@keyframes slideUpFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.slide-content h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}
.slide-content .btn {
    background: var(--accent-color);
    color: var(--text-primary);
    padding: 15px 35px;
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1rem;
}
.slide-content .btn:hover {
    background: #fff;
    color: var(--primary-color);
}

/* 前后导航按钮 */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background: rgba(0,0,0,0.3);
}
.prev { left: 50px; }
.next { right: 50px; }
.prev:hover, .next:hover {
    background-color: rgba(212, 172, 13, 0.8);
}

/* 底部圆点 */
.slideshow-dots {
    text-align: center;
    position: absolute;
    bottom: 30px;
    width: 100%;
}
.dot {
    cursor: pointer;
    height: 14px;
    width: 14px;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.4);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}
.dot.active-dot, .dot:hover {
    background-color: var(--accent-color);
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}
@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/* --- Pagination Styles --- */
.pagination-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.pagination-container button {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 18px;
    margin: 0 5px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}
.pagination-container button:hover,
.pagination-container button.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.pagination-container button:disabled {
    background-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
}

/* --- 搜索框样式 --- */
.search-container {
    display: flex;
    align-items: stretch; /* 让子元素等高 */
    margin-left: auto; /* 用于居中flex容器 */
    margin-right: auto; /* 用于居中flex容器 */
    margin-bottom: 30px;
    max-width: 600px;
    background-color: var(--surface-color);
    /* position: relative; /* 不再需要，因为子元素不再是absolute */
    border-radius: var(--border-radius); /* 确保容器有圆角 */
    box-shadow: var(--shadow);
    overflow: hidden; /* 裁剪所有溢出的子元素 */
}

.search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 15px 25px; /* 调整内边距，不再需要为按钮留空间 */
    font-size: 1rem;
    background-color: transparent;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.25);
}

.search-button {
    /* position: absolute; right: 0; top: 0; height: 100%; /* 移除绝对定位 */
    flex-shrink: 0; /* 防止按钮被压缩 */
    width: 60px;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease-in-out;
}

.search-button:hover {
    background-color: var(--accent-color);
}

#no-results {
    text-align: center;
    padding: 50px 20px;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    display: none; /* Initially hidden */
}

/* --- 特定页面样式 --- */

/* 联系我们 */
.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.contact-grid {
    margin-top: 15px;
}
#map {
    width: 100%;
    height: auto;   /* 允许地图根据flex-grow来决定高度 */
    flex-grow: 1;   /* 让地图在flex容器中撑满剩余垂直空间 */
    min-height: 400px;
    background: #e9e9e9;
    border: 1px solid var(--border-color);
    text-align: center;
    line-height: 400px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    margin-top: 0;
}

/* 计算器 */
.calculator-wrapper {
    /* 移除横向布局 */
    display: block;
    gap: 0;
    flex-wrap: unset;
}
.calculator-main,
.fee-schedule.content-card,
.calculation-notes {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    width: 100%;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
.calculator-main {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 30px auto;
}
.fee-schedule {
    max-width: 900px;
    margin: 0 auto 30px auto;
}
.fee-schedule h3 {
    margin-top: 0;
}
.fee-schedule ul {
    padding-left: 20px;
    margin-bottom: 20px;
}
.calculator-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.calculator-form input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    margin-bottom: 20px;
}
#result {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 15px;
    border-radius: var(--border-radius);
    background-color: var(--background-color);
}
#result span {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* --- 页脚 --- */
footer {
    padding: 30px 0 0; /* 减小顶部padding */
    background: #212529;
    color: rgba(255,255,255,0.7);
    margin-top: 30px; /* 减小与主要内容的间距 */
    font-size: 15px; /* 稍微减小字体 */
    line-height: 1.6; /* 减小行高 */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 25px; /* 减小列间距 */
    padding-bottom: 25px; /* 减小底部padding */
    border-bottom: 1px solid #343a40;
}

.footer-column {
    flex: 1;
    min-width: 250px; /* 在小屏幕上不会被过度挤压 */
}

.footer-column h4 {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 1rem; /* 减小标题字体 */
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px; /* 减小标题下外边距 */
    position: relative;
    padding-bottom: 8px; /* 减小下内边距 */
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-color);
}

.footer-column p {
    margin-bottom: 8px; /* 减小段落间距 */
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 6px; /* 减小列表项间距 */
}

.footer-column ul a {
    color: rgba(255,255,255,0.7);
    transition: all 0.3s ease;
    padding-left: 0; /* 移除左侧内边距，使其对齐 */
}

.footer-column ul a:hover {
    color: #fff;
}

.qr-code {
    width: 120px; /* 缩小二维码尺寸 */
    height: 120px;
    background: #fff;
    padding: 5px;
    border-radius: var(--border-radius);
}

.footer-bottom {
    padding: 15px 0; /* 减小垂直padding */
    text-align: center;
    font-size: 13px; /* 减小字体 */
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #fff;
}

/* --- 响应式设计 --- */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    nav ul {
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
    }
    nav ul li {
        margin: 5px 0;
    }
    main h2 {
        font-size: 2.2rem;
    }
    .slideshow-container {
        height: 350px;
    }
    .slide-content h3 { font-size: 1.8rem; }
    .slide-content p { font-size: 1rem; }
    .prev, .next {
        font-size: 1rem;
        padding: 8px 12px;
    }

    .contact-details-grid {
        grid-template-columns: 1fr;
    }
}

.static-content-wrapper {
    background-color: transparent; /* Wrapper is now transparent, cards have color */
    padding: 0;
    box-shadow: none;
}
.contact-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}
.contact-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.contact-section h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: 20px;
    display: inline-block;
}
.contact-section p {
    line-height: 1.8;
}

.company-profile-section {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.company-profile-section h3,
.company-images-section h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    display: block;
}
.company-profile-section h3 i,
.company-images-section h3 i {
    margin-right: 10px;
}

.company-images-section {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.image-grid-5-cols {
    grid-template-columns: repeat(5, 1fr);
}

.image-grid figure {
    margin: 0;
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    overflow: hidden;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

.image-grid figure:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.image-grid img {
    width: 100%;
    height: auto;
    display: block;
}

.image-grid figcaption {
    padding: 12px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

.contact-details-grid {
    display: flex; /* 从 Grid 切换到 Flexbox */
    gap: 30px;
    align-items: stretch;
}

/* 让地图卡片的内容可以充满 (不再需要flex，因为问题在于grid计算)*/
.contact-details-grid > .content-card:last-child {
    display: flex;
    flex-direction: column;
}

/* 设定flex项目的尺寸和行为 */
.contact-details-grid > .content-card {
    margin-bottom: 0;
    min-width: 0; /* 允许flex项目收缩，是健壮的flex布局的关键 */
}
.contact-details-grid > .content-card:first-child {
    flex: 2 1 0%; /* 设置2:3比例的第一部分 */
}
.contact-details-grid > .content-card:last-child {
    flex: 3 1 0%; /* 设置2:3比例的第二部分 */
}

.contact-grid p {
    display: flex;
    align-items: flex-start; /* 改为flex-start，让图标与多行文本的顶部对齐 */
    gap: 15px;
    padding: 12px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease-in-out;
}

.contact-grid p strong {
    flex-shrink: 0; /* 防止标签被压缩 */
    white-space: nowrap; /* 新增：强制标签本身不换行，让flexbox自动计算宽度 */
}

.contact-grid p:hover {
    background-color: rgba(13, 71, 161, 0.05); /* very light primary color */
}

.contact-grid p i {
    font-size: 1.3rem;
    color: var(--primary-color);
    width: 25px;
    text-align: center;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.contact-grid {
    margin-top: 15px;
}

#map {
    width: 100%;
    height: auto;   /* 允许地图根据flex-grow来决定高度 */
    flex-grow: 1;   /* 让地图在flex容器中撑满剩余垂直空间 */
    min-height: 400px;
    background: #e9e9e9;
    border: 1px solid var(--border-color);
    text-align: center;
    line-height: 400px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    margin-top: 0;
}

.page-header {
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 2.8rem;
    margin: 0 0 10px 0;
    text-align: center;
}

.breadcrumbs {
    display: inline-flex; /* 改为inline-flex实现自适应宽度和内部对齐 */
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: left; /* 设置为左对齐 */
    background-color: var(--surface-color); /* 增加柔和背景色 */
    padding: 12px 20px; /* 增加内边距 */
    border-left: 4px solid var(--primary-color); /* 增加左侧强调边框 */
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); /* 添加轻微阴影 */
    margin-bottom: 30px; /* 与下方内容保持间距 */
}

/* 新增：面包屑导航前的图标 */
.breadcrumbs::before {
    font-family: "Font Awesome 6 Free"; /* 确保使用Font Awesome字体 */
    content: "\f015"; /* Font Awesome 首页图标 (fa-home) */
    font-weight: 900;
    color: var(--primary-color);
    margin-right: 12px;
    font-size: 1.1em;
}

.breadcrumbs a {
    color: var(--primary-color); /* 链接颜色使用主色调 */
    text-decoration: none;
    font-weight: 600;
}
.breadcrumbs a:hover {
    color: var(--accent-color);
}

.breadcrumbs span {
    margin-left: 8px;
}

.breadcrumbs span::before {
    content: '/';
    margin-right: 8px;
    color: var(--border-color);
}

/* --- 美化计算器表单 --- */
.calculator-form .form-group {
    margin-bottom: 20px;
}

.calculator-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.calculator-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.25);
}

.calculator-form input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.25);
}

/* --- 新增：图片灯箱 (Lightbox) 样式 --- */
.lightbox {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column; /* 新增：强制子元素垂直排列 */
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    animation: zoomIn 0.3s ease-in-out;
}

.lightbox-caption {
    margin-top: 15px;
    color: #f1f1f1;
    text-align: center;
    font-size: 1.1rem;
    padding: 10px 20px;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- 计算器页面高大上改造 --- */

/* 计算器主卡片 */
.calculator-card {
    border-top: 4px solid var(--accent-color);
}

.calculator-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.calculator-header h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}
.calculator-header h3 i {
    margin-right: 10px;
}
.calculator-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* 表单主体 */
.calculator-body {
    padding: 10px;
}

.form-inputs {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
}
.form-inputs .form-group {
    flex: 1;
}

.calculator-form label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.btn-primary-full {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(45deg, var(--primary-color), #1E88E5);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
}
.btn-primary-full:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(13, 71, 161, 0.4);
}
.btn-primary-full i {
    margin-right: 10px;
}

/* 结果显示区域 */
.result-display {
    margin-top: 30px;
    padding: 25px;
    border-radius: var(--border-radius);
    background-color: var(--background-color);
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}
.result-display h4 {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    font-weight: 600;
}
.result-display p {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
}
.fee-amount-wrapper {
    display: flex;
    justify-content: center;
    align-items: baseline;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.fee-amount-wrapper span {
    font-size: 2rem;
    font-weight: 600;
    margin-right: 5px;
}
.fee-amount-wrapper strong {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}
.result-display small {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 收费标准侧边栏 */
.fee-schedule h3 i {
    margin-right: 10px;
}
.fee-schedule .note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 20px;
    text-align: center;
}

.fee-schedule.content-card {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 30px auto;
}
.fee-tables {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
}
.fee-table {
    flex: 1 1 0;
    min-width: 220px;
    max-width: 300px;
    background: #fff;
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}
.fee-table strong {
    display: block;
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}
.fee-table ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.fee-table li {
    display: flex;
    justify-content: space-between;
    padding: 8px 5px;
    font-size: 0.95rem;
    border-bottom: 1px dashed var(--border-color);
}
.fee-table li:last-child {
    border-bottom: none;
}
.fee-table li strong {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-size: inherit;
}

/* 说明区域卡片 */
.calculation-notes {
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.calculation-notes h3 i {
    margin-right: 10px;
}

.calculation-notes ol {
    padding-left: 20px;
    line-height: 1.8;
}
.calculation-notes li {
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .calculator-main, .fee-schedule.content-card, .calculation-notes {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }
    .fee-tables {
        gap: 10px;
        padding: 0 5px;
    }
    .fee-table {
        flex: 1 1 100%;
        min-width: 160px;
        max-width: 100%;
    }
}

/* --- 文章内容页 (article.html) 样式 --- */
.article-container {
    padding: 40px;
}

.article-header {
    padding-bottom: 25px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.article-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.article-meta span {
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* 文章正文排版 */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 2em;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--accent-color);
}

.article-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 1.8em;
    margin-bottom: 1em;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 0.8em;
}

.article-content blockquote {
    margin: 2em 0;
    padding: 1em 1.5em;
    background-color: var(--background-color);
    border-left: 5px solid var(--primary-color);
    font-style: italic;
    color: var(--text-secondary);
}

.article-content a {
    text-decoration: underline;
}

.article-content strong,
.article-content b {
    font-weight: 600;
    color: var(--text-primary);
}

/* 文章底部 */
.article-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.article-footer .btn-outline i {
    margin-right: 8px;
}

/* =============================
   全站兼容性与响应式兜底优化
   ============================= */
html, body {
    min-width: 320px;
    overflow-x: hidden;
}
img, iframe, video {
    max-width: 100%;
    height: auto;
    display: block;
}
input, select, textarea, button {
    max-width: 100%;
    box-sizing: border-box;
}
/* 导航栏移动端兜底：横向滚动防止溢出 */
@media (max-width: 600px) {
    header nav ul {
        flex-wrap: wrap;
        overflow-x: auto;
        white-space: nowrap;
    }
    header nav ul li {
        min-width: 90px;
        text-align: center;
    }
}
/* 超小屏幕兜底 */
@media (max-width: 375px) {
    body, html {
        font-size: 14px;
    }
    .container, .content-card, .article-container {
        padding-left: 2vw;
        padding-right: 2vw;
    }
}
/* 大屏适配兜底 */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}
