/**
 * 南京医科大学离退休工作处网站样式
 * 主题色：#003366
 */

/* 全局样式 */
:root {
    --primary-color: #003366;
    --primary-light: #004080;
    --primary-dark: #002244;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --text-muted: #666;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

/* 顶部Logo样式 */
.top-header {
    background-color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-light);
    background: linear-gradient(135deg, #4a90e2 0%, var(--primary-color) 100%);
    padding: 1.5rem 0 !important;
}

.header-logo {
    max-height: 80px;
    width: auto;
    transition: all 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.02);
}

/* 搜索框样式 */
.search-container {
    max-width: 220px;
    margin-left: auto;
}

.search-input {
    border: none;
    border-radius: 20px 0 0 20px;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    font-size: 0.9rem;
}

.search-input:focus {
    background-color: white;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    border-color: transparent;
}

.search-input::placeholder {
    color: #999;
    opacity: 1;
}

.btn-search {
    border: none;
    border-radius: 0 20px 20px 0;
    background-color: var(--primary-light);
    color: white;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateX(-1px);
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
    box-shadow: var(--shadow);
    padding: 0.3rem 0;
}

.bg-primary-dark {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

/* 导航容器样式 */
.navbar .container {
    max-width: 1300px;
    padding: 0;
}

/* 导航菜单布局 */
.navbar-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin: 0;
}

.navbar-nav .nav-item {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 120px;
}

.navbar-nav .nav-link {
    font-weight: 600;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    border-radius: 5px;
    text-align: center;
    font-size: 1.1rem;
    color: white !important;
    width: 100%;
    display: block;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    color: white !important;
}

/* 主轮播图样式 */
.carousel {
    height: 433px;
    max-width: 1300px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.15);
}

.carousel-bg {
    height: 433px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    position: relative;
}

/* 工作动态轮播图样式 */
.work-carousel {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.15);
    height: 100%;
    background:#c7cee0;

    position: relative;
}

.work-carousel .carousel {
    height: 100%;
    max-width: none;
    margin: 0;
    border-radius: 8px;
    box-shadow: none;
    overflow: hidden;
}

.work-carousel .carousel-item {
    height: 280px;
    position: relative;
}

.work-carousel .carousel-item img {
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.work-carousel .carousel-control-prev,
.work-carousel .carousel-control-next {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 10px;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.work-carousel .carousel-control-prev:hover,
.work-carousel .carousel-control-next:hover {
    background: white;
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.work-carousel .carousel-control-prev-icon,
.work-carousel .carousel-control-next-icon {
    filter: none;
    background-image: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.work-carousel .carousel-control-prev-icon::before,
.work-carousel .carousel-control-next-icon::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary-color);
}

.work-carousel .carousel-control-prev-icon::before {
    content: "\f104";
}

.work-carousel .carousel-control-next-icon::before {
    content: "\f105";
}

.work-carousel .carousel-indicators {
    bottom: 45px;
    margin-bottom: 0;
    z-index: 3;
}

.work-carousel .carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 51, 102, 0.2);
    margin: 0 4px;
    position: relative;
    transition: all 0.3s ease;
}

.work-carousel .carousel-indicators button::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-carousel .carousel-indicators button.active {
    background-color: var(--primary-color);
    border-color: white;
    transform: scale(1.2);
}

.work-carousel .carousel-indicators button.active::after {
    opacity: 1;
}

.work-carousel .fa-camera-retro {
    color: var(--primary-color);
    opacity: 0.8;
    font-size: 0.9em;
}

.work-carousel-title .title-text {
    transition: opacity 0.2s ease-in-out;
}

/* 工作动态轮播图标题 */
.work-carousel-title {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
    color: var(--primary-color);
    padding: 10px 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    margin: 0;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    font-weight: 500;
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 0 0 8px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.work-carousel-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, 
        rgba(0, 51, 102, 0.05), 
        rgba(0, 51, 102, 0.02) 20%, 
        rgba(0, 51, 102, 0.02) 80%, 
        rgba(0, 51, 102, 0.05)
    );
    pointer-events: none;
}

.work-carousel-title .fa-camera-retro {
    position: relative;
    margin-right: 8px;
    color: var(--primary-color);
    opacity: 0.85;
    font-size: 0.9em;
}

.work-carousel-title .title-text {
    position: relative;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 5px;
}

@media (max-width: 768px) {
    .work-carousel-title {
        font-size: 0.85rem;
        padding: 8px 12px;
        min-height: 40px;
    }
}


/* 轮播图现在只显示图片，无需文字样式 */

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-header {
    background-color: var(--primary-color) !important;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.card-header h5 {
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem 1.25rem;
}

/* 栏目头部"更多"链接样式 */
.more-link {
    opacity: 0.9;
    transition: all 0.3s ease;
    font-weight: 500;
}

.more-link:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 15px;
    transform: translateX(-2px);
}

.more-link i {
    transition: transform 0.3s ease;
}

.more-link:hover i {
    transform: translateX(2px);
}

/* 新闻列表样式 */
.news-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list li:hover {
    background-color: rgba(0, 51, 102, 0.05);
    padding-left: 10px;
    border-radius: 5px;
}

/* 新闻项目容器 */
.news-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

/* 新闻标题样式 */
.news-title {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    flex: 1;
    min-width: 0;
}

.news-title:hover {
    color: var(--primary-color);
}

.news-title .fas.fa-angle-right {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.news-item:hover .news-title .fas.fa-angle-right {
    transform: translateX(3px);
}

/* 新闻日期样式 */
.news-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
    background-color: rgba(0, 51, 102, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.news-item:hover .news-date {
    background-color: rgba(0, 51, 102, 0.15);
    color: var(--primary-color);
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* 图片滚动样式 */
.photo-scroll-container {
    overflow: hidden;
    position: relative;
    margin: 1rem 0;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.02) 0%, rgba(0, 51, 102, 0.05) 100%);
    border: 1px solid rgba(0, 51, 102, 0.1);
    border-radius: 10px;
    padding: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.08);
}

.photo-scroll {
    display: flex;
    animation: scroll 25s linear infinite;
    gap: 1.5rem;
}

.photo-item {
    flex-shrink: 0;
    text-align: center;
    width: 160px;
}

.photo-item img {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 51, 102, 0.15);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.1);
}

.photo-item:hover img {
    transform: scale(1.08);
    box-shadow: 0 12px 30px rgba(0, 51, 102, 0.25);
    border-color: var(--primary-color);
}

.photo-caption {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(0, 51, 102, 0.08);
    border: 1px solid rgba(0, 51, 102, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    display: inline-block;
    transition: all 0.3s ease;
}

.photo-item:hover .photo-caption {
    background: rgba(0, 51, 102, 0.12);
    border-color: var(--primary-color);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 暂停动画在悬停时 */
.photo-scroll-container:hover .photo-scroll {
    animation-play-state: paused;
}

/* 友情链接样式 */
.bg-primary {
    background-color: var(--primary-color) !important;
}

section.bg-primary a {
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

section.bg-primary a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* 底部样式 */
footer {
    margin-top: auto;
}

footer p {
    line-height: 1.6;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    /* 主轮播图 */
    .carousel {
        height: 264px;
    }
    
    .carousel-bg {
        height: 264px;
    }

    /* 工作动态轮播图 */
    .work-carousel {
        margin-bottom: 1rem;
    }

    .work-carousel .carousel-item {
        height: 240px;
    }
}

@media (max-width: 768px) {
    /* 主轮播图 */
    .carousel {
        height: 198px;
    }
    
    .carousel-bg {
        height: 198px;
    }

    /* 工作动态轮播图 */
    .work-carousel {
        padding: 8px;
    }

    .work-carousel .carousel-item {
        height: 200px;
    }

    .work-carousel-title {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-height: 36px;
        bottom: 8px;
        left: 8px;
        right: 8px;
    }

    .work-carousel-title .fa-camera-retro {
        margin-right: 6px;
        font-size: 0.85em;
    }

    .work-carousel .carousel-indicators {
        bottom: 40px;
    }

    .work-carousel .carousel-indicators button {
        width: 6px;
        height: 6px;
        margin: 0 3px;
    }
}

@media (max-width: 576px) {
    /* 容器间距 */
    section.py-5 {
        padding: 2rem 0 !important;
    }
    
    .container {
        padding: 0 15px;
    }

    /* 顶部样式 */
    .header-logo {
        max-height: 45px;
    }
    
    .search-container {
        max-width: 150px;
        margin-top: 15px;
    }
    
    .top-header {
        padding: 0.8rem 0 !important;
    }
    
    .top-header .row {
        text-align: center;
    }
    
    .top-header .col-md-4 {
        margin-top: 15px;
    }

    /* 导航栏 */
    .navbar .container {
        padding: 0 1rem;
    }
    
    .navbar-nav {
        padding: 0.5rem 0;
    }
    
    .navbar-nav .nav-item {
        margin: 0.2rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 51, 102, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Focus样式 */
.btn:focus,
.nav-link:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    .navbar,
    .carousel,
    .photo-scroll-container,
    footer {
        display: none;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 全宽布局样式 */
.container-fluid.px-4 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

@media (max-width: 768px) {
    .container-fluid.px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* 栏目标题样式 */
.section-header {
    position: relative;
    padding: 2rem 0;
}

.section-title {
    position: relative;
    display: inline-block;
}

.title-divider {
    height: 3px;
    width: 80px;
    background: linear-gradient(135deg, #003366, #4a90e2);
    border-radius: 2px;
}

/* 列表页样式优化 */
.date-box {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #003366;
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 70px;
    border: 1px solid #e0e0e0;
}

/* 小尺寸时间框 */
.date-box-small {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #003366;
    padding: 8px 6px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    min-width: 50px;
    border: 1px solid #e0e0e0;
    margin-top: 2px; /* 与标题顶部对齐 */
}

.date-day {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1;
    color: #003366;
}

.date-month {
    font-size: 0.8rem;
    margin: 3px 0 1px 0;
    color: #666;
    font-weight: 500;
}

.date-year {
    font-size: 0.7rem;
    color: #999;
    font-weight: 400;
}

/* 小时间框内部元素样式 */
.date-box-small .date-day {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1;
    color: #003366;
}

.date-box-small .date-month {
    font-size: 0.7rem;
    margin: 2px 0 0 0;
    color: #666;
    font-weight: 500;
}

.news-title-link {
    transition: color 0.3s ease;
}

.news-title-link:hover {
    color: #003366 !important;
}

.article-summary {
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 新闻列表项悬停效果 */
.list-group-item:hover {
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.list-group-item:hover .date-box,
.list-group-item:hover .date-box-small {
    background: linear-gradient(135deg, #003366, #4a90e2);
    color: white;
    transition: all 0.3s ease;
}

.list-group-item:hover .date-day {
    color: white;
}

.list-group-item:hover .date-month {
    color: rgba(255,255,255,0.9);
}

.list-group-item:hover .date-year {
    color: rgba(255,255,255,0.8);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem !important;
    }
    
    .title-divider {
        width: 60px;
    }
    
    .date-box {
        min-width: 60px;
        padding: 10px 6px;
    }
    
    .date-box-small {
        min-width: 40px;
        padding: 6px 4px;
        margin-top: 3px; /* 移动端调整对齐 */
    }
    
    .date-day {
        font-size: 1.4rem;
    }
    
    .date-box-small .date-day {
        font-size: 1rem;
    }
    
    .date-box-small .date-month {
        font-size: 0.6rem;
    }
    
    /* 移动端列表项更紧凑 */
    .list-group-item {
        padding: 0.75rem 0.5rem !important;
    }
}

/* 文章页样式优化 */
.article-title {
    font-size: 2rem;
    line-height: 1.4;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.article-meta {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.meta-item {
    font-size: 0.9rem;
}

.article-content {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.article-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-text p {
    margin-bottom: 1.2rem;
    text-indent: 2em; /* 首行缩进2个字符 */
}

.article-text h3 {
    font-size: 1.4rem;
    font-weight: 600;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 2rem 0 1rem 0;
}

.article-text .lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

.article-quote {
    position: relative;
    margin: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--primary-color);
}

.article-quote .fa-quote-left {
    font-size: 1.2rem;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.article-tags .badge {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
}

.article-navigation .btn {
    font-size: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-navigation .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.article-navigation .btn-outline-primary {
    border-width: 2px;
}

.article-navigation .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
}

.related-articles .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-articles .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 面包屑导航样式 */
.breadcrumb-item + .breadcrumb-item::before {
    color: #003366;
}

.breadcrumb-item.active {
    color: #003366 !important;
}

.breadcrumb-item a:hover {
    color: #004080 !important;
}

@media (max-width: 992px) {
    .article-title {
        font-size: 1.6rem;
    }
    
    .article-navigation .btn {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }
} 