﻿/* 全局样式 */
:root {
    --primary-color: #198754;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

body {
    font-family: 'Microsoft YaHei', 'SimSun', Arial, sans-serif;
    background-color: #f8f9fa;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 英雄区域 */
.hero-section {
    position: relative;
    background-image: url("../images/carousel/background.jpg");
    background-image: -webkit-image-set(url("../images/carousel/background.webp") 1x, url("../images/carousel/background.jpg") 1x);
    background-image: image-set(url("../images/carousel/background.webp") 1x, url("../images/carousel/background.jpg") 1x);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 0;
    margin-bottom: 16px;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.42) 42%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-section > .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    color: rgba(255, 255, 255, 0.92) !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.hero-section p.lead {
    color: rgba(255, 255, 255, 0.82) !important;
    line-height: 1.7;
    max-width: 52rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-typewriter-wrap {
    position: relative;
    display: block;
}

.hero-typewriter-ghost {
    opacity: 0;
    pointer-events: none;
    user-select: none;
    text-shadow: none !important;
}

.hero-typewriter {
    position: absolute;
    inset: 0;
    display: block;
}

.hero-typewriter::after {
    content: "|";
    margin-left: 2px;
    color: rgba(255, 255, 255, 0.6);
    animation: heroTypewriterBlink 1s steps(1, end) infinite;
}

.hero-typewriter.hero-typewriter--static::after {
    content: "";
    animation: none;
}

@keyframes heroTypewriterBlink {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

.hero-actions .hero-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}
/* 统计卡片 */
.stat-card {
    border-radius: 10px;
    padding: 25px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    width: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.stat-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.stat-info {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
}

.stat-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.stat-icon {
    font-size: 3.5rem;
    opacity: 0.7;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

/* 产业环节卡片 */
.sector-card {
    background: white;
    border-radius: 10px;
    padding: 20px 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.sector-card.active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    color: white;
}

.sector-icon {
    font-size: 2.5rem;
    color: #198754;
    transition: color 0.3s ease;
}

.sector-card.active .sector-icon {
    color: white;
}

/* 首页“发展优势”卡片：镜面反光缓慢扫过 */
.advantage-card {
    position: relative;
    overflow: hidden;
}

.advantage-card::before {
    content: "";
    position: absolute;
    inset: -60%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(25, 135, 84, 0) 44%,
        rgba(25, 135, 84, 0.32) 50%,
        rgba(25, 135, 84, 0) 56%,
        transparent 100%
    );
    transform: translate3d(-35%, -35%, 0);
    filter: blur(0.4px);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    animation: advantageCardShine 2s ease-in-out infinite;
}

.advantage-card .card-body {
    position: relative;
    z-index: 1;
}

@keyframes advantageCardShine {
    0%,
    8% {
        opacity: 0;
        transform: translate3d(-35%, -35%, 0);
    }
    16% {
        opacity: 0.7;
    }
    62% {
        opacity: 0.7;
        transform: translate3d(35%, 35%, 0);
    }
    72%,
    100% {
        opacity: 0;
        transform: translate3d(35%, 35%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .advantage-card::before {
        animation: none;
        opacity: 0;
    }
}

/* 表格样式 */
.table-hover tbody tr:hover {
    background-color: rgba(25, 135, 84, 0.1);
}

/* 徽章样式 */
.badge {
    padding: 6px 12px;
    font-weight: 500;
}

/* 分页样式 */
.pagination .page-link {
    color: #198754;
    border-color: #198754;
}

.pagination .page-item.active .page-link {
    background-color: #198754;
    border-color: #198754;
}

.pagination .page-link:hover {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

/* 导航栏样式 */
.navbar {
    font-size: 1rem;
    line-height: 1.5;
}

.navbar .navbar-brand {
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 500;
}

.navbar .navbar-brand .brand-mark {
    width: 22px;
    height: 22px;
    vertical-align: -0.125em;
}

.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-nav .nav-link.active {
    font-weight: 400;
}

.navbar-dark .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.navbar-dark .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* 研究成果卡片 */
.research-card {
    border-left: 4px solid #198754;
    transition: all 0.3s ease;
    cursor: pointer;
}

.research-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(5px);
}

/* 按钮样式 */
.btn {
    border-radius: 5px;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #157347;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    .stat-icon {
        font-size: 2.5rem;
    }

    .sector-icon {
        font-size: 2rem;
    }
}

/* 公告和研究成果列表样式 */
.announcement-item,
.research-item {
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
}

.announcement-item:last-child,
.research-item:last-child {
    border-bottom: none;
}

.announcement-item h6,
.research-item h6 {
    color: #198754;
    margin-bottom: 5px;
}

.announcement-item h6 a:hover,
.research-item h6 a:hover {
    text-decoration: underline !important;
}

/* 图表容器 */
canvas {
    max-height: 400px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #198754;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #157347;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* 页脚样式 */
footer {
    margin-top: auto;
}

/* 确保页面至少占满整个视口 */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    padding-top: 56px;
}

main {
    flex: 1;
}

/* 轮播图样式优化 */
.carousel {
    border-radius: 15px;
    overflow: hidden;
}

.carousel-item img {
    border-radius: 15px;
    height: clamp(240px, 50vh, 500px);
    object-fit: cover;
}

.carousel-caption {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.carousel-caption-box {
    background-color: rgba(0, 0, 0, 0.11);
}

.carousel-caption h5 {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-caption p {
    font-size: 1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .carousel-caption {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 1.75rem;
    }

    .carousel-caption-box {
        background-color: rgba(0, 0, 0, 0.11);
    }

    .carousel-caption h5 {
        font-size: 1.1rem;
    }

    .carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }
}

/* 轮播控制按钮增强 */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(25, 135, 84, 0.7);
    border-radius: 50%;
    padding: 15px;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(25, 135, 84, 0.9);
}

/* 轮播指示器美化 */
.carousel-indicators {
    margin-bottom: 0.25rem;
}

.carousel-indicators [data-bs-target] {
    background-color: rgba(25, 135, 84, 0.5);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border-top: 0;
    border-bottom: 0;
}

.carousel-indicators .active {
    background-color: #198754;
    width: 14px;
    height: 14px;
}

/* Modernization KPI cards */
.modernization-card .kpi-metrics h5,
.modernization-card .kpi-metrics h6 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}

.modernization-card .kpi-metrics small {
    font-size: 0.8rem;
}

/* 统一产业链现代化指标图表高度 */
.modernization-card .card-body:first-of-type {
    height: 260px;
    padding: 1rem 1rem 0.5rem 1rem;
    display: flex;
    flex-direction: column;
}

.modernization-card canvas {
    max-height: 220px !important;
}










