/* 红色主题信息发布网站样式 - PbootCMS版本 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 颜色变量 */
:root {
    --primary-red: #dc2626;
    --dark-red: #b91c1c;
    --light-red: #fef2f2;
    --accent-red: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
}

/* 导航栏样式 */
.navbar {
    background: white;
    color: var(--primary-red);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-red);
}

.logo h1 a {
    color: var(--primary-red);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.3rem 0.4rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--light-red);
    color: var(--primary-red);
    transform: translateY(-1px);
}

/* 按钮样式 */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-login {
    background: transparent;
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
}

.btn-login:hover {
    background: var(--primary-red);
    color: white;
}

.btn-register {
    background: var(--primary-red);
    color: white;
}

.btn-register:hover {
    background: var(--dark-red);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
}

.btn-outline:hover {
    background: var(--primary-red);
    color: white;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

/* 首页横幅幻灯片区域 */
.hero-slider {
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.slider-container {
    position: relative;
    background: linear-gradient(135deg, var(--light-red), white);
}

.slider-wrapper {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide .container {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 20px;
}

.slide-content {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.slide-content h2 {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-weight: bold;
}

.slide-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.slide-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.slide-image img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: var(--dark-red);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.3);
}

.indicator:hover {
    background: rgba(255,255,255,0.8);
}

/* 功能特色区域 */
.features {
    margin-bottom: 3rem;
}

.features h3 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-red);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h4 {
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* 最新信息预览 */
.latest-info {
    margin-bottom: 3rem;
}

.latest-info h3 {
    color: var(--primary-red);
    margin-bottom: 1.5rem;
}

.info-preview {
    display: grid;
    gap: 1rem;
}

.info-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-red);
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.info-item h4 {
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.info-item h4 a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-item h4 a:hover {
    color: var(--dark-red);
    text-decoration: underline;
}

.info-item p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.info-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 搜索筛选区域 */
.search-filter h2 {
    color: var(--primary-red);
    margin-bottom: 1.5rem;
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    border-color: var(--primary-red);
}

.filter-tab.active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* 信息列表样式 */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.total-count {
    color: var(--text-light);
}

.sort-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-items .info-item {
    padding: 1.5rem;
}

.info-items .info-item h4 {
    margin-bottom: 0.5rem;
}

.info-items .info-item h4 a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.2rem;
}

.info-items .info-item h4 a:hover {
    color: var(--primary-red);
}

.info-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
}

.job-tag, .招聘-tag { background: var(--accent-red); }
.secondhand-tag, .二手-tag { background: #059669; }
.rental-tag, .租房-tag { background: #7c3aed; }
.service-tag, .服务-tag { background: #0891b2; }
.other-tag, .其他-tag { background: #6b7280; }
.top-tag { background: #f59e0b; }

.info-content {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.info-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination .page-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-dark);
}

.pagination .page-btn:hover {
    border-color: var(--primary-red);
}

.pagination .page-btn.active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* 信息详情页样式 */
.breadcrumb {
    margin-bottom: 2rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-red);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.info-detail {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-red);
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-title {
    color: var(--primary-red);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.detail-stats {
    display: flex;
    gap: 2rem;
    color: var(--text-light);
}

.detail-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--light-red);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.author-actions {
    display: flex;
    gap: 0.5rem;
}

/* 图片展示区域 */
.image-gallery {
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.main-image {
    margin-bottom: 1rem;
}

.main-image-container {
    height: 300px;
    background: var(--light-red);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.main-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
    padding: 1rem;
    background: #fafafa;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    overflow: hidden;
}

.thumbnail:hover {
    border-color: var(--primary-red);
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--primary-red);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.3);
}

.thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.detail-content h3 {
    color: var(--primary-red);
    margin: 1.5rem 0 1rem 0;
}

.detail-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.detail-content li {
    margin-bottom: 0.5rem;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

/* 相关信息推荐 */
.related-info {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.related-info h3 {
    color: var(--primary-red);
    margin-bottom: 1.5rem;
}

.related-list {
    display: grid;
    gap: 1rem;
}

.related-item {
    padding: 1rem;
    border-left: 3px solid var(--primary-red);
    background: var(--light-red);
    border-radius: 0 6px 6px 0;
}

.related-item h4 {
    margin-bottom: 0.5rem;
}

.related-item h4 a {
    color: var(--text-dark);
    text-decoration: none;
}

.related-item h4 a:hover {
    color: var(--primary-red);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.close:hover {
    color: var(--primary-red);
}

.modal h3 {
    color: var(--primary-red);
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.modal input:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* 用户信息样式 */
.user-info {
    color: var(--primary-red);
    font-weight: 500;
    margin-right: 1rem;
}

/* 页脚样式 */
.footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 幻灯片响应式 */
    .slider-wrapper {
        height: 300px;
    }
    
    .slide {
        flex-direction: column;
        text-align: center;
    }
    
    .slide .container {
        flex-direction: column;
        text-align: center;
        padding: 0 15px;
    }
    
    .slide-content {
        align-items: center;
        text-align: center;
        padding: 1.5rem 0;
    }
    
    .slide-content h2 {
        font-size: 1.8rem;
    }
    
    .slide-image {
        display: none;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    /* 图片展示响应式 */
    .main-image-container {
        height: 200px;
    }
    
    .thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .info-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .detail-author {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .detail-actions {
        flex-wrap: wrap;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    /* 幻灯片极小屏幕 */
    .slider-wrapper {
        height: 250px;
    }
    
    .slide .container {
        padding: 0 15px;
    }
    
    .slide-content h2 {
        font-size: 1.5rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .slider-btn {
        display: none;
    }
    
    /* 图片展示极小屏幕 */
    .main-image-container {
        height: 180px;
    }
    
    .thumbnail {
        width: 50px;
        height: 40px;
    }
    
    .detail-title {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
}