/* =================================================================
   中华家谱数据库 - 寻祖大厅专用样式表 (复用首页风格)
   适配日期: 2025-08-14
================================================================= */

/* ------------------ 寻祖大厅布局容器 ------------------ */
/* =================================================================
   修复对齐问题：
   1. 去除 .hall-container 的 padding，因为它已经在 .container 里了。
   2. 强制宽度 100%，确保和上方的导航栏完全等宽。
================================================================= */

.hall-container {
    /* 重置宽度和边距，使其与导航栏完美对齐 */
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important; 
    margin: 24px 0 !important;
    
    /* 保持布局 */
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 确保搜索条填满容器 */
.hall-action-bar {
    width: 100%;
    box-sizing: border-box; /* 确保 padding 不会撑大宽度 */
}

/* 微调下方的卡片网格，使其也对齐 */
.hall-grid {
    width: 100%;
    box-sizing: border-box;
}

/* ------------------ 顶部操作区 (筛选与发布) ------------------ */
.hall-action-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-radius: var(--border-radius-large);
    background: linear-gradient(135deg, 
        rgba(255, 248, 240, 0.95) 0%, 
        rgba(248, 242, 232, 0.9) 100%);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-medium);
    position: relative;
    backdrop-filter: blur(10px);
}

/* 顶部金色装饰线 (复用首页风格) */
.hall-action-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--gold-accent) 50%, 
        transparent 100%);
}

.hall-search-group {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 600px;
}

.hall-search-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    background: var(--paper-white);
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-normal) ease;
    font-family: var(--font-serif);
}

.hall-search-input:focus {
    border-color: var(--theme-red);
    box-shadow: 0 0 0 3px rgba(169, 35, 34, 0.1);
}

/* 发布按钮 (复用 button-primary 但增加图标感) */
.btn-publish {
    background: linear-gradient(135deg, var(--theme-red) 0%, var(--theme-red-dark) 100%);
    color: var(--text-light);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-publish:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-dramatic);
    background: linear-gradient(135deg, var(--theme-red-light) 0%, var(--theme-red) 100%);
}

.btn-publish i { font-size: 1.1em; }

/* ------------------ 分类标签栏 ------------------ */
/* 修改 search-hall.css */

.hall-tags-filter {
    display: flex;
    gap: 12px;
    
    /* --- 关键修改开始 --- */
    /* 原来可能只有 padding-bottom，现在增加 padding-top */
    /* 上右下左：上边距给 10px 防止头部被切，下边距 15px 显示阴影 */
    padding: 10px 5px 15px 5px; 
    /* --- 关键修改结束 --- */

    overflow-x: auto; /* 保持横向滚动 */
    
    /* 隐藏滚动条 (美化) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* 隐藏 Chrome/Safari 的滚动条 */
.hall-tags-filter::-webkit-scrollbar {
    display: none;
}

.filter-tag {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all var(--transition-normal);
}

.filter-tag:hover, .filter-tag.active {
    border-color: var(--theme-red);
    color: var(--theme-red);
    background: linear-gradient(135deg, 
        rgba(169, 35, 34, 0.05) 0%, 
        rgba(169, 35, 34, 0.1) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

/* ------------------ 寻祖信息列表 (瀑布流或网格) ------------------ */
.hall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* 单个信息卡片 (基于 .result-item 改造) */
.notice-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(5px);
}

/* 顶部悬停渐变线条 */
.notice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--theme-red) 0%, 
        var(--gold-accent) 50%, 
        var(--theme-red) 100%);
    border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.notice-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
    border-color: var(--border-accent);
}

.notice-card:hover::before {
    opacity: 1;
}

/* 卡片头部 */
.notice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--divider-color);
}

.notice-type {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 900;
    letter-spacing: 1px;
}

/* 类型配色方案 */
.type-find-ancestor { /* 寻祖 */
    background: rgba(169, 35, 34, 0.1);
    color: var(--theme-red);
    border: 1px solid rgba(169, 35, 34, 0.2);
}
.type-find-descendant { /* 寻亲 */
    background: rgba(212, 175, 55, 0.15);
    color: #967d28; /* 深金色 */
    border: 1px solid rgba(212, 175, 55, 0.3);
}
.type-repair { /* 修谱 */
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.notice-date {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

/* 卡片内容 */
.notice-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    line-height: 1.4;
    cursor: pointer;
    transition: color 0.2s;
}

.notice-title:hover {
    color: var(--theme-red);
}

.notice-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 限制显示3行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片底部信息 */
.notice-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.notice-location {
    display: flex;
    align-items: center;
    gap: 4px;
}

.notice-location i {
    color: var(--theme-red);
}

/* 联系按钮 (小尺寸) */
.btn-contact {
    padding: 6px 12px;
    border: 1px solid var(--theme-red);
    color: var(--theme-red);
    background: transparent;
    border-radius: var(--border-radius-small);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-contact:hover {
    background: var(--theme-red);
    color: #fff;
}

/* ------------------ 详情弹窗 (拟态纸张) ------------------ */
.notice-modal-content {
    background: var(--paper-white);
    background-image: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 60%);
    padding: 40px;
    border-radius: var(--border-radius-large);
    max-width: 700px;
    width: 90%;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-dramatic);
    position: relative;
    text-align: left; /* 覆盖全局居中 */
}

/* 印章装饰效果 */
.notice-modal-content::after {
    content: '寻根';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    border: 3px solid rgba(169, 35, 34, 0.2);
    border-radius: 8px;
    color: rgba(169, 35, 34, 0.2);
    font-size: 32px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-15deg);
    font-family: var(--font-decorative);
    pointer-events: none;
}

.notice-detail-title {
    font-size: 28px;
    color: var(--theme-red);
    border-bottom: 2px solid var(--gold-accent);
    padding-bottom: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.notice-detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--divider-color);
    margin-bottom: 24px;
}

.info-item label {
    font-weight: 700;
    color: var(--text-secondary);
    margin-right: 8px;
}

.notice-detail-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 30px;
    white-space: pre-wrap;
}

/* ------------------ 响应式微调 ------------------ */
@media (max-width: 768px) {
    .hall-action-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .hall-search-group {
        max-width: 100%;
        flex-direction: column;
    }
    
    .btn-publish {
        justify-content: center;
    }
    
    .notice-detail-info {
        grid-template-columns: 1fr;
    }
}