/* scrolling-news.css */

/* 移除原有的 .news-actions-container 样式，因为它将被替换 */
/* .news-actions-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
    min-height: 250px;
} */


/* 新增：新闻显示容器，使用 Grid 布局 */
/* 注意：这个 .news-display-container 是您在 layout.css 中定义的新容器 */
/* 如果您之前没有在 HTML 中使用这个类，可以忽略此处 */
/* 但为了代码的完整性，我将其保留 */
.news-display-container {
    display: grid;
    grid-template-columns: 66.66% 33.34%;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    min-height: calc(100vh - 200px);
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.input-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background-color: #f0f2f5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    flex-grow: 1;
}

.input-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.input-area select,
.input-area input[type="text"] {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    min-width: 150px;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.button-row button,
.button-row a {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-size: 0.95em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.button-row button:hover,
.button-row a:hover {
    background-color: #0056b3;
}

.button-row a {
    background-color: #6c757d;
}

.button-row a:hover {
    background-color: #5a6268;
}

.scrolling-news-section-wrapper {
    padding: 10px;
}
.hover-button-group {
  position: relative;
  display: inline-block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  z-index: 10;
}

.hover-button {
  background-color: #007bff;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  font-size: 0.95em;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease;
}

.hover-button:hover {
  background-color: #0056b3;
}

.hover-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background-color: #e6f0ff;
  border: 1px solid #cce0ff;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  min-width: 120px;
  z-index: 1000;
  overflow: hidden;
}

.hover-button-group.open .hover-menu {
  display: block;
}

.hover-menu a {
  display: block;
  padding: 6px 12px;
  text-decoration: none;
  color: #003366;
  font-size: 0.85em;
  text-align: center;
  background-color: #e6f0ff;
  border-top: 1px solid #d0e3ff;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.3);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hover-menu a:first-child {
  border-top: none;
  box-shadow: none;
}

.hover-menu a:hover {
  background-color: #d6e6ff;
  color: #004080;
}
.hover-button-group {
  position: relative;
  display: inline-block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  z-index: 10; /* 防止被遮挡 */
}

/* 主按钮 */
.hover-button {
  background-color: #007bff;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  font-size: 0.95em;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease;
}

.hover-button:hover {
  background-color: #0056b3;
}

/* 菜单容器：用 visibility + opacity 控制稳定显示 */
.hover-menu {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background-color: #e6f0ff;
  border: 1px solid #cce0ff;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  min-width: 120px;
  z-index: 1000;
  overflow: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* 菜单项：紧凑 + 层次感 */
.hover-menu a {
  display: block;
  padding: 6px 12px;
  text-decoration: none;
  color: #003366;
  font-size: 0.85em;
  text-align: center;
  background-color: #e6f0ff;
  border-top: 1px solid #d0e3ff;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.3);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hover-menu a:first-child {
  border-top: none;
  box-shadow: none;
}

.hover-menu a:hover {
  background-color: #d6e6ff;
  color: #004080;
}

/* 悬停时显示菜单 */
.hover-button-group:hover .hover-menu {
  visibility: visible;
  opacity: 1;
}

#scrolling-news-section {
    background-color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    text-align: justify;
}

#scrolling-news-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #333;
    text-align: center;
    padding-bottom: 5px;
    /* 已移除下方线条 */
}

#all-news-container {
    width: 100%;
    height: 350px;
    overflow: hidden;
    border: 1px solid #ccc;
    position: relative;
    background: #fff;
    font-family: sans-serif;
    margin-top: 10px;
    flex-grow: 1;
    flex-shrink: 0;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.news-list li {
    padding: 8px 20px 8px 15px; /* 微调右边距 */
    border-bottom: 1px dashed #e0e0e0;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.news-list li:nth-child(odd) {
    background-color: #ffffff;
}

.news-list li:nth-child(even) {
    background-color: #f7f7f7;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list li a {
    color: #333;
    text-decoration: none;
    display: block;
}

.news-list li:hover {
    background-color: #f0f8ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    cursor: pointer;
}

.news-list li a:hover {
    color: #007bff;
}

@media (max-width: 768px) {
    .news-display-container {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 15px;
    }

    .input-row {
        flex-direction: column;
        align-items: center;
    }

    .input-area select,
    .input-area input[type="text"] {
        width: 100%;
    }
}