/* 兼容WordPress后台仪表盘顶部条 */
body.admin-bar .cphos-simple-header {
    top: 32px;
}
@media (max-width: 782px) {
    body.admin-bar .cphos-simple-header {
        top: 46px;
    }
}

/* 防止内容被固定头部遮挡 */
.site-content {
    padding-top: 72px;
}

/* ===== 简洁Header样式 ===== */
.cphos-simple-header {
    background: #1e3a8a;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(30, 58, 138, 0.2);
}

.cphos-header-container {
    margin: 0 auto;
    padding: 0 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== Logo区域 ===== */
.cphos-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cphos-logo-icon {
    width: 45px;
    height: 45px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cphos-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.cphos-custom-logo {
    height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

.cphos-custom-logo:hover {
    transform: scale(1.05);
}

.cphos-logo-fallback {
    display: none;
}

.cphos-logo-fallback .cphos-logo-icon {
    width: 45px;
    height: 45px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #1e3a8a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 管理员登录按钮样式 */
.cphos-admin-login-btn {
  display: inline-block;
  margin-left: 18px;
  padding: 6px 18px;
  font-size: 1rem;
  font-weight: 500;
  color: #1e3a8a;
  background: #e0edff;
  border-radius: 18px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  vertical-align: middle;
  box-shadow: none;
}
.cphos-admin-login-btn:hover, .cphos-admin-login-btn:focus {
  background: #b6d4ff;
  color: #17408b;
  text-decoration: none;
}

.cphos-site-info {
    display: flex;
    flex-direction: column;
}

.cphos-site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.cphos-site-title a {
    color: #ffffff;
    text-decoration: none;
}

.cphos-tagline {
    color: #ffffff;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-top: 2px;
}

/* ===== 导航按钮 ===== */
.cphos-navigation {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cphos-nav-button {
    color: #ffffff;
    background: transparent;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cphos-nav-button:hover {
    background: transparent;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    color: #ffffff;
    text-decoration: none;
    border: none;
}

/* 所有导航按钮样式统一 */
.cphos-home-btn,
.cphos-about-btn,
.cphos-resource-btn,
.cphos-events-btn,
.cphos-forum-btn,
.cphos-register-btn,
.cphos-articles-btn {
    color: #ffffff;
    background: transparent;
    border: none;
}

.cphos-home-btn:hover,
.cphos-about-btn:hover,
.cphos-resource-btn:hover,
.cphos-events-btn:hover,
.cphos-forum-btn:hover,
.cphos-register-btn:hover,
.cphos-articles-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: none;
}

/* 按钮悬停效果增强 */
.cphos-nav-button:hover {
    text-decoration: none;
}
/* 确保所有导航按钮状态一致 */
.cphos-nav-button:visited,
.cphos-nav-button:focus,
.cphos-home-btn:visited,
.cphos-home-btn:focus,
.cphos-about-btn:visited,
.cphos-about-btn:focus,
.cphos-resource-btn:visited,
.cphos-resource-btn:focus,
.cphos-events-btn:visited,
.cphos-events-btn:focus,
.cphos-forum-btn:visited,
.cphos-forum-btn:focus,
.cphos-register-btn:visited,
.cphos-register-btn:focus,
.cphos-articles-btn:visited,
.cphos-articles-btn:focus {
    color: #ffffff;
    background: transparent;
    text-decoration: none;
}

/* ===== 下拉菜单样式 ===== */
.cphos-dropdown {
    position: relative;
    display: inline-block;
}

.cphos-articles-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.cphos-dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.cphos-dropdown:hover .cphos-dropdown-arrow {
    transform: rotate(180deg);
}

.cphos-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    background: transparent;
    border: none;
    border-radius: 8px;
    box-shadow: none;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: visible;
    /* 添加隐形的悬停区域 */
    padding-top: 10px;
    margin-top: -10px;
}

.cphos-dropdown-content::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1e3a8a;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.cphos-dropdown:hover .cphos-dropdown-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.cphos-dropdown-link {
    display: block;
    color: #ffffff !important;
    padding: 15px 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.cphos-dropdown-link:first-child {
    margin-top: 10px;
    border-radius: 7px 7px 0 0;
}

.cphos-dropdown-link:last-child {
    border-bottom: none;
}

.cphos-dropdown-link:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    text-decoration: none;
    padding-left: 25px;
}

.cphos-dropdown-link:last-child {
    border-bottom: none;
    border-radius: 0 0 7px 7px;
}

/* 添加小三角形指示器 */
.cphos-dropdown-content::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #1e3a8a;
    z-index: 1;
}

/* 确保下拉菜单在移动端隐藏 */
@media (max-width: 768px) {
    .cphos-dropdown-content {
        display: none !important;
    }
}

/* 桌面端确保下拉菜单可见性 */
@media (min-width: 769px) {
    .cphos-dropdown {
        position: relative;
    }
    
    .cphos-dropdown-content {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}