/* static/css/style.css */

/* General Body Styles */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 头部样式（已迁移备份至 style_backup.css，保留最简结构） */

/* Main Content Styles */
.main-content {
    padding: 2rem 0;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

/* Footer Styles */
.footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Custom select wrapper */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\f078'; /* Font Awesome down arrow */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6c757d;
}

.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 40px; /* Make space for the arrow */
}

/* 新闻图片样式 */
.news-hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.news-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

/* 富文本编辑器中的图片大小控制 */
.ck-editor__editable img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 关于我们页面图片样式 */
.about-page .intro-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 图片对齐样式 */
.about-page .intro-content img.left {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

.about-page .intro-content img.right {
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
}

.about-page .intro-content img.center {
    display: block;
    margin: 20px auto;
}

/* 响应式图片 */
@media (max-width: 768px) {
    .about-page .intro-content img.left,
    .about-page .intro-content img.right {
        float: none;
        margin: 15px auto;
        display: block;
    }
}

/* Edge 图像渲染兼容性：添加 -webkit-optimize-contrast 作为备用 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .navbar-nav .nav-link img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 搜索建议样式 */
.search-container {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestions-list {
    padding: 0;
    margin: 0;
}

.suggestion-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

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

.suggestion-icon {
    margin-right: 12px;
    color: #6c757d;
    width: 20px;
    text-align: center;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.suggestion-desc {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

.suggestion-category {
    font-size: 0.75rem;
    color: #007bff;
    background: #e7f3ff;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.search-container.focused .search-suggestions {
    display: block !important;
}
