/* ==========================================================================
   KanSynLM Web Server - Global Styles
   ========================================================================== */

:root {
    --primary-color: #1a252f;      /* 深沉的学术蓝黑 */
    --secondary-color: #2c3e50;    /* 辅助深蓝 */
    --accent-color: #3498db;       /* 交互高亮蓝 */
    --accent-hover: #2980b9;       /* 按钮悬停蓝 */
    --light-bg: #f8f9fa;           /* 浅灰背景区 */
    --text-main: #333333;
    --text-muted: #6c757d;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: #ffffff;
    /* 移除 smooth，由 SPA 路由自己控制回顶 */
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */

/* 导航栏背景图片 */
.navbar-custom {
    background: url('../pic/ab.jpg') no-repeat center center;
    background-size: cover;
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease-in-out;
}

/* 导航栏左侧 Logo 文字：变黑，去掉阴影 */
.navbar-custom .navbar-brand {
    color: #000000 !important;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

/* 导航栏右侧菜单链接：变黑，去掉阴影 */
.navbar-custom .nav-link {
    color: #000000 !important;
    font-weight: 600;
    margin-left: 15px;
    position: relative;
    transition: color 0.3s ease;
}

/* 菜单项下划线动画 */
.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px; /* 稍微往下移一点，避免和字母底部重叠 */
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
    width: 100%;
}

/* 悬停和激活状态下，文字变为主题蓝色，避免一直是黑色没有反馈 */
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--accent-color) !important;
}

/* 移动端汉堡菜单图标（如果需要变黑的话）*/
.custom-toggler .navbar-toggler-icon {
    filter: none !important; /* 取消之前的反相，保持黑色 */
}

/* ==========================================================================
   SPA Section Layouts & Typography (单页应用路由控制)
   ========================================================================== */

/* 默认隐藏所有 section，同时增加 padding-top 避免内容逼仄 */
.content-section {
    display: none; 
    padding: 140px 0 80px; /* 顶部留白从 100px 增加到 140px */
    min-height: calc(100vh - 100px); /* 撑满屏幕，避免底部 footer 浮动 */
}

/* 只显示 active 的 section，并加入淡入动画 */
.content-section.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bg-light-gray {
    background-color: var(--light-bg);
}

.section-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.text-center.section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ==========================================================================
   Cards & Interactive Elements
   ========================================================================== */

.custom-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
}

.custom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

/* 架构图样式 (强制大小和比例) */
.arch-img {
    max-width: 600px;     /* 控制最大宽度 */
    width: 100%;
    height: auto;
    /* aspect-ratio: 696 / 783; 锁定宽高比 */
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

/* ==========================================================================
   Upload Area (Drag & Drop Zone)
   ========================================================================== */

.upload-area {
    border: 2px dashed #ced4da;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    background-color: #fafbfa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover, 
.upload-area.dragover {
    border-color: var(--accent-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.upload-area i {
    transition: transform 0.3s ease;
}

.upload-area:hover i {
    transform: translateY(-5px);
    color: var(--accent-color) !important;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
}

.btn-primary:hover, 
.btn-primary:focus {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background-color: var(--primary-color);
    color: #ecf0f1;
    padding: 60px 0 30px;
    font-size: 0.95rem;
}

.footer-title {
    color: #ffffff;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    margin-bottom: 20px;
    display: inline-block;
    font-weight: 600;
}

.blockquote {
    font-size: 0.95rem;
    line-height: 1.7;
}

footer a {
    color: #bdc3c7;
    transition: color 0.3s;
}

footer a:hover {
    color: #ffffff;
}


/* ==========================================================================
   Tabs Customization
   ========================================================================== */
.nav-pills .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.nav-pills .nav-link:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--accent-hover);
}

.nav-pills .nav-link.active {
    background-color: var(--accent-color);
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}