/* ===========================
   甘薯数据库 - 自定义样式
   =========================== */

/* 全局变量 */
:root {
    --primary-green: #2d5016;
    --secondary-green: #4a7c2c;
    --accent-orange: #e67e22;
    --light-bg: #f8f9fa;
    --dark-text: #333;
    --light-text: #666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
}

/* 品牌标题：中英文都与导航保持同一中轴 */
.header-title {
    padding: 0.72rem 0;
    background: linear-gradient(135deg, #2d5016, #4a7c2c);
}

.site-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin: 0;
    color: #fff;
    font-size: clamp(1.75rem, 2.4vw, 2.3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.015em;
    text-align: center;
}

.site-brand-logo {
    width: auto;
    height: 4.6rem;
    flex: 0 0 auto;
}

html[lang="zh-CN"] .site-brand-name {
    font-size: 1.08em;
    font-weight: 650;
    letter-spacing: 0.09em;
}

/* 导航栏 */
.navbar:not(.navbar-menu) {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green)) !important;
    box-shadow: var(--shadow);
}

.navbar-menu {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 50%, var(--accent-orange) 100%) !important;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
}

.navbar-menu > .container,
.navbar-menu .navbar-collapse {
    position: relative;
}

.site-navigation {
    font-size: 1.05rem;
}

.navbar-menu .nav-link {
    font-weight: 600;
    color: white !important;
    padding: 0.78rem 0.72rem !important;
    line-height: 1.15;
    white-space: nowrap;
}

html[lang="zh-CN"] .navbar-menu .nav-link {
    font-size: 1rem;
    letter-spacing: 0.035em;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-brand i {
    color: var(--accent-orange);
}

/* 下拉菜单样式 */
.dropdown-menu {
    background: white;
    border: 2px solid var(--secondary-green);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    margin-top: 8px;
}

.dropdown-item {
    color: var(--dark-text);
    padding: 12px 20px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(74, 124, 44, 0.25), rgba(230, 126, 34, 0.2));
    color: var(--primary-green);
    border-left-color: var(--accent-orange);
    padding-left: 25px;
}

.dropdown-item:focus {
    background: linear-gradient(90deg, rgba(74, 124, 44, 0.25), rgba(230, 126, 34, 0.2));
    color: var(--primary-green);
}

/* Hero 区域 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 50%, var(--accent-orange) 100%);
    padding: 80px 0;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.overview-copy {
    max-width: 900px;
    margin: 0 auto 28px;
    color: #444;
    font-size: 1rem;
    line-height: 1.85;
    text-align: justify;
    text-justify: inter-character;
}

.overview-title {
    max-width: 900px;
    margin: 0 auto 16px;
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary-green);
    letter-spacing: 0.5px;
}

html[lang="zh-CN"] .overview-copy,
html[lang="zh-CN"] .about-content p {
    text-align: left;
    text-indent: 2em;
}

/* 搜索框 */
.search-box {
    max-width: 700px;
    margin: 0 auto;
}

.search-box .form-control {
    border: none;
    border-radius: 50px 0 0 50px;
    padding: 15px 25px;
    font-size: 1.1rem;
}

.search-box .btn-search {
    background-color: var(--accent-orange);
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    padding: 15px 30px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-box .btn-search:hover {
    background-color: #d35400;
    transform: translateX(2px);
}

/* 统计卡片区域 */
.statistics-section {
    padding: 60px 0;
    background-color: var(--light-bg);
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    font-size: 3rem;
    color: var(--secondary-green);
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-green);
    margin: 10px 0;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--light-text);
    margin: 0;
}

/* 功能入口区域 */
.features-section {
    padding: 60px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-green);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-green), var(--accent-orange));
    border-radius: 2px;
}

.feature-card {
    display: block;
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--dark-text);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    color: var(--primary-green);
}

.feature-icon {
    font-size: 3rem;
    color: var(--secondary-green);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    color: var(--accent-orange);
    transform: scale(1.1);
}

.feature-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* 内容区域 */
.content-section {
    padding: 60px 0;
    background-color: white;
}

/* 轮播图 */
.carousel {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.carousel-item img {
    height: 400px;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 15px;
}

/* 新闻列表 */
.news-list {
    background: white;
}

.news-item {
    padding: 20px;
    border-left: 4px solid var(--secondary-green);
    background: var(--light-bg);
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.news-item:hover {
    border-left-color: var(--accent-orange);
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.news-date {
    color: var(--accent-orange);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.news-title {
    color: var(--primary-green);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.news-excerpt {
    color: var(--light-text);
    font-size: 0.95rem;
    margin: 0;
}

/* 关于区域 */
.about-section {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.about-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--light-text);
}

.about-content h4 {
    color: var(--primary-green);
    font-weight: 600;
    margin-top: 20px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 10px 0;
    font-size: 1.05rem;
    color: var(--dark-text);
}

.feature-list i {
    color: var(--secondary-green);
    margin-right: 10px;
}

/* 参考文献区域 */
.references-section {
    padding: 60px 0;
    background-color: white;
}

.reference-list {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 15px;
}

.reference-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
}

.reference-item:last-child {
    border-bottom: none;
}

.reference-number {
    color: var(--accent-orange);
    font-weight: bold;
    flex-shrink: 0;
}

.reference-text {
    color: var(--light-text);
    line-height: 1.6;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-orange);
    padding-left: 5px;
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 30px 0 20px;
}

.footer i {
    margin-right: 8px;
    color: var(--accent-orange);
}

.footer-partners {
    margin: 15px 0;
    line-height: 2;
}

.footer-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

.footer-separator {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-funding {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin: 10px 0;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .header-title {
        padding: 0.8rem 0;
    }

    .site-brand {
        gap: 0.65rem;
        font-size: clamp(1.35rem, 4.4vw, 2rem);
    }

    .site-brand-logo {
        height: 4rem;
    }

    html[lang="zh-CN"] .site-brand-name {
        letter-spacing: 0.055em;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .search-box .form-control,
    .search-box .btn-search {
        font-size: 1rem;
        padding: 12px 20px;
    }
    
    .feature-card {
        padding: 25px 15px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .carousel-item img {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .site-brand {
        align-items: center;
        font-size: 1.08rem;
        text-align: left;
    }

    .site-brand-logo {
        height: 3.2rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        font-size: 2.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

/* ===== Database Overview Cards ===== */
.db-overview-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8fffe 0%, #e8f5e9 100%);
}

.db-overview-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 16px !important;
    cursor: pointer;
}

.db-overview-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15) !important;
}

.db-icon {
    font-size: 3rem;
    color: var(--primary-green);
}

.db-badge-green  { background-color: var(--primary-green) !important; }
.db-badge-orange { background-color: #e67e22 !important; }
.db-badge-purple { background-color: #8e44ad !important; }

/* ===== Homepage Charts Section ===== */
.charts-insight-section {
    padding: 60px 0;
    background: #fff;
}

.chart-card {
    border-radius: 16px !important;
    transition: box-shadow 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
}

.chart-card-title {
    color: var(--primary-green);
    font-weight: 600;
    font-size: 1.1rem;
}
